~/talk

Everything you ever wanted to know about threads...

Talkat LA RubyConf 2010 · 2010-02-19..02-20· [ruby, concurrency]
links:none on file
links:none on file
slides:none on file

Ruby 1.8’s green threads use setitimer and signal handlers so a single spawned thread leaves a periodic setitimer/sigvtalrm interrupt running forever; tracing finds 3.5 million sigprocmask calls in 100s and huge memcpy costs copying kilobyte-sized stack frames. Patches stop the timer, add a zero-copy stack patch that mmaps stacks and swaps the stack pointer, eliminate the memcpy, cut CPU syscalls, and turn a 7,400s ring benchmark into about 13 minutes while improving many workloads ~30%.

AI-written summary · about

  1. 0:00Start
  2. 1:27What is a thread?
  3. 2:08Green Threads (1:N)
  4. 3:15Native Threads (1:1)
  5. 4:08Hybrid Threads (M:N)
  6. 7:59Let's strace ruby..
  7. 10:04PATCH: stop the thread timer
  8. 18:39Stack vs. Heap
  9. 21:03gdb walkthrough
  10. 22:06What's on the ruby stack?
  11. 23:07How big is the stack?
  12. 25:04Recap: How do Ruby threads work?
  13. 27:22Benchmark
  14. 30:42rb_thread_schedule() sucks
  15. 31:59Ruby Enterprise Edition
~/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.