Vista Hands On #17: Solving a pesky resource problem

Vista Hands On #17: Solving a pesky resource problem

Summary: Are you experiencing odd "out of memory" errors or display problems with Windows Vista when you try to open a large number of programs or windows? Even if you have multiple gigabytes of physical memory in your Windows Vista system and you're using only a fraction of it, you can still run into this problem. It turns out the cause is more than a decade old, and the solution is as simple as tweaking a Registry key to bump up the size of the mysterious interactive desktop heap. I've got the details.

SHARE:
TOPICS: Windows, Microsoft
126

Have you experienced any of these problems with Windows Vista? After opening a large number of programs and windows, you try to launch a new program or open a new browser tab or even switch back to an already running program and instead:

  • You get a strange “out of memory” message, despite the fact that you’re using only a fraction of the RAM installed on your system.
  • The window opens but its contents refuse to load.
  • The window opens, but menus are missing, dialog boxes are empty, or buttons don’t work.

In my case, I experienced this problem regularly on multiple Vista systems when I opened Outlook 2007, Forte Agent, Adobe Acrobat (editing three or four large documents), BlogJet, Windows Live Writer, Word (working with several large documents), and IE7 with more than 30 tabs. The problem vanished for me, as it does for most people, when I closed a few windows, but that’s obviously not the ideal solution. After all, what’s the point of having all that RAM if you can’t use it?

The problem, as it turns out, is as old as the Windows NT family. I’ve found references to this issue that date back to the mid-1990s and Windows NT 3.1 and 3.5. The fix for Vista, just as for those much older versions of Windows, involves editing a key in the Windows Registry.

First the problem: Windows sets aside a blob of system memory called the desktop heap, which it uses to store user interface objects such as windows, menus, and hooks. The Microsoft Advanced Windows Debugging and Troubleshooting Blog offers a dense, but still readable explication of the problem and why it occurs (it’s a two-part series: read the Desktop Heap Overview first and if your eyes haven’t glazed over read the shorter Desktop Heap Part 2 for details that are specific to 64–bit Windows, systems with 3GB of RAM, and Windows Vista).

The fix for 32–bit Windows Vista is simple: The interactive desktop heap size needs to be bumped up to a value greater than its default setting of 3072KB. I recommend a conservative approach: increase the value to 4096 and try that for a while. If you continue to bump into the problem, try a higher value. On one system here, I’ve been running without issues using a value of 8192KB.

Before I explain how to make the change, I offer the following disclaimers: Editing the Registry is not a trivial task. If you make a mistake, or if your system doesn’t work the way mine does, you could end up causing damage to data or render your system unbootable. You do this at your own risk.

OK, with that out of the way, here are the step-by-step instructions:

  1. Click Start, type regedit in the Search box, and click the Regedit icon that appears at the top of the Start menu.
  2. Click OK in response to the UAC prompt.
  3. In Registry Editor, navigate to the following key: HKEY_LOCAL_MACHINE – SYSTEM – – CurrentControlSet – – – Control – – – – Session Manager – – – – – SubSystems
  4. In the contents pane to the right, double-click the Windows value from the bottom of the list. This opens an Edit String dialog box containing a very long text string.
  5. Scroll through this text value until you find the section that begins with SharedSection. Change the second value from its default of 3072 to a higher number. Do not change any other values.

desktop_heap_regedit.png

Restart the computer. If your experience is like mine, you’ll find that those odd error messages are gone and that you’re able to open many more windows without any display issues.

Topics: Windows, Microsoft

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

126 comments
Log in or register to join the discussion
  • That's crazy

    "systems when I opened Outlook 2007, Forte Agent, Adobe Acrobat (editing three or four large documents), BlogJet, Windows Live Writer, Word (working with several large documents), and IE7 with more than 30 tabs."

    Who in their right mind does this? Depending on how you count it that's either 7 or 42+ simultaneous (and large) applications.

    Not to mention 42+ seperate tasks. Multi-tasking much, Ed? :) Perhaps we should report you to the SPCC (Society for the Prevention of Cruelty to Computers).

    I've *never* seen any user do that. Ever.

    My busiest user might have 5 applications open simultaneously--none of them with multiple documents in any one app.

    Even in mid-development mode I'm not going to have that many open at once. Don't know about you but I need to *concentrate* on what I'm doing, not split my attention 42 different ways...
    wolf_z
    • Irrelevant

      Just because you don't doesn't mean he shouldn't be able to. And he would be able to on a modern operating system, not some hacked 90s OS.
      frgough
      • 1990's relic

        Agreed. It is sad that Vista was built on the old NT kernel.
        shoktai@...
      • nothing crazy

        Having 42 windows open is not necessarily a disturbing idea. I do think that this corresponds to the way the user manages his working space, and the way he wants to have fast response for various needs at different times.

        Certainly, he won't need to work simulatneously on the 42 windows, but he wants to have them available fast when he needs them. That's what operating systems were made for: allowing users to choose themselves the order of interactions they want with the running apps, and schedule themselves their work in each app according to their desire.

        So many windows will remain open for tasks to be completed later, but there's nothing wrong with this usage. Many of these windows are acting like a reminder for things noted at one time but to be performed later. It's then up to the OS (and its GUI) to help the user organize his work, order them, finding and selecting them in a easy to use way.

        A user opening lots of windows is certainly not stupid if he has built his own way to manage his work with them. Yes we know that many dumb users are keeping (forgetting) many windows open despite they will have no desire to work with them later. This occured quite often in the past with older GUI interface designs where these windows could be easily forgotten in the background. But the Windows and Office GUI has been improved since their initial version. It's now hard to forget that there are many backdround windows and document needlessly left open.

        Some things that have been added in Windows to help users closing their unneeded documents:
        * the LRU lists (such as "Recent documents"), this features help organizing the work, allowing documents not immediately needed to be closed and reused later without having to search for them in a complicate way.
        * the grouping of icons in the taks bar that helps sorting long lists of open windows and documents.
        * changing multiple browser windows by grouping them into tabs
        * and so on...

        As you see, many open documents is not necessarily a crazy idea, and a better GUI design will in fact allow having such thing.

        Andlet's not forget that now the OSes are made so that we don't need to reboot them everyday or several times each day just to reclaim good performance. If the system is used over a long period, I don't see why documents need to be closed if they will be reused over this longer period.

        Each one chooses his way to organize his work. And if he chooses to use the newer GUI features so that more documents/windows are left open without cuasing them more nightmare to remember what he projects to do, it's not to the OS to limit arbitrarily the user in this choice. So the OS must improve to allow users to do that according to their usage.
        PhilippeV
    • Really?

      So you don't have email and browsers running somewhere always? You stop development, unload these tools and then load these clients and then unload and reload your development environment several times everyday? You don't use Excel for table capture or sorting while you enumerate data?

      Since I do primarily engineering and science algorithms, I keep several engineering and math tools (real memory and resource hogs) up that are used to verify the accuracy and fidelity of the models and algorithms, while I hard code them and verify the C/C++ code representation of the model after building new modules. I generally have a minimum of 7 to 10 apps running and usually even more with my browser tuned to several sites at once as well as frequent searches for Internet resources to augment my personal resources in the course of work which of course must be documented in Office and printed to PDF in nearly real time for my pointy headed boss.

      You must have an easy job and or a limited mental multi-tasking ability, that's all I can say...
      jacarter3
      • Absolutely right

        In my case, I was updating chapters of my next book. In order to do that, I needed to be able to quickly cross-reference previous editions and other chapter files. That's why I had Acrobat and Word open with multiple files - because I'm actively working with them.

        My RSS reader and e-mail client program are always open and downloading content at regular intervals. Should I continually close and reopen them?

        For me, this environment is not cluttered. It representa what I'm working on. At the end of the day, I clean up, add bookmarks to pages I found interesting, copy notes to OneNote, and deliver files to my publisher. The desire and/or need to continually close windows and reopen them is so old-school.
        Ed Bott
        • Oh, is that why your books

          don't have a natural progression?

          JUST KIDDING!! I have a number myself and use your site a lot.
          :)
          xuniL_z
      • easy job?

        I didn't count over 42 sessions for you Carter. There is a point of diminishing returns like everything else. You can call anyone that doesn't have more than 42 sessions open as having it easy, but you are blowing smoke.
        If I think i might...only might need a site later on, just bang a s/c out to my desktop and close it. 2 seconds. <br>
        I have 15 sessions going on this PC right now, and that is about average. 25 would be very high end. <br>
        But then again, I have an easy job.
        xuniL_z
    • another NBMer talking!

      [My busiest user might have 5 applications open simultaneously--none of them with multiple documents in any one app.]
      So windoze limits you to a few apps.
      Switch to Linux, you will never ran out of resources even if you used tens of apps on a dual monitor!
      Linux Geek
      • Message has been deleted.

        Hallowed are the Ori
        • Message has been deleted.

          OButterball
      • Does Linux have enough applications to reach such a limit?

        Just kiding, just kiding :-)
        ye
        • The matter isn't the OS here...

          ...it's a setting for the desktop environment which is at fault. Under Linux, you could have such a problem if, say, KDE used a fixed size buffer for desktop elements.
          Since the desktop environments are usually smarter than that and had to deal with heavily multitasking environments, I'd say that this is the kind of problem you won't get that easily. Moreover, the Linux desktop being heavily modular, I'm not even sure this kind of caching actually takes place.
          Mitch 74
        • Yes it has

          The same (or similar) set of applications described by the author of the article also exist on Linux:
          * browsers (with optional tabs)
          * word processors
          * publishing tools (like PDF converters or layout engines)
          * drawing tools
          * database applications
          * e-mailing and other user-communication
          * notepads/scrapbooks and management of notes
          * job organizers
          * terminal applications (for working on remote sites)...
          * source editors
          * compilers
          * ongoing (long) automated software test suites...

          All these may needto be open simultaneously throughout the day because they may perform continuously and automatically some background tasks, or because they are left running in the background and not demanding a permanent interaction with the user to perform their task, or only because the user wants to schedule his work over a longer time period.

          There is NO reason to think that Linux or Windows should be better than the other for doing this. Most of the time, it will just be a matter of usability of the GUI, and user's preferences or training with one of the GUIs. But Linux-based GUIs (or Mac) and Windows are all converging to a very common set of features.

          And if you think that Linux does not have the same kind of arbitrary limitations in the implementation of its system components and services or in apps than in Windows, you're wrong,simply because there are lots of softwares written now to run indistinctly with the same features on all these environments, and they are designed/programmed using the same kind of solutions.

          The first thing that becomes obvious when you look at any software is that the first goal to meet in these softwares is that they will work for their own task, and other considerations like interaction with other apps and scalability comes only later, because this is a much more complex issue that requires experience based on users demand. finding the most accurate way to manage many concurrent applications is not an easy task:

          You can't tune your application to work in complex environments before you have not asserted that your application was properly doing its job in simpler environments (the first need will be to avoid internal software bugs, and an initial design is necessarily simple, in order to avoid many complex forgotten cases).

          Software users will complain much more if there's a bug in a software that does not work in a simple environment. And this fixes the first priority (they are ready to accept that resources may be exhausted if their computer does not meet some minimum requirements, but this additional cost is perceived as marginal face to the cost of bugs or if the aplication does not fulfill its intended goal within the defined minimum environment).

          Now if the software works perfectly in a minimum environment, they will want scalability and adaptation to more complex situations, but this is almost always a second goal: this MUST NOT break the first goal.

          The fact that all this runs under Linux or Windows is irrelevant: users will always want their tasks to be done correctly, and then want these tasks to be simple to use along with other unrelated tasks.
          PhilippeV
        • yep

          I am running Firefox with something like 40 open tabs, Thunderbird, OpenOffice, kile (LaTeX editor), and HTML editor, FTP, ICQ and in freeciv there's game that I started two weeks ago and is still running (I never close its window) - this on a old PC with 1 GB of RAM which also runs a web server. And, when I want to view a movie - I just start it, there's never a consideration of "is there enough memory". The current active application just gets the memory it needs.
          pavka@...
      • dual monitor?

        what, you've never used virtual desktops? silly boy. :-)

        gnu/linux...giving choice to the nex(11)t generation.
        Arm A. Geddon
        • of coures.

          Virtual destkops are no where near as useful or productive as dual (or more) monitors.
          rtk
          • Multiple monitors vs; virtual desktops

            The bad thing about multiple monitors is that they are voluminous, not mobile (not made for laptops), spend lot of energy, and you typically finish by working only on a single one.

            GUI features like virtual desktops are not a panacea (because they completely hide the currently unused desktops, so you may forget that documents are left open there) but they have their use for those that like them and use them with reason; my opinion is that all should be easy to perform using a single screen, if the GUI offers enough easy-to-use features, and with such GUI features, multiple virtual desktops have absolutely no use (I am persuated that there are much better GUI features to organize our work).

            Multiple desktops may be more useful if there are multiple indeterminate users of the same computer (at different time, but sharing the same user account, session and privileges), each one managing their work independantly. But they would be more useful if those virtual desktops could be freely moved to a separate (possibly remote) true desktop, on demand.
            PhilippeV
          • Multiple Monitors for specific kinds of tasks

            I prefer multiple monitors when doing cutting and pasting from one document to another because I can bring them up side by side for direct comparison.

            And mutiple monitors are very handy for games environments where you have the real time game running and need to do a quick bit of research on the side, are running multiple accounts (how many 'bots do you have following you around?); or most importantly for domestic bliss, when your wife wants to check her e-mail in the middle of a combat raid!
            Dr_Zinj
          • Perfest for a permanent (wired) desktop at home but

            As long as you don't need a mobile environment, and your computer at home can be left in a place where it won't be disturbing your other daily environment, using multiple monitors (if you really want to dedicate such space into your home) is perfect.

            The legimitate desire of having two documents opened at the sem time to perform copy/paste operations does not seem sufficient to justify a second monitor.

            Many users just use CTLR+C, Alt+Tab, Ctrl+V to do this without even having to raise the hand to drag and drop the copied elements, and they do that much more easily, faster and more precisely with keyboard shortcuts than with a mouse.

            Note that on laptops, this desire of having multiple documents open at the same time has been a large factor of the success of wide display panels (instead of multiple monitors that would not meet the ease of transportation and installation).

            Note that the extension of the display width has also allowed wider and more cumfortable keyboards on laptops,without increasing their weight and total size for transportation, and such laptops remain usable on small surfaces (because an increased height of the screen would have meant an increased needed depth for the horizontal part: imagine what it would be on the small table facing you in a train or plane trip, or if you use your laptop in your parked car..., or if there's someone in front of you.)
            PhilippeV