Windows Flakiness Solved: The Desktop Heap




Old, dead, obsolete computers
Originally uploaded by Extra Ketchup

This is a picture of a HEAP of Desktops. Recently I found out the hard way that Windows XP also has a Desktop HEAP. I recently was upgraded at work to a Dell Optiplex GX620 with Windows XP Pro. I received the nice new machine with 2 gigs of RAM, a fast large hard drive, and a dual core processor. I thought everything would be great. After about 1 month the flakiness began.

With about 10 or more applications open Windows XP began freaking out. When I right clicked on a desktop icon nothing would happen. I would click on the My Computer icon and get nothing. I would click anything that should open another Window and get nothing. It was if I had reached the maximum total number of Windows.

I tried restarting EXPLORER.EXE. Basically EXPLORER.EXE controls your start bar and coordinates many windows functions. This did not seem to help. If I closed out of 1 application it seemed to temporarily fix it. After a Windows reboot it would seem to be better for a short period of time.

After enduring this problem for far too long a session Googling produced THE answer…. The Desktop HEAP. The answer is a quick registry change. For technical details about the Desktop HEAP see this link. The registry string in question is:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems]
Windows=”%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16″

I simply edited the 3072 and upped it to 8192. The 3072 is 1024 KB x 3 or 3 MB. I simply increased it to 8 MB. Always be sure to back up your registry before making any changes. The problem instantly went away. I found later that Microsoft does provide a tool for determining if this is your problem. Link. In a nutshell Microsoft describes desktop heap problems as:

“When you run a large number of Windows-based programs, “Out Of Memory” error messages appear when you attempt to start new programs or try to use programs that are already running, even though you still have plenty of physical and pagefile memory available.”

This was a Windows quirk that appears to be more of a problem with Windows XP than any previous version of Windows. The diagnosis was the hardest part. If you think you might have the same problem I would suggest downloading the “Desktop Heap Monitor Version 8.1″ tool from the above link.

Be Sociable, Share!
Bookmark the permalink.
  • http://autoxtasymotorsports.com JDM

    This is exactly what was happening with my computer. It would get so bad that it was even occurring after I closed all other programs and only had a single explorer window open.

    I found the solution here:

    http://www.mikedopp.com/archive/2007/07/13/incr

    Everything works just fine with the handle limit. But now some windows seem not update and I would need to Alt-Tab or mouse over parts of it to refresh. It might have something to do with the additional registry mods of the GDI process handle and user process handle limit that was suggested ini the above link.

    Are you experiencing any delay in windows re-drawing? If not, then maybe I need to look into those other reg edits.

  • http://www.fpettit.com Franklin

    I did experience the same windows redraw issue. That was probably what annoyed me the most.

  • http://www.benjaminpettit.com benpettit

    Was this problem fixed with Vista? Just curious about that.

  • http://earningtricks.com earning tips

    I was too facing this problem. But Vista has resolved this problem.

  • http://femalenudity.blogspot.com female

    Thanks,very useful and interesting post

  • http://www.nbamax.com nba news

    Thanks, I've been looking for a step-by-step guide for upgrading wordpress on GoDaddy for quite some time now.

  • http://www.rocktheadored.com Johny

    Thank you JDM for your info, been searching for a helpfull link for some time now

  • http://work-from-home-business.com.au home work from home

    Is visa really better anyway?

  • http://solinkable.com Jesse

    This is exactly what I was looking for. I've had so much trouble finding it… By the way, that's quite a heap of desktops you have there.

  • http://www.mikepost.nl/ Mike Post

    Great article, man. Keep up the good work and please do keep sharing.

    Thanks in advance!

    Mike

  • http://spiritualhowto.com Spiritual Info

    Hey thanks for this. It's nice to know this kind of stuff!

  • http://www.articleblvd.com Articles

    great stuff . :)

  • http://dental-assistant-schools.blogspot.com Dental Assistant

    Was this problem fixed with Vista?

  • http://www.mydigitalphotopictureframes.com/ Digital Photo Frames

    Very nice post

  • http://tintamerah.com jogja distro

    nice read!

  • http://www.morphdude.com Morphdude

    Wow, what a difference that makes!

  • ikovach

    I like it!

  • http://www.onepieceofmylife.com Meaning Of Life

    I hope vista fixes it

  • Charles

    Here is a good article I found that describes how Sessions, Desktop, and Windows Stations work.

    In particular, this maybe helpful to people experiencing this problem:

    “The portion of interest is “SharedSection=1024,3072,512″. The three values under Shared Section determines how much memory in kilobytes (KB) is allocated to each component of the desktop heap. At this point, there is a major caveat here: Please do not modify these values on a whim. Changing the second or third value too high can put you in a no-boot situation due to the kernel not being able to allocate memory properly to even get Session 0 set up. Values up to about 8mb are generally safe, but may be pushing it, and frankly settings that high are not usually needed unless an installed program is misbehaving in the first place. We recommend raising these values in 512kb increments and only enough to alleviate whatever problem you are experiencing. “

  • Charles

    Would help if I gave you the link to the article :-)

    http://blogs.technet.com/askperf/archive/2007/0

  • http://www.erototoys.com/vibrators Vibrators

    Very helpful post. I was looking for an answer to this.

  • http://www.unlockuriphonenow.com/ Iphone

    awesome post

  • http://www.adasport.com/ adasport

    Hello I am very impressed with this site, thanks for sharing.
    I write you soon …

  • Fuad Hossain

    A wonderful site. I like the thinking of the provider a lot.

  • http://www.naturalk9supplies.com/Brand/enhance.aspx Enhance Dog Food

    This was a Windows quirk that appears to be more of a problem with Windows XP than any previous version of Windows. The diagnosis was the hardest part. If you think you might have the same problem I would suggest downloading the “Desktop Heap Monitor Version 8.1″ tool from the above link.

  • http://lose-fat-fast.net weight loss tips

    Really good information!
    Keep up the good work!
    ————————————–
    Best regards, John Cleric
    http://lose-fat-fast.net

  • http://www.best-registrycleaner.net Best Registry Cleaner

    This is exactly what was happening with my computer.

  • mtb

    http://www.maroc-techno-business.com
    Agence de communication, offshoring et Nouvelles technologies.

  • mtb

    http://www.maroc-techno-business.com
    Agence de communication, offshoring et Nouvelles technologies.