It probable that the vast majority of that 1MB of memery per dormant thread is being consumed by an wildly over-generous per-thread stack allocation that will likely never be consumed. See Use more threads..
I've had 3000 active threads running (not doing much; incrementing a counter and displaying it at a particular location on a 200x100 console session, but more than sleeping), all in under 1GB.
Greedy in C terms, but not bad for 3000 independant interpreters.
In reply to Re^2: TCP Socket, Forking, Memory exhaustion
by BrowserUk
in thread TCP Socket, Forking, Memory exhaustion
by asuter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |