|
Re: More threads: msg#00012os.freebsd.performance
Michael Vince wrote: Hi All,Number of threads you can create if you use libthr is limited by following factors: 1) sysctl: kern.threads.max_threads_per_proc kern.threads.max_groups_per_proc 2) stack per-thread userland stack, default number on 64 bits platform is 2M, on 32 bits platform, it is 1M. I don't know whether java supports adjusting default per-thread stack size. if can not, we may add an environment variable to thread libraries, for example: LIBPTHREAD_THREAD_STACKSIZE allows user to set default stack size. Thread also needs a kernel mode stack when it is in kernel, if I am right, it is 16K bytes per-thread. if you create too many threads, make sure both side won't exhaust address space, and because kernel stack can not be swapped out when process is running, you'd make sure physical memory can not be exhausted. 3) check memory limits type limits command: Resource limits (current): cputime infinity secs filesize infinity kB datasize 524288 kB stacksize 65536 kB coredumpsize infinity kB memoryuse infinity kB memorylocked infinity kB maxprocesses 5547 openfiles 11095 sbsize infinity bytes vmemoryuse infinity kB if address space is not large enough, you have to reconfigure kernel to allow larger space. Fix me if I am wrong. David Xu _______________________________________________ freebsd-performance@xxxxxxxxxxx mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-performance To unsubscribe, send any mail to "freebsd-performance-unsubscribe@xxxxxxxxxxx" |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | More threads: 00012, Michael Vince |
|---|---|
| Next by Date: | Re: More threads: 00012, Achilleus Mantzios |
| Previous by Thread: | More threadsi: 00012, Michael Vince |
| Next by Thread: | Re: More threads: 00012, Achilleus Mantzios |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |