Question about threads [beaver challenge]
David Xu
davidxu at viatech.com.cn
Tue Feb 10 17:53:17 PST 2004
Dung Patrick wrote:
>Would you please explain this parameter:
>
>kern.threads.max_groups_per_proc
>
It is used by system scope thread in libpthread, whenever you
create a system scope thread, kernel creates a dedicated thread
for the user thread, it also eats a kernel thread group, for programs
heavily use system scope thread, the sysctl value should be increased.
current kern.threads.max_threads_per_proc not only accounts process
scope thread which are being blocked in kernel, but also accounts
system scope thread, so you should increase the sysctl value at same
time, otherwise too much system scope threads can block process scope
thread because the thread limit is hit and no upcall will be scheduled,
so UTS does not have chance to run, if UTS can not run, then process
scope thread can not be scheduled in userland, result is process
is suddenly stopped. The default values are too low for some applications.
we might increase it before 5.3 release.
David Xu
More information about the freebsd-threads
mailing list