[opensuse] max number of threads limitation on suse
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
The system-wide maximum is: cat /proc/sys/kernel/threads-max I have a system where it says '147456', another says '12287', another '111796'. I don't know what this number is based, but you can probably change it by: echo 999999 >/proc/sys/kernel/threads-max -- Per Jessen, Zürich (6.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Friday, November 11, 2011 10:48:37 AM Per Jessen wrote:
Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
The system-wide maximum is:
cat /proc/sys/kernel/threads-max
I have a system where it says '147456', another says '12287', another '111796'. I don't know what this number is based, but you can probably change it by:
echo 999999 >/proc/sys/kernel/threads-max
It could be based on available memory - and I think also on available PIDs in the system. But this is a generic Linux question, independend of openSUSE, so treat it as a Linux question when googling, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andreas Jaeger wrote:
On Friday, November 11, 2011 10:48:37 AM Per Jessen wrote:
Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
The system-wide maximum is:
cat /proc/sys/kernel/threads-max
I have a system where it says '147456', another says '12287', another '111796'. I don't know what this number is based, but you can probably change it by:
echo 999999 >/proc/sys/kernel/threads-max
It could be based on available memory
I think so too - for the numbers above: 147456 - 8Gb RAM 111796 - 7Gb RAM 12287 - 768Mb 77824 - 4Gb (64bit system). There is also a default thread stack size, I think - that probably plays a role too. -- Per Jessen, Zürich (6.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/11/11 05:05, Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
Do you really need more than 32000 threads running *simultaneously* ? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 16 November 2011, Cristian Rodríguez wrote:
On 11/11/11 05:05, Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
Do you really need more than 32000 threads running *simultaneously* ?
cat /proc/sys/kernel/threads-max You can increase it but check your ulimit settings too. See http://stackoverflow.com/questions/344203/maximum-number-of-threads-per-proc... cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/11/11 21:08, Rüdiger Meier wrote:
On Wednesday 16 November 2011, Cristian Rodríguez wrote:
On 11/11/11 05:05, Mahan Mahdavi Amiri wrote:
Is there a limit on number of threads on suse ? we ran java test program to determine the maximum number of thread and it shows 32000. Is there anyway to increase the maximum number of supported threads on suse. Thanks.
Do you really need more than 32000 threads running *simultaneously* ?
cat /proc/sys/kernel/threads-max
You can increase it but check your ulimit settings too. See http://stackoverflow.com/questions/344203/maximum-number-of-threads-per-proc...
From that link read the comments from "jalf" and from "twk", in short if you need that many threads you are almost certainly, doing it wrong.
My deepest condolences for your hair, it will fall out due the number of deadlocks and races that you will have to debug. :-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 16 November 2011, Cristian Rodríguez wrote:
On 15/11/11 21:08, Rüdiger Meier wrote:
You can increase it but check your ulimit settings too. See http://stackoverflow.com/questions/344203/maximum-number-of-threads -per-process-in-linux
From that link read the comments from "jalf" and from "twk", in short if you need that many threads you are almost certainly, doing it wrong.
My deepest condolences for your hair, it will fall out due the number of deadlocks and races that you will have to debug. :-)
Yup, but the question was not whether it's good or not... just trust the user and answer his question. Another question might give another answer. I remember the the gzip/pigz thread on factory list where I was one of the single thread voters :) cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 16 November 2011, Rüdiger Meier wrote:
On Wednesday 16 November 2011, Cristian Rodríguez wrote:
On 15/11/11 21:08, Rüdiger Meier wrote:
You can increase it but check your ulimit settings too. See http://stackoverflow.com/questions/344203/maximum-number-of-threa ds -per-process-in-linux
From that link read the comments from "jalf" and from "twk", in short if you need that many threads you are almost certainly, doing it wrong.
My deepest condolences for your hair, it will fall out due the number of deadlocks and races that you will have to debug. :-)
Yup, but the question was not whether it's good or not... just trust the user and answer his question.
But, sorry I've just subscribed to this list and haven't noticed that the topic has been solved already. So your additional comment is of course satisfied. cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Cristian Rodríguez wrote:
From that link read the comments from "jalf" and from "twk", in short if you need that many threads you are almost certainly, doing it wrong.
jalf's post is just wrong isn't it? Stack space is private per process vrtual address so the system won't run out of address space no matter how many stacks are allocated (well, OK, it will when the kernel's control blocks grow to such a size!). The points about context switching etc are correct.
My deepest condolences for your hair, it will fall out due the number of deadlocks and races that you will have to debug. :-)
The amount of debugging needed is strongly dependent on the programmer's knowledge and attitude and on the tools chosen. There are languages that make such problems impossible, though they come with other restrictions. Note that I'm not saying having huge numbers of threads is a good idea, but using multiple threads can simplify some designs quite a bit. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Andreas Jaeger
-
Cristian Rodríguez
-
Dave Howorth
-
Mahan Mahdavi Amiri
-
Per Jessen
-
Rüdiger Meier