2 ms·
It's not the memory-usage that bites you when using pthreads. It's the N:M problem ... how to map N threads on M cores. The OS kernel does time-slicing if N >
by bad_user 16y ago
It's not the memory-usage that bites you when using pthreads.
It's the N:M problem ... how to map N threads on M cores. The OS kernel does time-slicing if N > M, and this bites you because context-switching between threads is costly, and the more threads you have, the more context-switching the kernel needs to make.
On the other hand, with a server on top of the JVM you can get to a couple of thousands reqs/second without async I/O. The app I'm working on right now reaches ~ 2000 reqs/second.
Even if some web app does 500 requests / second, who needs more than that? Google? Twitter? Most apps don't.
Of course, in the context of Rails ... performance has always been shitty, and I can't blame people for searching silver bullets. Unfortunately people in general lose sight of the general context ... platforms need proper pthreads integration without a retarded GIL.