Max number of threads with NPTL

2004-02-04 Thread Daniel Malmkvist
Hi I was making som tests to see the maximum number of threads i could create with the new linux thread library (NPTL). I had heard foks having up to 100 000 threads at the same time so i wanted to try for my self. I used the 2.6.1 kernel with glibc with NPTL support, I used Sun JVM v1.4.2 wich s

Re: Max number of threads with NPTL

2004-02-04 Thread Nathan Bryant
Daniel Malmkvist wrote: To my supprise i could not have more then ~3500 threads at the same time. I got a OutOfMemoryException, but there was plenty of system memory left (the JVM only ha about 10% of system physical memory). Address space might be a limiting factor in a 32-bit machine. Assumin

Re: Max number of threads with NPTL

2004-02-04 Thread Hui Huang
Nathan Bryant wrote: Daniel Malmkvist wrote: To my supprise i could not have more then ~3500 threads at the same time. I got a OutOfMemoryException, but there was plenty of system memory left (the JVM only ha about 10% of system physical memory). Address space might be a limiting factor in a 32

Re: Max number of threads with NPTL

2004-02-04 Thread Vincent Touquet
On Wed, Feb 04, 2004 at 09:56:57AM -0800, Hui Huang wrote: >Default stack size is 512k. You need 3500 * 512k = 1750M address space >for 3500 threads. Try -Xss96k. Also check your limit on max #processes >(ulimit -u), you can't create more threads than that limit either. Is there a common place whe

Re: Max number of threads with NPTL

2004-02-04 Thread Hui Huang
Vincent Touquet wrote: On Wed, Feb 04, 2004 at 09:56:57AM -0800, Hui Huang wrote: Default stack size is 512k. You need 3500 * 512k = 1750M address space for 3500 threads. Try -Xss96k. Also check your limit on max #processes (ulimit -u), you can't create more threads than that limit either. Is th

Re: Max number of threads with NPTL

2004-02-04 Thread nmeyers
On Wed, Feb 04, 2004 at 07:06:24PM +0100, Vincent Touquet wrote: > On Wed, Feb 04, 2004 at 09:56:57AM -0800, Hui Huang wrote: > >Default stack size is 512k. You need 3500 * 512k = 1750M address space > >for 3500 threads. Try -Xss96k. Also check your limit on max #processes > >(ulimit -u), you can't

Re: Max number of threads with NPTL

2004-02-04 Thread Daniel Malmkvist
Hi I have successfuly folowed your advise. After rekompiling the kernel so that I now can address 4G of memory, change the max #processes plus changed the thread stacksize i now can create more than 12 000 threads (which is pretty cool i thing), the limit must now be the 4G addressspace limit.