Blog: Windows Handles, Web-based widgets, fun with SP2.

In Windows 95, 98, and ME, we were always running out of "resources". There was even a resource monitor that would tell you what % was left.  But don't worry, Windows NT (and its descendants Win2K and XP) would take care of that...NOT. Now there's a new resource limit that causes the unwary all kinds of problems: Handles. 

If you get up over around 17,000 used on your system, it'll eventually start getting flakey just like if you ran out of resources on the old versions of Windows. And what's really bad is that Internet Explorer is the biggest pig.

I've been resetting up my laptop so it's still quite "stock" right now. I don't really have that much stuff running yet. But Internet Explorer, for some reason, feels like it needs to suck up 20 megs for each window. I have 5 Internet explorer windows open using a total of 60 megabytes of RAM and about 1,400 handles. Give it time though and it will grow.  I also have 5 svchost.exe's running using a total of ~40 megs and 2000 handles. SVCHost.exe is one of the processes that the XP theme service runs. This hiding out under that process name allows some people to claim XP themes are (ahem) "0 foot print" or use no resources and other such nonsense.  So just between those two things I've got about 100 megabytes using and 3,500 handles used. 

Of course, DesktopX is using 20 megs of RAM and 400 handles itself. But in its defense, it has a ton of ActiveX based controls floating on it right now. In watching the various Dashboard vs. Konfabulator flame wars I've seen Mac advocates make a big deal that unlike Konfabulator, Dashboard "widgets" are just web pages and that was the real innovation that others didn't have.  Ahem. Once again, this is an area DesktopX has had for years and before that, Active Desktop.  Any web page can be a DesktopX object (See screenshot of this Java clock).  What I've been playing around with is trying to find a way to have irregularly shaped web-based objects (like a round clock) on my desktop.  Alberto and Martin have done it but I haven't quite figured out how to do it.  It has to do with covering the parts you want with a transparent object that ignores the web control.  I haven't figured out how to do it despite having received 2 working samples.

Meanwhile, DesktopX 2.2 should go "gold" for Object Desktop users this next week. It's got the new graphics engine and hundreds of other features and tweaks.  For me though it's all about the overlays.  The overlay feature allows me to have all my widgets/objects pop up or disappear by hitting a hot key (like F9).  So I can cram my desktop full of widgets (calculator, stock monitor, headlines, weather, task list, sales monitor, etc.) but hit F9 and make them all disappear off my desktop and with another press of F9 have them all appear on top of whatever I'm doing so I can do whatever.  No doubt the Mac people will say we stole this from their unreleased OS feature.  For the record, we stole this idea from Tivo.   I think this feature will make DesktopX even more compelling.

This past week has been full of massive amounts of work that few people will ever notice. We're working on getting WindowBlinds working on the 64bit version of Windows XP.  It's almost done.  Plus there are some SP2 things with certain AMD chipsets we're looking into.  Stuff that few people will notice but has to be dealt with. Especially given how widespread Object Desktop based technologies are.  For instance, a certain super-hero based premium suite is expected to come out in the next couple of weeks to coincide with its movie which came out recently.  Since it's likely to be very popular, we have to make sure this stuff works perfectly.

9,120 views 21 replies
Reply #1 Top
Great News. Just to let you know Frogboy : ObjectDesktop got an excellent review and "Best Editor's Choice" of the israely version of "PC MAGAZINE" which is called "PC Plus". it came over Litestep and microsoft MSSTYLE.

i do hope there will be a new suite based on "I , Robot" which is comming up too. whatever it is , i'm sure Mormegil will do his best as usual.

Reply #2 Top
Woohoo! DX 2.2....this is gonna be awesome! More WB tweaks: even better! Cool new suites: w00t!

Sounds like we're gonna have a ton of fun with the new stuff. Cool info on the handles, btw. @ "we stole this idea from Tivo"

Reply #3 Top
Frogboy, never really thought about the handle thing so I checked,

and guess what Object Dock plus (I'm running one tabbed dock with 9 tabs in it) is using the most on my system ... a whooping 5,173. The next highest was svchost at 1,835 and then we drop into below 1000 for everything else. This means with all my crap running I've got 18,339 handles. WOW I would have never guessed, nor looked if it wasn't for you.

But anyway, any thoughts on why OD+ is using so many (maybe its something your working on), or maybe some setting I have..

Anyway glad to hear about the upcoming projects
Reply #4 Top
I'm just waiting for the Tivo folks to file a frivolous patent on "disappearing objects"

What with all this, and the new Object Dock + coming through, I might just have to bone up some more reg fees (already got GalCiv and Drengin).... Or, I could go for some pizza.

Looking good.

(Edit)

Btw, for the record.... biggest "handle-eater" on my system is javaw.exe, currently running Azureus, a java torrent client. Clocking in at 3,417 handles, it edges out explorer.exe's 2,551 handles.

The biggest CPU-Eater by far though is ObjectDock ... Guess I shouldn't have loaded it down with sysstats meters. Any chance OD+ is going to see reduced CPU usage over the older OD?
Reply #5 Top

OD+ must have a handle leak on your system. I have several docks and it's only using 488.  So something's leaking which will have to get fixed.  I would recommend unloading/reloading OD+ on your system.


My biggle handle eater is "svchost.exe" which I have no idea what one that one is.  Anything over 2,000 should be looked at darkly (I usually kill exporer once it's leaked out that many handles).

Reply #6 Top
Yeah, my OD+ is running at 1800 handles, and I just started it about two hours ago.
Reply #7 Top
(UPDATED) Well, I thought I fixed it by uninstalling and reinstalling, but it still seems to be leaking, whenever I open an application from a shortcut in OD+ the handles go up and no matter what I do they don't go down, that how I guess I got to 5,000 before.

Frogboy, I would post this and all my info on the newsgroup, but I'm having difficulty getting to them, do you or anyone else have a recommendation of an easy to use (free) newsgroup program (I've tried Outlook and it messed up, and Opera but I can only get it to read but not send)

and by the way after I get that fixed fixing that, svchost is also my biggest leak as well (with 1859 handles)

Here's Microsoft description of what svchost.exe is http://support.microsoft.com/?kbid=314056
Altough, I don't think its that clear (at least for me)

Again though, thanks for pointing this out, I now know one more thing to check when my system starts acting wierd.
Reply #8 Top
Why DOES xp need more than one svchost running at a time?
Reply #9 Top
yeah, if you go to run and type in "services.msc" you can manage the services your computer uses. svchost manages those services. I don't know why WinXP uses that many instances of svchost at a time though. I find that kinda wierd.
Reply #10 Top
I think I remember there being a differen't svchost for every network connection... Or something. There's some kind of reasoning to it though.
Reply #11 Top

SVCHost.exe is a generic process that programs can use to hide themselves behind so that you don't know what they are.


And it annoys me because it has allowed certain..companies to claim that the "native" (read: BUNDLED) visual style engine uses no resources while WindowBlinds (wbload.exe) uses more. One of those svchost.exe's is the theme service and I suspect it's using several times more memory than WindowBlinds does.

Reply #12 Top
Can you assign hotkeys to certain objects, to make just one object appear, or is it for the whole shebang, making them all appear?

Currently I'm using Avant browser which is using IE to render or whatever, I have 9 tabs open and using 20mb of mem, and 474 handles. Worth taking a look if you don't want to move away from IE to another browser.

I Killed of one svchost that had about 30mb mem usage, (theme service disabled already) and my system is still running find and dandy.

If I could just find a way to use my computer without explorer I'm laughing
Reply #13 Top
Right now I have two IE windows up, I'm running ObjectBar, ObjectDock and DesktopX, I've also got a shitload of small programs that mimic OS X up, miRC, AIM, Azureuz etc.

I'm using 460MB RAM and 22290 handlesm I have 5 scvhost.exe running, the biggest being 7,8MB the rest is at about 1,1MB each. Azureuz is taking the most RAM at 46MB with explorer.exe right behind it at 37MB. IE is at 22MB.

It's kinda fun looking at this, I'm very pleased with the Stardock apps, they don't use nearly as much as what I would except from such intensive apps. ^^ Great job.
Reply #14 Top
"But Internet Explorer, for some reason, feels like it needs to suck up 20 megs for each window. I have 5 Internet explorer windows open using a total of 60 megabytes of RAM and about 1,400 handles. Give it time though and it will grow. "

*hugs Firefox's tabbing...with 54MB being used and 288 handles...
Reply #15 Top
Heh.... "Exception: eOutOfResources" from motherboard monitor 5... That's what I get for testing this handle limit.... 15,000 handles dedicated to a single "leaky" application does tend to cause problems. I was much happier with XP before I found out about this limitation :O ...
Reply #16 Top
If you're talking about yhaving a spiderman 2 suite in the making, then that is definitely something I WIL BUY! That was my favorite movie ever!
Reply #17 Top
Fortunately the Internet Explorer multiple windows excessive handles problem is relatively easily overcome by using one of the several tabbed internet browsers available (such as MyIE2 for example). I am using one called iRider - I currently have 8 web pages open and it is using only 822 handles with one instance of svchost.exe using 1817 handles

I can't wait to see the new premium suite (Spiderman based, I assume). Great job with DesktopX by the way
Reply #19 Top
I would like to know too. I was shocked at how easily I brought my uber-stable box (XP 3200, 512mb Ram, nForce2 board) to its knees by having too many handles. This explains several mysterious slowdowns I get when there are too many apps open. I've had this box up for over 60 days without a reboot before, so it is otherwise stable.

Load up too many apps, several of which I now know are "handle-eaters" and it drops to its knees.

I can see now where slowdowns and related non-activity are coming from where there *should* be plenty of memory and CPU left. I think as more and more "things" are added to what users are running, that this limit on handles is something that really needs to be addressed.

What I'd like to know: Does Longhorn suffer from the same limit? What about 64-bit edition? Any advantage there from larger address spaces?
Reply #20 Top
My APC Powerchute "mainserv.exe" is using 62,536 handles, but only 2 threads and 948K.

I find what kills my system quickest is too much VM Size. SQL Server sucks the stuff like it's lemonade...
Reply #21 Top
Frogboy, you gotta see this! There are riots on the streets in Cupertino over the DX thing! It seems like EVERYONE in the mac world really cares about a little Windows app 'ripping them off'. They even burnt some people wearing MS shirts at the stake!!

Haha, juusstt kidding...actually, no one cares. So stop trying to pretend like anyone does! But those TiVo folk...I'd be pretty careful around them...

By the way, how did it come from TiVo again? You mean to tell me that TivO has a bunch of widgets that disappear from the screen when you hit the F9 key? Wow... that's...special.