~/talk

Ruby's Scheduler: Improving I/O

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [ruby]
links:none on file
slides:none on file

Ruby's main-reactor scheduler uses a simple round-robin with a 100 ms quantum, which yields high throughput but poor responsiveness: threads that block on I/O get requeued at the tail and can wait hundreds of milliseconds behind long-running threads. Proposed fixes include dynamic priorities, a multi-level feedback queue that promotes I/O-bound threads and demotes CPU-bound ones, or MN (green) threading to allow a much smaller quantum. No production change exists yet and results are unvalidated because Ruby bench thread benchmarks are still sparse.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:57Problem with current scheduler
  3. 6:26Ideal scheduler behavior
  4. 8:10Priority in Ruby threads
  5. 9:12Fiber scheduler limitations
  6. 10:16Go’s scheduler solution
  7. 12:22Python’s GIL drop approach
  8. 13:48Potential Ruby solutions
  9. 17:27Multi-level feedback queue
  10. 18:49Lack of scheduler benchmarks
  11. 20:33Call to action and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.