From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,bf2ea6865e8fab59 X-Google-Attributes: gidfc89c,public X-Google-Thread: 10650a,bf2ea6865e8fab59 X-Google-Attributes: gid10650a,public X-Google-Thread: fee84,bf2ea6865e8fab59 X-Google-Attributes: gidfee84,public From: heiby_u@falkor.chi.il.us (Ron Heiby) Subject: Re: Lots of Threads = Death? Date: 1998/04/30 Message-ID: <3547819c.27638403@149.174.211.108>#1/1 X-Deja-AN: 348960827 Content-Transfer-Encoding: 7bit References: <35464b25.29547822@149.174.211.108> <35472D6A.145BBC1A@brighttiger.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Strategis Consulting Inc. Newsgroups: comp.unix.osf.osf1,comp.unix.internals,comp.unix.programmer Thanks to Dirk and Jeff for their quick responses. I have not had a chance to re-tune my kernel yet, to try either of their suggestions. Jeff suggested that I bump vm-vpagemax. Since the problem I ran into happens quite close to 128Meg, and the vm-vpagemax parameter is set at its default value of 16384 pages (128Meg), I'm guessing that that is the immediate problem. Dirk suggested that I bump vm-mapentries. The vm-mapentries parameter certainly sounds like it would / should be involved here, as well. But, I am confused by what I read in Dirk's article and the "System Tuning and Performance Management" manual (AA-Q0R3D-TE). Dirk Grunwald wrote: > each stack entry requires one or more 'pmap' entries. A pmap is a > range of virtual -> physical mappings that share the same acccess > permissions. > > Threads tend to chew up a lot of map entries because each heap uses > two protection areas (one that is writable, and the guard page that is > not accessable). This makes sense. > I think that kernel parameter is called 'vm-mapentries'. According to the manual, that is, indeed, the parameter involved in this. My confusion is that my parameter is currently set at the default value of 200. Yet, I'm managing to create over 3700 threads before getting into trouble. I would think that each thread would require 2 of the 200 vm-mapentries (at least) -- one for the stack and one for the guard. This would tend to say to me that I should have been able to create just under 100 threads. I hope that the source of my confusion is evident.