Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > maximum number of threads

Reply
Thread Tools

maximum number of threads

 
 
Cecil Westerhof
Guest
Posts: n/a
 
      01-11-2007
Felipe Almeida Lessa wrote:

> $ python test.py
> 50
> 100
> 150
> 200
> 250
> 300
> 350
> Exception raised: can't start new thread


I tried your script on a PII 300 MHz and only 150 MB. I broke it of when it
reached more as 1,25 million. ;-}

 
Reply With Quote
 
 
 
 
Hendrik van Rooyen
Guest
Posts: n/a
 
      01-12-2007
"William Heymann" <(E-Mail Removed)> wrote:


> So you know I tried this on ubuntu edgy 64bit edition on a dual 2218 opteron
> system with 8G of ram and I got
>
> <lots of output>
> Exception raised: can't start new thread
> Biggest number of threads: 32274
>


This almost looks as if the number of threads is a sixteen bit signed int...

- Hendrik

 
Reply With Quote
 
 
 
 
Ganesan Rajagopal
Guest
Posts: n/a
 
      01-12-2007
>>>>> Felipe Almeida Lessa <(E-Mail Removed)> writes:
>>
>> to modify the maximum number of user process (AFAIK each thread use a
>> process entry on Linux)


> I don't think it's only this.


It isn't that at all. The default Linux POSIX threads stack size is
8MB. Linux user space is 3GB (Kernel is mapped at upper 1GB).

382 * 8 = 3056MB.

Basically, you're running out of address space. I don't know if you have any
control at python level. In C you can call pthread_attr_setstacksize().

Ganesan

--
Ganesan Rajagopal

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum number of threads - error mark Java 6 11-27-2006 07:22 AM
Creating the maximum number of menus and maximum number of stills rossco DVD Video 2 11-24-2005 09:33 PM
Maximum number of threads Kirby Angell Python 7 10-04-2004 05:52 AM
The number name 'System.Web.UI.WebControls' contains more than the maximum number of prefixes. The maximum is 3. mayur ASP .Net Web Controls 2 07-16-2004 05:14 PM
The number name 'System.Web.UI.WebControls' contains more than the maximum number of prefixes. The maximum is 3. mayur ASP .Net 2 07-02-2004 10:35 AM



Advertisments