more than 2k threads with -lpthread or -lthr

David Xu davidxu at freebsd.org
Thu Jun 16 10:52:33 GMT 2005


Andriy Tkachuk wrote:

>Hi folks.
>
>I have troubles with network threaded application
>wich uses several thousands threads with libthr or libpthread
>in RELENG_5_x. Program is killed by sigsegv.
>libc_r works but application eats more cpu with it.
>
>The program is the load test client application to the
>server. It simulates clients to the server. Each
>client is one thread in it.
>
>Thereby i have a question: is anybody use
>such kind of application with libpthread or libthr?
>If yes, then do you make some system tunings in order
>to force your application be working?
>
>Tanks,
>  Andriy Tkachuk.
>
>  
>
Both libpthread and libthr use 1M bytes stack on 32bits platform
and 2M bytes stack on 64bits platform. I think 2k threads needs
2G stack on i386, this is too large.

David Xu




More information about the freebsd-threads mailing list