How many threads can one process process on Linux (RHEL-5)? Once threads are created, how many stacks can each thread get?
Maximum threads: Maximum threads for a process on Linux?
Stack size:
Even if pthread_attr_setstacksize () and pthread_attr_setstackaddr () are now available, we still recommend that you not use them unless you really have good reason for this. The default stack allocation strategy for LinuxThreads is almost optimal: stacks start small (4k) and automatically grow on demand to a fairly large limit (2M). In addition, there is no portable way to evaluate thread flow requirements, so adjusting the stack size makes your program less reliable and non-portable.
(from http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html )
In the process, there is no maximum number of threads.
. , :
cat /proc/sys/kernel/threads-max
:
echo 99999 > /proc/sys/kernel/threads-max
, .
32- , , , , < 10 000 .
10k-, , , , , , .
, 10k, , , 64- , .
The thread stack size is configured using the pthread_attr_setstack method. The number of imho threads is limited only by the resources you have, more than 2K threads work in the application that I know.
Source: https://habr.com/ru/post/1728019/More articles:How can I display the “Send To” and “Open With” context menus? - windowshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1728015/best-way-to-start-stop-and-send-parameters-to-separate-python-script-from-c-application&usg=ALkJrhgR-I6evjPpPReMpwgHCAbXyzxVrgPartial regex exception - regexSelecting a licensing application for an open standard / specification - standardsSort Float Column vs Int Column in SQL Server - performanceSQL metal for dbml, how to create the correct foreign key column names - c #How to dynamically generate SQL query based on user selection? - javaКакую базу данных использовать для автономного приложения flex? - flexObjective-C NSThread ref counting convention (сохранение vs autorelease) - memory-managementHow to dynamically generate a SQL query based on user preferences? - phpAll Articles