Hi all!
When exec ./main I have only 1500 threads, after changed kern.threads.max_threads_per_proc (up to 512000) I had only 100k threads and no more
What should I change to have more then 100k threads?
Thanks!
Code:
uname -a
FreeBSD domain.local 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009
[email]root@mason.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC amd64
Code:
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
void * thread_body(void * param) {
sleep(10);
}
int main(int argc, char *argv[]) {
pthread_t thread;
int i;
for (i = 0; i < 120000; i++) {
pthread_create(&thread, NULL, thread_body, NULL);
}
sleep(20);
return (EXIT_SUCCESS);
}
gcc -pthread -o main main.c
(for compile)When exec ./main I have only 1500 threads, after changed kern.threads.max_threads_per_proc (up to 512000) I had only 100k threads and no more
What should I change to have more then 100k threads?
Thanks!