Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Microsoft

Maximum Number of Open Windows under Windows? 34

Triones asks: "I have found that Windows 2000 has a limit on the number of distinct windows that can be opened. W2K cannot open more than around 70 distinct windows (duplicate IE's on the same url don't count) even when it has 50Mb free phyiscal memory and much more in system cache. The max I can get is about 75 windows. Similar limits on machines with 256Mb or 512Mb ram. Some of my friends have reproduced this phenomenon on their systems. (By the way, no such problem with Linux (Redhat, XFree86, Gnome, Sawfish)). Is it related to the graphics 'resource' (GDI?) in Windows? Is there a parameter that can be tuned to increase the limit? If this is a 'flaw', is it fixed in XP?"
This discussion has been archived. No new comments can be posted.

Maximum Number of Open Windows under Windows?

Comments Filter:
  • I don't think its a flaw, but its not a feature either. Probably what happens is that it just runs out of resources, and can't open any more windows.
    Linux just has better resource managment, but I'm sure it has its limit aswell.
  • 90 for me (Score:2, Insightful)

    by Red Moose ( 31712 )
    I know that each instance of IE needs around 10-15 MB, and bad resource management like that - stealing RAM and swap for each app instance no matter what it's used for - contributes.

    OK, I just opened 90 Notepads. Only 128MB RAM, on Windows 98SE. I guess Notepad isn't IE.

    Also, on linux, I was under the impression that the virtual terminals *were* limited - when you compile a kernel the default is 256 ptys; I may just be utterly wrong here, but I thought that meant there was a 256 virtual terminal limit. I would presume it also applies to X - but does X open all of it's stuff in a single console terminal?

    • Re:90 for me (Score:4, Interesting)

      by sigwinch ( 115375 ) on Sunday October 28, 2001 @03:45PM (#2490175) Homepage
      Also, on linux, I was under the impression that the virtual terminals *were* limited - when you compile a kernel the default is 256 ptys; I may just be utterly wrong here, but I thought that meant there was a 256 virtual terminal limit.
      True, although 256 ptys is probably more than enough for any single-user system. If you need more you can build a kernel that supports (IIRC) 2048 ptys.
      I would presume it also applies to X - but does X open all of it's stuff in a single console terminal?
      Ptys look like a serial port to the downstream process, but upstream is another process instead of serial port hardware. Thus they're only used for things like terminal emulators that really need serial port compatibility. Most X programs don't use them.
    • first of all, the newer linux kernels support both BSD and Unix98 style pseudo-terminals. both can coexist on the same system. redhat 6.2 for example uses BSD style for text virtual consoles (/dev/tty1 - /dev/tty6 by default), and Unix98 style (/dev/pts/0 - /dev/pts/255) for X-based terminals and remote terminals.

      also, native X-Windows programs (excluding things like xterm and rxvt) do not usually open pseudo-terminals for themselves (you can see this using lsof or even ps). i think they utilize some feature of the X-Windows protocol to have the X server send messages to the console on their behalf (never done any X programming so not sure how that works). so while there may be a software-imposed limit to the number of xterms i could open, there isnt one for the number of games of xbill i could open.

      mmm....hundreds of millions of dead Bill's...

      see /devices.txt and console(4) for more info...

      --Siva
    • I can only open 250 notepads on winXP, with 256mb ram. But I can also close them all with two clicks, (task grouping). I can only open 80 gedits in redhat 7.1 before it starts swap disking.

  • Resource limitations (Score:4, Interesting)

    by man_ls ( 248470 ) on Sunday October 28, 2001 @10:45AM (#2489524)
    IE uses about 10 MB of "memory" (swap or physical) per instance. You're right that duplicate URIs don't count; it probably has something to do about it is just displaying the same instance twice, not actually spawning a new one.

    Office 2000 apps require in the range of 40MB of free memory. SCSIFiberPro 32 uses about 2MB. Winamp, Morpheus, etc. use 5-10 each.

    That's not that much, however. What's really draining your memory is probably the services you're running.

    LSASS uses only 1MB, so thats not a big deal, but SVCHOST uses 8-10, services.exe uses 10-ish, most of the others are in the 5-10 range, but there's about a dozen of them. With nothing running except for the services, I use 90MB of physical memory; it's about 105 when using IEXPLORE on top of that.

    Windows doesn't have the best resource mangment available. However, Win 2K has considerably better than Windows 9x does - you'd crash long before you opened 70 some windows in one of those OSes.

    (All numbers taken from the processes tab of Task Manager.)

    JKoebel
  • by Anonymous Coward
    Win2k doesn't really have a limit to window handles. Using a foreverlooping .bat-file I opened about 500 notepad windows before hitting the page file (512MB RAM). It all depends on how much memory you've got...
  • Internally, windows is not smart enough to distigush between a top-level windows and a control. Therefore, I can say with some certainity, that there is no built in limit on top-level windows. So far, everyone is mentioning resource constraints and I'd have to agree with this.
    • Every native control in Windows has its own window handle. There's a zillion window handles available, and this lets you do some pretty funky things if you want to have some fun coding. For that reason, I wouldn't call it stupidity- it's just by design. (It's not a bug, it's a feature! Stop complaining or we'll charge you extra for it.)
  • this way if you need more open windows you can get the enterprise server edition and spend an extra bunch of cash.
    BTW what the hell do you need to open that many windows for? you don't even have grouping on your taskbar or the ability to create several workspaces/desktops and ALT-arrow between them like we do under Linux/Gnome. I can see your taskbar with each pixel representing a window must be real ..'userfriendly'.
    • I meant CTRL-ALT-Arrow, not Alt-Arrow.
    • Matrox video drivers come with something called 'Quick Desk' that allows multiple desktops. I use it with NT4 at work... The keystroke for switching between them is configurable. The taskbar only shows the windows on the desktop you're on too.
      • Multiple desktops have been available since 3.x. Central Point had a shell replacement that set up 3 desktops. Litestep, and I'm sure other replacement shells for explorer, have vwm's available.

        I currently have 4 desktops under litestep, which is plenty for me. The docs for the vwm don't appear to give a limit to the size, but I would think anything bigger than 3x3 or 4x4 is impractical.
    • by Siva ( 6132 )
      BTW what the hell do you need to open that many windows for?

      for porn, silly :P

      --Siva
    • I use a great little tool called JSPager to give me multiple desktops under Win2000.

      http://hem.fyristorg.com/jspage/

      Andrew
    • I have grouping on MY windows taskbar AND the ability to create several desktops with a nice utility called JSPager. Taskbar grouping is one of the reasons I switched to XP.

      Now the big question becomes "What to do with all these open prOn sites? ;-P "
    • ...what the hell do you need to open that many windows for...


      I've seen a performance testing suite that simulated multiple simultaneous users to test remote cgis. It opened a window for every user and would probably run into trouble if it was being used to do stress testing.
  • by miket ( 4882 ) on Sunday October 28, 2001 @12:29PM (#2489706) Homepage
    Disclaimer: I write drivers for Windows 2000 and Windows.NET (I did not name it). The following does not apply to Windows 9x (including Me).

    The long answer is that the limit is dependant on the amount of memory in your system as well as a number of other factors.

    The first factor is the amount of memory. This includes RAM and the page file. The second factor is the size of the each process running on the system. If you are openning a new process for each "window" (it was not clear from the description) then the amount of memory consumed is much higher than the amount of memory consumed by each new window in the same process. The third factor, and this is the big one, is the size of the file system cache. Windows dynamically decides how much memory should be devoted to file system cache at boot time and that limits the amount of memory available for everything else in the system (including other components of the operating system). The formula that Windows used to determine the optimal size of the file system cache takes into account many factors.

    When available memory begins to run low then new processes may not be able to start and new windows may not be able to be created.

    (correct email: miket@NOSPAM.telocity.com w/o the NOSPAM)
  • I think you answered your own question, except it's not so much related to GDI limits as it is GDI limits. I'm not up on the topic myself, but I'm sure there are many excellent resources to be found with a simple Google [google.com] search.
  • Who needs that many windows?
  • Desktop heap size (Score:4, Informative)

    by mjg ( 21046 ) on Monday October 29, 2001 @07:47AM (#2492011)
    There is a form of limit in Windows that affects the NT family of systems - usually referred to as the "desktop heap". Hitting the limit is manifested as either a DLL initilization error for USER32.dll or an out of memory error. Fortunately, the limit it tweakable (after NT 4 Service Pack 2 at least), but the default settings are low enough that the limit is easily hit.

    To tweak the limit, take a look in the registry at HLKM/System/CurrentControlSet/Control/Session Manager/SubSystems - there is a key called "Windows" that contains (among other things) "SharedSection=1024,3072". Changing the SharedSection entry to "1024,3072,512" increases the size of the "hidden" desktop heap. If that doesn't work, try increasing the second of the comma delimited values (e.g. 3072 -> 4096), which is the size limit of any particular desktop heap.

    I'm not sure if this is the limit the poster of this Ask Slashdot is hitting, but I do know that we have problems with this particular limit at work. We run an interpreted language/database/remote development environment, including customer applications as Windows Services. After stopping and starting the service multiple times, we get a USER32.DLL error for one or more of the executables running under that service - the only resolution is to reboot the machine, even after applying the aforementioned registry tweaks.
  • While obviously if your short on memory you can't open very many windows. But in MS Windows, everything is given a GDI number. Its kind of like a pointer, but more crappy. It was a way for them to save memory in the Windows 3.1 days. In Windows 9x the number of GDI's were tripled, and they should be increased more in XP (each program gets as many GDIs as all of Windows 9x IIRC). However, I do not think there is an improvement from Windows 2000.
  • We've ALL (yes you have, c'mon, admit it) been to those pr0n sites that open more browser windows than you can handle, and ever time you close one, it opens three more.
    Back when I only had 64MB ram, win98SE would choke and die at about 35 windows of netscape...
    Now with 512MB it can handle about 60 or so...Can't really count then because as someone said before, each task in the task bar is only about a pixel wide.
    I wish my wife would get up the gumption to learn X/KDE so I can clean this virus off my computer and stop dual booting....
  • by serutan ( 259622 ) <snoopdoug@geekaz ... minus physicist> on Tuesday October 30, 2001 @06:20PM (#2499792) Homepage
    Maybe I'm missing the point, but would even a hard-coded max of 70 actually limit anyone's use of Windows in any meaningful sense?

    An example of how this limitation would affect anybody would be interesting.
    • Hi.

      I've hardly posted to Slashdot, before, but I felt I wanted to, now, because finally I've found somebody else mention this problem, as well.

      As others have pointed out, it's a limit of the GDI-resources, and it's independent of how much memory you have.

      I actually got 256 MB more in my PC (so I now have 384 MB), because I thought it was a memory problem, without it helping, at all.

      I have 384 MB RAM, and I can't have 100 windows?! That's stupid!

      This is actually one of the worst things I know about Windows, and yes, I'm using Windows 2000, the same limitation is there.

      I had 4 MB RAM on my Acorn Archimedes computer, and I never ran into this problem, there. I had just as many windows open.

      They got this right in 1989. Now, 12 years later, and with incredibly more powerful hardware, they still haven't got it right, in Windows. That says some.

      It was asked for an example of how this limit would affect anybody, and I'll happily give that.

      I tend to run into this limit, daily, and I think this limit, and the feature that you can't have the input focus at any other window than the top one (it automatically pops to top), to be some of the most annying things about Windows.

      How I run into this limit?

      It's simple. I tend to open IE windows in separate windows, so I don't get interrupted from the current one, and don't have to wait for them to load, to continue.

      That also makes it easy to go to the other pages, instantly.

      It's very convenient.

      For example, I can read an article, and open any links in it, in new windows, so I don't get interrupted from the current article, and can go to them, later.

      That means I don't get interrupted, and don't have to hunt for links, later.

      Unfortunately, this conveniency is limited by the stupid limit in Windows.

      Has anybody else had problems with this limit? Or are you all just using one window, and jumping in and out of the current article, when following links, and using the Back-button to get back?

      Isn't that very disturbing on the reading?

      Wouldn't it be better to have it in separate windows?

      I've found using separate windows to be a better way of using the browser.

      Regards,

      Terje

      P.S. Has anybody else found all this "My"-stuff to be incredibly infantile? "My Computer", "My Documents", My, My, My! Like a baby.

      There's a very good article [salon.com] on Salon, about this.
    • Oh, and by the way, I'm not using Linux, so my posting wasn't a plug for Linux. :)

      One poster mentioned that some may use this limit in Windows, to plug Linux, even if the limit is irrelevant for them.

      I'm using Windows, and I can assure you the limit is very relevant.

      In my opinion, there shouldn't be a hard-coded limit on the number of windows, in an operating system.

      When the size isn't known in advance, use e.g. std::vector, not arrays, and you solve it. :)

      Terje

UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Working...