public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Schwartz <davids@webmaster.com>
To: <joeja@mindspring.com>,
	"linux-kernel@vger.redhat.com" <linux-kernel@vger.kernel.org>
Subject: Re: max number of threads on a system
Date: Thu, 21 Mar 2002 21:49:15 -0800	[thread overview]
Message-ID: <20020322054916.AAA14361@shell.webmaster.com@whenever> (raw)
In-Reply-To: <RELAY2HXrsOZoybKw2N00004110@relay2.softcomca.com>



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 a simple program that creates an array of threads and it locks up at
>the creation of somewhere between 250 and 275 threads.

	If it locks up, that's a bug. I remember older versions of glibc actually 
had this bug. But it should simply fail to create them.

>The program just hangs indefinately unless a Control-C is hit.
>
>How can I increase this number or can I?

	Why increase the number of threads you can create before you trigger a bug? 
Wouldn't it make more sense to *fix* the bug so that pthread_create returns 
an error like it's supposed to?

	In any event, don't create so many threads. Create threads only to keep CPUs 
busy or to pend I/Os that can't be done asynchronously.

	DS



  reply	other threads:[~2002-03-22  5:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-22  1:05 max number of threads on a system joeja
2002-03-22  5:49 ` David Schwartz [this message]
2002-03-22  6:02   ` Davide Libenzi
2002-03-22 15:34     ` Bill Davidsen
2002-03-22 15:42       ` James Bourne
2002-03-23  3:14         ` Bill Davidsen
2002-03-25  9:10           ` Peter Wächtler
2002-03-22 17:35       ` Davide Libenzi

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=20020322054916.AAA14361@shell.webmaster.com@whenever \
    --to=davids@webmaster.com \
    --cc=joeja@mindspring.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