All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: Irfan Habib <irfan.habib@gmail.com>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Maximum number of processes in Linux
Date: Tue, 15 Aug 2006 20:22:19 +0200	[thread overview]
Message-ID: <20060815182219.GL8776@1wt.eu> (raw)
In-Reply-To: <Pine.LNX.4.61.0608151419120.13947@chaos.analogic.com>

On Tue, Aug 15, 2006 at 02:22:02PM -0400, linux-os (Dick Johnson) wrote:
> 
> On Tue, 15 Aug 2006, Irfan Habib wrote:
> 
> > Hi,
> >
> > What is the maximum number of process which can run simultaneously in
> > linux? I need to create an application which requires 40,000 threads.
> > I was testing with far fewer numbers than that, I was getting
> > exceptions in pthread_create
> >
> > Regards
> > Irfan
> 
> #include <stdio.h>
> int main(){
>      unsigned long i;
       ^^^^^^^^^^^^^^^^

>      while(fork() != -1)
>          i++;
>      printf("%u\n", i);
>      return 0;
> }
> $ gcc -o xxx xxx.c
> $ ./xxx
> 
> 1251392833         <<---- At least this number

Dick, would you please initialize your local variables when you send
examples like this ? You should have been amazed by one billion processes
on your box, at least.

> 1251392834
> 1251392834
> 1251392834
> 1251392834
> 1251392833
> 1251392833
> 1251392834
> 1251392834
> 1251392834
> ^C
> $ killall xxx
> 
> BYW 40,000 threads? 40,000 tasks all sharing the same address space?
> Hopefully this is just a training exercise to see if it's possible.
> 
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.16.24 on an i686 machine (5592.62 BogoMips).
> New book: http://www.AbominableFirebug.com/

Regards,
Willy

  reply	other threads:[~2006-08-15 18:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 17:59 Maximum number of processes in Linux Irfan Habib
2006-08-15 18:12 ` Stephen Hemminger
2006-08-15 18:22 ` linux-os (Dick Johnson)
2006-08-15 18:22   ` Willy Tarreau [this message]
2006-08-15 19:01     ` linux-os (Dick Johnson)
2006-08-15 19:13     ` linux-os (Dick Johnson)
2006-08-15 19:13       ` Willy Tarreau
2006-08-15 19:19       ` Arjan van de Ven
2006-08-15 19:26         ` Irfan Habib
2006-08-15 21:50           ` Avi Kivity
2006-08-16 10:01       ` Helge Hafting
2006-08-16 11:33         ` linux-os (Dick Johnson)
2006-08-17  8:00           ` Mike Galbraith
2006-08-16 11:58         ` Alistair John Strachan
2006-08-15 18:29   ` linux-os (Dick Johnson)
2006-08-15 18:37 ` Alan Cox
2006-08-15 21:00 ` Valdis.Kletnieks
     [not found] <fa.evUDdOgjejpeNWKvgan3aKFF880@ifi.uio.no>
2006-08-15 23:12 ` Robert Hancock
2006-08-15 23:39   ` Michael Buesch
2006-08-16  0:04   ` Lee Revell

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=20060815182219.GL8776@1wt.eu \
    --to=w@1wt.eu \
    --cc=irfan.habib@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.