Handles and Windows XP

Slowing down the computer...

When I get time I'm going to write an article about how handles are the new GDI object in Windows.

Basically, on Windows XP you get around 20,000 handles total. After 15,000 or so are used, your comptuer slows down. This is a real problem on servers. JoeUser.com, for instance, was running like a pig. The cause is that the main SQL server it uses was on a machine using over 20,000 handles so it was just slowed down to nothing.

Memory won't solve it. CPU power has little effect. It's just that some programs (like MySQL, SQL server, DLLHost, and the web process) use thousands of these handles each.  It's something Microsoft needs to address if it wants to compete in the server market for effectively. It's idiocy like a fixed handle allocation that makes me wonder if MS understands how to make a server.

But it is also becoming an issue on the client.  If you're running Windows XP, hit Ctrl-Shift-Esc. Go to the performance tab. How many handles you using? Over 15,000? I bet your machine feels slow. What's worse is that task manager doesn't list what processes use all those handles. I can display the handles but they don't add up to the 17,000 my machine is currently claiming (odds are it's Explorer using more than it's reporting).

Handles are the bane of modern computing on Windows.

6,533 views 5 replies
Reply #1 Top
What exactly is a handle? What does it do? I'm using 23,000+ handles and ObjectDock is using over 15,000 of those! Yikes! When I restarted it, it was only using 150.

-- B
Reply #2 Top
Good question, Mr. Frog. I think it's something like an entry point in memory or some such thing, but I can't remember...

Brad, do you know why the handles are limited (or at least, have a limit before the OS begins slowing). I can't imagine any modern OS using a fixed array anymore, so what would cause that kind of a problem?

~Buddha
Reply #3 Top
we cant be limited to 20,000..mr frog is using over that, my web server is up over 70,000
Reply #4 Top
I think what he means is that once you reach around 20,000 used handles it starts to degrade performance.

-- B
Reply #5 Top
I had a slight overuse of handles earlier, found this thread on google. Thought you'd like to know, explorer.exe was eating 464,000 handles. As a consequence, graphics were actually freezing in place on screen, everything was functioning normally with the exception of a loss in response times. Wish I had thought to get a screen cap of that! I killed explorer and restarted the process, everything is back to normal, and no idea what caused it.

-tiko