Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Using the task manager to make Windows XP perform better
Published on October 22, 2003 By Draginol In Personal Computing

My work machine stays up for weeks and often months at a time. In fact, the only time it gets rebooted is when our office loses power (which is too frequently, yea I should get a UPS).

People are often shocked at this. How do I keep my system running for so long, especially given how hard I push it day in and day out while running all the major components of Object Desktop? On Windows XP, it's actually pretty easy -- once you know what affects stability.

It all starts with the task manager.  To get to that, hit CTRL-SHIFT-ESC. When you do that, the task manager in Windows XP will come up.

Whenever you have a problem with your system, whether it be acting slow or saying it's out of memory or just acting weird, you'll want to pull up the task manager.

Once you do that, go to the Performance tab.  Check and see how much RAM is in use.  A lot of young techies get obsessed with the amount of memory committed. Don't.  Check to see if your CPU meter is pegged too high, check to make sure you're not using a ridiculous amount of memory (I have 1 gig installed so 419MB in use is no biggie).  But most importantly: Check the handles in use.  This is what slows down your system.

The # of handles in use should never grow much beyond 12,000.  When you get to 15,000 handles, weird things can start to happen and you'll feel your system slow down. This is where most people just reboot. They'll throw up their hands and say "Well, time to reboot." But that's unnecessary because the task manager can tell you what program(s) are using up those handles.

So now click on the processes.  You'll want to go to View->Select Columns and choose the items that are chosen here.  You want to know things like the handle count, the GDI objects, and the User Objects.  If any of those numbers are >2,000 on a given item, that item is doing something bad.

Once you have that set up. Look at the column headers. Sort by the ones I've highlighted in yellow first. Is something using up most of your CPU? Then kill it if it's not supposed to. Is something using more than 2000 handles? If so, you should probably kill that too. Same for User Objects and GDI Objects.

And then finally, sort by memory usage and then VM size. Don't worry too much about those numbers unless you're running low on RAM. The VM Size column isn't terribly useful anyway because it double counts libraries being loaded (i.e. a program that needs to read .PNG files will load a library that uses that but another one that uses the same library will get that counted too. Mem Usage is the one to keep an eye on.  But again, even there, don't sweat that number too much unless it's using a signficant percentage of your installed memory.  Internet Explorer is using 21 megs of RAM. Sounds like a lot right? But that's only 2% of my installed memory.  Back in the old DOS days of 640K 2% would be just over 12K of memory.

CPU, Handles, GDI Objects, User Objects, these are the things to keep an eye on. If you kill processes that are using up an unusual amount of these resources, you can keep your system up indefinitely.

 


Comments (Page 2)
4 Pages1 2 3 4 
on Nov 06, 2003
Very nice. Tips like this makes it worth while to keep coming back to the site. Great job.
on Nov 08, 2003
"How does one go about gaining some of the basic understandings of the inner workings of XP without needing a graduate degree in CS?"

Reading. Reading. And more reading. The last issue of Maximum PC had a good article for people wanting to learn the basics of what service does what, for example. Very basic, but it provides a good start for a list of "Services I need and services I don't need."

Books. They're those paper things you find in stores (Not trying to sound condescending - I realize it does.) They're a rare thing now - but there are still places that sell them.

And finally - websites. The Elder Geek is a -great- resource for all things Windows related. Know the site. Learn it. Love it. Make it your homepage. Well maybe not the last one.
on Nov 10, 2003
wondering about my Stardock stuff hogging all my computer resources, I just used your article as I opened my Task Manager, only to find that nothing is hoggish....thanks a bunch for the article...my compliments from a grannygeekwannbee
on Nov 12, 2003
Brad, I was just thinking, since you obviously know a hell of alot more about computers than your average user does, and you work at Stardock... and there are alot of skinners who really dont have any idea what is going on, I think that you should add a tutorials section to wincustomize... You have some wonderful insights, and it would be a hell of a great resource to be able to visit wincustomize, and not only download skins, but also have access to tutorials. Even little stuff, like what your article describes, is ridiculously helpful.. ANyways, thank you... and you really should think about that wincustomize thing....
Amen Brotha
on Nov 17, 2003
Good article. Probably tecahing granny to suck egss but have a look at www.sysinternals.com for a task manager replacement that gives a lot more information. - Process Explorer. cheers Rab
on Nov 20, 2003
Hi, Interesting article, and According to Microsoft KB Article 327699, Windows XP restricts the maximum number of user Objects to 10,000. Is anyone aware of any tools that can peer into the User Objects to see what they are? Similar to looking into each handle in use?

Thank You

Saul
on Jul 11, 2004
When I first got my computer it was pretty slow. I had the bare minimum amount of ram for windows xp. I think its 128 mb. But it never crashed on me. I just had alot of temporary freeze ups. I then installed a 512 mb chip and I've had no problems since. I am actually surprised when people tell me their XP crashes. I think mine has only crashed or completely frozen up maybe 2 times. I only have a 1.8 ghz processor as well.
on Jul 17, 2004
I dispute the handles guidance, I have 15,415 handles open just for MySQL-MaxNT 5a and my system is rock solid, it stays up for ages.

My PC Recommendations:

* Make sure your hardware is up to the task e.g. power supply (1), processor heatsink and fans. Many PC builders cut corners on components, so the PC can become unstable over time, when pushed hard (games,server) or when extra components/peripherals are added. (1) The power supply must be able to supply amply current on each voltage rail (at the same time) and provide quality voltage regulation otherwise your system may become unstable or suffer from intermittent faults, don't just rely on Watts.
* If possible, load the PC with enough RAM so that you don't need virtual memory (I use 1.5GB), PC's run MUCH faster with virtual memory (file) turned off. Windows, for some reason, continuously accesses the swap file, even when huge amounts of physical RAM is free, unfortunately the extra disk use slows down a PC via CPU interrupts, DMA or by increasing hard disk seek delays.
* Enable DMA for all drives, if possible, because DMA is often much more efficient at transferring data than the CPU.
* Regularly defragment your hard disk partitions, because scatter file fragments can cause see delays. I user Perfect Disk 6.0 (http://www.raxco.com/) currently, because it is very fast and can decompact file fragments bigger than free disk space/gaps.
* Don't rely exclusively on CPU Usage to spot slowdowns, DMA use (for disk, sound cards etc) can also slow down the CPU a lot if it wants to use physical memory at the same time, yet CPU usage can drop when this happens!
* Stop unneeded programs/services from auto-running, like the Indexer service.
* Make explorer.exe run separate instances, see (http://www.x-setup.net/), so that it causes less annoyance when it crashes!
* Use a multi-threaded file browser instead of explorer.exe e.g Directory Opus (http://www.gpsoft.com.au/). Explorer.exe is primitive single threaded junk e.g. it can only do one thing at a time.
* Avoid using applications using Microsoft browser components. Microsoft are losing the security war (Berbew was just a taster), so it only a matter of time before some nasty malware silently installs (e.g. via IE,OE,Outlook) and messes up your PC. Better still minimise the use of Microsoft programs, period, you may find that you have more free physical memory and better security.
* Disable automatic Windows Update and only install the updates you actually need (even some security updates are gratuitous), excess updates may add new bugs, slow down you PC and install unwanted software e.g. the insecure MSJVM (Microsoft Java).
* Use a decent personal firewall (I assume you know that the XP firewall is junk) e.g. not ZoneAlarm (Pro) or Norton/Symantec junk. I use Agnitum Personal Firewall Pro 2.1 (http://www.agnitum.com/products/outpost/) currently.
* If on dialup, use a serial port Modem, WinModems and USB modems can seriously slow down your PC, as can any USB device.
* If on broadband never use a USB Modem (too slow and VERY insecure), instead use a router with NAT (preferable a built-in firewall), via an ethernet cable, and avoid using DMZ, that way make it much harder for crackers to make your machine their bitch i.e. a zombie PC.
* Make sure that your device drivers are not causing problems/crashes e.g. use recent versions and seriously consider desposing of hardware/peripherals where the manufacture is too lazy to provide stable drivers.
* Use Firewire devices in preference to USB, they often work faster, with much less load on the CPU.

BTW: I prefer TaskInfo (http://www.iarsn.com/taskinfo.html) to task manager, it's like Task Manager on steroids (more graphs, resource alarms, cache flushing etc.) and often works better under load.

You can send comments to auto102767 {at} hushmail {dot} com. Note, you will have to confirm any email if not in my whitelist.
on Jul 17, 2004
BTW I forgot to mention, Bush is an idiot, why else would he accept/push the bogus WMD propaganda and drag that 'bitch' Blair (UK) in and waste Billions pissing off many Arabs yet again! Do these politicos (Right, Centre and Left are equally as bad) realize that 11th Sept only happened because the US had already pissed off many Arabs and made themselves a target. Doesn't anyone learn from history, the US should have remembered Northern Ireland to know the folly of interfering in other countries affairs and the long term costs that result e.g. Northern Ireland is a basically a dangerous training ground in urban warfare, for the British Army now!

on Aug 12, 2004
question pls, when you 'End process' on a item a box pops up " terminating a process may cause undesired affects, loss of data, etc etc" is there a way to go back and let that program close itself and save what ever it needs to be saved or is it even a critical part of the process and something to not really worry about

thank you
TTO student
on Mar 17, 2005
that was very interesting becuase I can't find actual numbers of what each one should be. it gaives you a little and you have to figure out the rest in reading and it's given me headaches trying to understand it and this one was more difficult for me than anything else. so thanks.
on Apr 25, 2005
I would like to Know if it's the same for Windows 2000?
I have a machine with Windows 2000 Server and Handles total it's around 3.000.000.
Thanks, Isabel
on Aug 12, 2005
thank you...a great article...i use task manger a lot, but not like this, and this is very useful...i appreciate you taking the time to write it all down...

it's very interesting to see what is using system resources like this...this only thing a have with over 2000 handles is the 'system' process...is that normal? (it has about 2,730)
on Nov 17, 2005
hey. thanks for that article. i've been trying to figure out why explorer.exe seems to grow like a weed with VM usage. mine starts at some value around 20 megs and then after a day or so the VM size is 135 megs + i have no clue why and can find no info on the net. i did notice (after reading your article) that it has 23,478 handles !!! ha. that's quite a bit more than the 2000 or so limit. again. i have no clue why. aside from explorer.exe i typically use about 100-150 MB of the 384 MB RAM i have. i have the page file set to 999 MB (just picked that randomly. i don't like even numbers). if anyone has any thoughts i would appreciate them. thanks again. also, the computer runs pretty well. i don't notice any major slowdowns. but it is definitely quicker before the explorer.exe VM grows. for now i just occasionally end task explorer.exe and then restart it.

and don't listen to infernoz... he'll have you believe women in short skirts created sexual harrassment.

on Jul 20, 2006
Hey guys, can anybody tell me what the "SVCHOST.EXE" process is all about? It uses almost 2,000 handles and it has "sub-friends"!

Thanx.
4 Pages1 2 3 4