Maximum number of threads

G. S. Hayes sjdevnull at yahoo.com
Thu Sep 30 18:43:37 CEST 2004


Jeremy Jones <zanesdad at bellsouth.net> wrote in message news:<mailman.4084.1096472866.5135.python-list at python.org>...
> > I don't think Linux creates a new process for each thread.  Sure seems 
> > like this would have to be something related to python since 2.2 could 
> 
> Versions of RedHat prior to 9 did something that made it appear that 
> each thread was a process.

Older versions of ps/top showed all threads instead of just processes.

You can still see them with the right flags (e.g. the H option to
ps, "ps auxH").

> I think it's probably an OS limitation.  I kicked off the same script on
> Windows XP that I kicked  off on FC2 and XP was able to generate over 
> 2000 threads as opposed to around 400 for FC2.

I have no problems creating 2000 threads in FC2 from C.  haven't tried
it in python.  Resource limits are the first issue that comes to mind
for me, followed by kernel versions (esp. if you're running a 2.2 or
earlier kernel for some reason).



More information about the Python-list mailing list