Libmicro!! pthread_create Resource temporarily unavailable

David Xu davidxu at freebsd.org
Tue Nov 29 12:17:53 GMT 2005


Ricardo A. Reis wrote:

>
> >the pthread_create benchmark is trying to create 20000 threads, the
> >default allowed number is 1500.
>
>
> Hi,
>
> I increase default limits for  *per_proc for 40000
>
> sysctl -a |grep threads
> kern.threads.thr_concurrency: 0
> kern.threads.thr_scope: 0
> kern.threads.virtual_cpu: 2
> kern.threads.max_threads_hits: 0
> kern.threads.max_groups_per_proc: 40000
> kern.threads.max_threads_per_proc: 40000
> kern.threads.debug: 0
> vm.stats.vm.v_kthreads: 69
>
>
> But this not solution,
>
>
>
> Thanks
>
>
> Ricardo A. Reis
> UNIFESP
> Unix and Network Admin

You can not create 40000 threads, because each thread
defaults has 2M stack, you will out of address space.

David Xu



More information about the freebsd-performance mailing list