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

Re: Maximum number of threads



Ulrich Drepper wrote:

Hrvoje Niksic wrote:

{frost}[~/c]$ ulimit -s 48
{frost}[~/c]$ ulimit -u 100000
{frost}[~/c]$ ./a.out 10000
Creating 10000 threads...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
28 29 30
[...]


Did you change /proc/sys/kernel/threads-max?

Yes, that would be the one I missed; the default was something like 6140 or so. Interestingly enough, different installations of the same kernel have different defaults for that parameter; perhaps the default is set to a "reasonable" value computed from the amount of physical memory?

The pid_max setting is also a good parameter to bump for the people who need truly gigantic numbers of threads. Thanks for the pointers.






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