4 ms·
Great article. I agree with the easier programming model in the threaded world vs. event callbacks. I miss a benchmarked backing of the performance claims. All
by js4all 16y ago
Great article. I agree with the easier programming model in the threaded world vs. event callbacks.
I miss a benchmarked backing of the performance claims. All I have seen in benchmarks is, that evented IO is performing better in real life, partly due to better memory usage.
This point is missing in this article. Threaded models have an inherently higher memory usage compared to evented models.
- bad_user 16y agoIt'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.