[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: no.of threads using NPTL



Ulrich Drepper wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Saurabh Desai wrote:
> 
> > 1. test_str02 -l: creates bunch of threads and
> > waits in join til run out of resources.
> > With default stack size of 8M, it created
> > only 255 threads. With stacksize=64K, created
> > about 14000+ threads and completed in about
> > 25 secs.
> 
> When I run the test it hits some kernel limit which limits the number of
> threads.  This limit is, probably, dictated by the amount of RAM your
> machine has.  If you load it up you should get more threads.
> 
> WRT to the time: try 2.5.42 (just released).  I have seen some strange
> effects with 2.1.41.  The test_str02 test ran for 1:30min with 2.5.41
> and completes in 9secs with the 2.5.42 kernel for 8139 threads.

  I didn't see much difference between 2.5.41 and 2.5.42 with timings.
  The test_str02 -n 8192 completed in 3 to 3.5secs using NPTL and in 
  0.7secs using NGPT. 
  When I changed the number in /proc/sys/kernel/threads-max to 40000, 
  I was able to create 32748 threads using NPTL, but it took 3:15min to
  complete, compare to just under 3secs using NGPT.

  I tried with 16K stacksize (ulimit -s 16), but NPTL seg faults after
  32000+ threads creation.

 
Thanks,
-- 
Saurabh Desai





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]