For the last 3-4 months, my desktop machine at work has been cranky, slow, and prone to crashing. Bringing up Windows Explorer took ages. Changing directories in MATLAB took seconds. I couldn’t have PowerPoint open at the same time as, say, Acrobat or Firefox, because it wouldn’t redraw the slides if the PowerPoint window was maximized – I would have to shrink the window before it would redraw. Accessing a network share occasionally wouldn’t work and I would get a cryptic out of resources message.
Initially, I blamed this on Firefox, which does suffer from memory leak problems. But closing it didn’t always fix the problem. I thought the PowerPoint issue was some interaction with Acrobat and some weird GDI leak issue. I did have a GDI leak, which was in Logitech’s terrible SetPoint utility. But, again, disabling SetPoint seemed to makes things better, but not definitively.
I could login remotely with RDP, but only once. The second time the connection would be rejected. And I would get back to work to find that after the first RDP session, my desktop had switched to 640×480 at 4-bit color and refused to switch back without a reboot. Sometimes I wouldn’t even be able to login/unlock the session and would be forced to power the machine down hard. I thought perhaps this was due to a desktop heap problem, and I found ways of increasing the interactive heap size and diagnosing the problem. But heap levels seemed OK, and increasing the heap size didn’t seem to help.
And so I was reduced to running a few applications at a time, closing and opening apps as needed in a aggravating juggling act from hell.
This all came to a head yesterday when I got back from Thanksgiving weekend. My machine had locked up and I had to do a hard power down. After rebooting, even running Chrome and MATLAB simultaneously was problematic. At first I thought it was due to the fact that I’d recently switched from using Thunderbird as my email client to Gmail and that perhaps the web interface was not as efficient. But then I discovered that Symantec Antivirus was taking up a good amount of resources so I stopped the service. That helped a little, but I was still having problems having multiple instances of Windows Explorer, Chrome and MATLAB going and this was impacting my productivity.
Today, after more digging around the internet, I got a tip to check the System error logs. Lo and behold, I had a litany of messages like:
The server was unable to allocate from the system paged pool because the pool was empty
Googling this message led to info about kernel memory management and finally how to diagnose depleted pools. This required enabling pool tagging and installing PoolMon. This told me that Symantec Antivirus was hogging up most of the pool by itself. More research told me this was a problem with the version of SAV I was running (Corporate Edition 10.1). So I downloaded the newest version from the University’s software site (they’d discontinued SAV CE and moved to Symantec Endpoint Protection) and attempted to install that. But of course, when I ran the installer, the stupid thing would run the install program for a Windows CE WLAN driver I had been tinkering with some months earlier. This led to more digging and while I never found a good solution online, my fix was to uninstall the WLAN driver. The new AV software used half the amount of paged pool resources than previously. But still quite a bit – 50MB, which was 4-5 times the amount of the next driver.
In the meantime, I had also installed Process Explorer and setup debugging symbols. This informed me that unlike most XP installs, I had a maximum paged pool size of 155M as opposed to the standard 350MB. More digging on the internet showed that this was because I had the /3GB flag set in my Boot.ini file. I had set this flag some months ago in order to give MATLAB access to more memory as I was running out on some large computation I was running. What I didn’t know was that what Windows does is to change from a 50/50 split of kernel and user memory to a 25/75 split. Which means that Windows cuts the pool size in half. Sure, MATLAB had more memory to play with, but I effectively eliminated my ability to multitask. Especially with SAV installed. I removed the flag, rebooted, and it was like I had a new machine! Things worked snappily! I could run multiple apps!
The lesson? Only set the /3GB flag if and when you really need it. And switch to a 64-bit version of Windows ASAP!