Vista and "System Resources"

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
I have to admit, I run out of system resources in programs about once a week or so. It happens in Firefox, after browsing for a long time, and it just happened to me in Xnews.

Now, in order to preserve global system resources, I have my per-process system resources set downward from 10,000 to 8,000 or so, leaving 8,000 for the rest of the apps on the system. (It has both a per-process, as well as an absolute global limit.)

Does Vista do anything to alleviate these limited 16,000 or so system resource handles? I don't recall reading anything about this in MS's literature, so I'm assuming it is the same old thing as XP.

It's a shame that modern OS still struggle around hardcoded limits like these, when actual machine resources are increasing by leaps and bounds. Then again, if I were on a *nix box, I'd probably complain about running out of FILE handles in the kernel. At least on those systems, you can recompile for a higher number. I'm unaware of any solution for Windows.

Edit: Btw, if anyone remembers what the registry key is for setting the per-process resource limits under XP, then please post it. I seem to have forgotten it.
Found HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows
Both are set to 10000 though. I swear I remember setting one of them to 8000, but perhaps the repair install reset that value. Hmm.

Don't know why XNews is complaining then.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's a shame that modern OS still struggle around hardcoded limits like these,

The number of people running into these issues is probably in the single digits, I know I've never seen anything like that since Win9X.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
You're lucky then. You should see what a system looks like when it runs out of global GDI handles. It isn't pretty. Fonts get funky, clip regions get screwed up, repaints happen in the wrong areas, the whole system is a mess.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually I'd say the opposite, you're unlucky cause that never happens to most people. I've seen it happen in single apps (open a ton of IE windows, for instance) but never on a global scale on anything NT-based.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: BD2003
Same here...I havent run into a lack of "resources" since Win95.

Well there is a limit and buggy applications have been known to show it (I find flash hosted in IE a common culprit). I do question anyone that this happens to often. Killing the buggy app should return things back to normal.

Oh, btw to VL, the limit was 65k handles, not 16k
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
Originally posted by: bsobel
Oh, btw to VL, the limit was 65k handles, not 16k
I don't have the MS doc that I found that shows the registry settings handy, but I can assure you that the global limit is indeed ~16000. I've seen it personally. You're probably thinking of the fact that the GDI and user heaps were 64KB under Win9x.
(Which if you think about it makes certain sense, if the handles were expanded to 4 bytes each, then that would leave room for 16KB worth of them.)

Edit: those links take me to http://www.digitalfive.org/con...gdi-handle-limits.html , but that leads to a domain-parking page. :( The article sounded interesting, if it actually had a way to increase the limits (and not just the per-process limits). I guess we'll never know.

Edit: Thanks for the links, Bill, it appears that perhaps Vista does alleviate the handle issues seen with XP.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: VirtualLarry
Originally posted by: bsobel
Oh, btw to VL, the limit was 65k handles, not 16k
I don't have the MS doc that I found that shows the registry settings handy, but I can assure you that the global limit is indeed ~16000. I've seen it personally. You're probably thinking of the fact that the GDI and user heaps were 64KB under Win9x.

As I stated, 64k. You are thinking of Windows 2000 which was limited to 16k. Also, its not a global limit, its a per session limit.

(Which if you think about it makes certain sense, if the handles were expanded to 4 bytes each, then that would leave room for 16KB worth of them.)

It makes no sense as it doesnt' account for the heap data structures themselves.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
Ok, fine, "per session", but without concurrent session capability (eg. max sessions = 1), the limits are effectively global to most people.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: VirtualLarry
Ok, fine, "per session", but without concurrent session capability (eg. max sessions = 1), the limits are effectively global to most people.

I'm afraid that is incorrect as well. Xbox extenders are actually different sessions. Fast user switching uses different sessions (just because your not seeing concurrently USING the session does not negate the fact that your having multiple sessions anytime two people remain logged into the box). But the primary point was, the limit is 64k not 16k. I notice your usual response to accurate information is to try and divert on to some unreated side issue. How about, 'Oh, I would have sworn it was 16k, must have been 2k I was thinking of'
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
Ok, fine, "It must have been W2K I was thinking of". It's entirely possible that the doc I had was from the W2K era, the info you pointed me to was the first that I've seen that the number was 64K, but I know that in actuality, on my machine with 768MB of RAM, the number is no-where close to 64K. I ran out of GDI resources globally, and it seemed pretty close to 16000 to me. (10000 taken up by mozilla firefox, and the rest taken up by assorted apps and IE windows, IE is what pushed it over the top.)
 

t0mn8r

Member
Nov 6, 2005
49
0
0
VirtualLarry,
You will find that Vista memory and handle management are superior to XP.

Having said that and reading through the issues in this post I believe you will probably come across the same issue sooner or later due to buggy apps, not XP or Vista restrictions.

Not much help, just an opinion...

Good luck!

 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: VirtualLarry
Ok, fine, "It must have been W2K I was thinking of". It's entirely possible that the doc I had was from the W2K era, the info you pointed me to was the first that I've seen that the number was 64K, but I know that in actuality, on my machine with 768MB of RAM, the number is no-where close to 64K. I ran out of GDI resources globally, and it seemed pretty close to 16000 to me. (10000 taken up by mozilla firefox, and the rest taken up by assorted apps and IE windows, IE is what pushed it over the top.)

10k for Mozilla and you blame IE... Me thinks Mozilla has a nice GDI leak there. Are you on the latest?
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I've only run into problems with I had a GDI-leaky program. And only that program got affected. I think one time it actually screwed up the whole system though it was a while ago.