Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2005 08:23:42 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Andriy Tkachuk <ant@emict.com>
Cc:        David Xu <davidxu@freebsd.org>, freebsd-threads@freebsd.org
Subject:   Re: more than 2k threads with -lpthread or -lthr
Message-ID:  <42B2EAFE.6010800@elischer.org>
In-Reply-To: <200506171359.01441.ant@emict.com>
References:  <200506161309.51431.ant@emict.com>	<20050616141857.GA63602@stack.nl> <42B1F414.9040203@freebsd.org> <200506171359.01441.ant@emict.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Andriy Tkachuk wrote:
> On Friday 17 June 2005 00:50, David Xu wrote:
> 
>>Here two sysctl also have to tuned to numbers larger than 2000 for
>>libthr and libpthread:
>>kern.threads.max_groups_per_proc
>>kern.threads.max_threads_per_proc
> 
> 
> Also i want to note, that i didn't change this sysctls.
> Theirs default values are:
> 
> kern.threads.max_threads_per_proc: 1500
> kern.threads.max_groups_per_proc: 1500
> 
> and i make 5000 threads with -lpthread.

in libpthread,
if threads are not in the kernel then they do not count towards these
limits..
they are only in the kernel if they are waiting on a kernel
resource (e.g. a file or socket etc.)
in libthread all threads will count owards this limit.

this is the difference between the two libraries.

One tries to be more careful with kernel resources and the other is a lot
simpler to get right :-)


> 
> The only sysctls i change in order to work with such
> number of threads are kern.maxfiles and kern.ipc.maxsockets,
> but they are not about threads.
> 
> Regards,
>   Andriy Tkachuk.
> _______________________________________________
> freebsd-threads@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42B2EAFE.6010800>