I've started to use Ruby for mathematical and scientific computing using IRuby. I am not in need for high performance computing yet so Ruby is still sufficient. Oh boy what a joy it is to use.
If i'm reading this correctly for web applications setting RUBY_THREAD_DEFAULT_QUANTUM_MS=10 or maybe even RUBY_THREAD_DEFAULT_QUANTUM_MS=1 could be more optimal then the current default of 100, allowing for more throughput at the cost of potentially slower single shot response times?
Ben Sheldon, I really appreciate how you wrote this article. It feels like it was written in a very direct way that is more easily consumable for people who's attention tends to drift on long-form articles. I feel like you covered a complex topic succinctly, and I appreciate that. Helped me get a better understanding of thread contention. Thanks.
Intresting that this problem (IO-bound threads should have priority over CPU-bound threads) already solved at OS level (most OSes will give priority boost to thread that was unblocked because of end of IO operation in hope that thread will soon block with another operation).
Loved this writeup, because queues are the most important and general concept in reasoning about performance. When you realize this, you start seeing them everywhere. Locks, async IO... everything is just interacting queues.