in reply to Re: TCP Socket, Forking, Memory exhaustion
in thread TCP Socket, Forking, Memory exhaustion
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.
|
|---|