mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "joeja@mindspring.com" <joeja@mindspring.com>
To: "davidel@xmailserver.org" <davidel@xmailserver.org>,
	"davidsen@tmr.com" <davidsen@tmr.com>,
	"davids@webmaster.com" <davids@webmaster.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: Re: max number of threads on a system
Date: Fri, 22 Mar 2002 13:36:04 -0500	[thread overview]
Message-ID: <RELAY3vnamiODNFYHpZ00003e73@relay3.softcomca.com> (raw)

> > > On Thu, 21 Mar 2002 20:05:39 -0500, joeja@mindspring.com wrote:
> > > >What limits the number of threads one can have on a Linux system?
> > >
> > > 	Common sense, one would hope.

I have none of that ;-).  No this is actually a test.  The only reason I'm even looking into pthreads is portability.  While this may be an excessive amount of threads if the box has he capacity then I'd want to take advantage of that for batch jobs. 

> > $ ulimit -u

unlimited

> /proc/sys/kernel/threads-max is the system limit. And "locks up" is odd
> unless the application is really poorly written to handle errors. Should
> time out and whine ;-)

This file shows 8192.  

>Around 250 was the old limit for max user processes ( non root ), if i
>remember well.

In 2.4.17 that seems to be what I'm hitting.  Actually it is 254.

How long before it times out?

thread number = 254  rc = 0

On thread 255 it does error out, however if I call exit then the program hangs.

This hangs:
if (rc > 0) { return -1;}

This hangs:
if (rc > 0) { exit(-1);}

This works:
if (rc > 0) { goto EXIT ;}

where exit is:

EXIT:
    calls pthread_join();

It would seem that the functionality and behavior of threads on Sun is different from that of Linux.   

Joe


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


             reply	other threads:[~2002-03-22 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-22 18:36 joeja [this message]
2002-03-23  3:19 ` Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=RELAY3vnamiODNFYHpZ00003e73@relay3.softcomca.com \
    --to=joeja@mindspring.com \
    --cc=davidel@xmailserver.org \
    --cc=davids@webmaster.com \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®