Schedule

Koichi Sasada
Koichi Sasada
  • @ko1

Koichi Sasada is a programmer, mainly developing Ruby interpreter (CRuby/MRI). He received Ph.D (Information Science and Technology) from the University of Tokyo, 2007. Now he is still working on MRI development at Cookpad Inc. He is also a director of Ruby Association.

Making *MaNy* threads on Ruby

We will introduce MaNy project: supports massive number of threads on Ruby.

Concurrent mchanism (threads, processes, etc.) is an important language feature especially for multiple network connections. Ruby supports Ractor/Thread/Fiber for concurrency. However making many Threads (and Ractors) introduce huge overhead. Fiber scheduler was introduced for this purpose but it has some limitations.

On the other languages, for example, Go language supports goroutine. They can make many goroutines and they can run concurrently or in parallel. Other languages (Erlang, Rust, ...) also support similar features.

They use a well-known technique called M:N threading. In short, M:N threading supports many M threads on N (enough small number) system threads. MaNy project introduces M:N threading into Ruby.

In this talk, we will show the background and progress of MaNy project. Because we are replacing the threading mechanism of current Ruby, we can share some details about it.