From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,7e8643749c0b7188 X-Google-Attributes: gidfa528,public X-Google-Thread: ffc1e,7e8643749c0b7188 X-Google-Attributes: gidffc1e,public X-Google-ArrivalTime: 2001-03-23 05:41:37 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!wn2feed!worldnet.att.net!4.24.21.153!chcgil2-snh1.gtei.net!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Message-ID: <3ABB5104.B3F25D96@compaq.com> From: Dave Butenhof X-Mailer: Mozilla 4.76 [en] (X11; U; OSF1 V5.0 alpha) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64,comp.programming.threads Subject: Re: How to Raise maxuthreads quota (256) References: <3ABA7709.2EFF6639@opteway.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 23 Mar 2001 08:35:01 -0500 NNTP-Posting-Host: 16.31.48.112 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 985354501 16.31.48.112 (Fri, 23 Mar 2001 05:35:01 PST) NNTP-Posting-Date: Fri, 23 Mar 2001 05:35:01 PST Organization: Compaq Computer Corporation Xref: supernews.google.com comp.unix.tru64:1935 comp.programming.threads:3316 francois reygagne wrote: > I run an application test on linux which spawn 200 volatile threads per > second > during 5 minutes to make a traffic jam to the server. On Linux, its > works well . > > But on OSF I receive this warning message > WARNING -- process concurrency may be reduced: > number of blocked threads exceeds maxuthreads quota (256) > > SYSTEM=OSF1 V5.0 1094 alpha > > How to raise the max of threads per process or for the workstation. I argued strongly against this annoying message, but lost. At least it only fires once. What this message means goes into the depths of the Tru64 UNIX 2-level scheduling implementation. We work hard to maintain the maximum process concurrency, with one "kernel entity" for each available processor. When a thread blocks in the kernel (e.g., for I/O), the kernel generates an "upcall" on a "replacement thread" so that the user-mode scheduler can continue to utilize the abandoned processor. However, if those blocked threads remain blocked for a substantial period of time, the quota may prevent the kernel from creating additional kernel entities for you. That's when it generates this message. You now may have POSIX threads in the process that are ready to run, but cannot until some I/O completes. You have 254 threads simultaneously blocked in the kernel. That is not an efficient or scalable design. If you really want to do this, you need a larger thread quota. On Linux (or any "one to one" kernel thread implementation) you can't even create more threads than can simultaneously block, so you would never see something like this. On the other hand, in Linux you can't even create more threads than your "kernel entity" quota; and most of the time, they DON'T all need to block simultaneously. One can argue persuasively that either strategy is better, but reality is never that simple. Of course, you can always create all your threads with system contention scope on Tru64 UNIX (pthread_attr_setscope (attr, PTHREAD_SCOPE_SYSTEM)). That'll simply fail when you've exhausted your quota of kernel threads, and you won't see this symptom. It'll still be a bad application design, but you won't need to notice. ;-) /------------------[ David.Butenhof@compaq.com ]------------------\ | Compaq Computer Corporation POSIX Thread Architect | | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | \-----[ http://home.earthlink.net/~anneart/family/dave.html ]-----/