Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Take Your Time

Avatar for Ben Marx Ben Marx
September 06, 2018

Take Your Time

OTP20 officially introduced dirty schedulers. In this talk, we'll cover why they're part of OTP and what function they perform. Using Rust NIFs, we'll compare schedulers and dirty schedulers to illustrate the trade-offs between scheduler types. By the talk's end, it should be apparent why dirty schedulers are part of OTP and how and when you should consider using them.

Avatar for Ben Marx

Ben Marx

September 06, 2018
Tweet

More Decks by Ben Marx

Other Decks in Programming

Transcript

  1. RUN QUEUE 2 SCHEDULER 2 RUN QUEUE N SCHEDULER N

    RUN QUEUE 1 SCHEDULER1 MIGRATION LOGIC
  2. 1MS

  3. “Due to heroic efforts by Steve Vinoski, Rickard Green, and

    Sverker Eriksson, we have an (experimental) so-called dirty-scheduler (DS) NIF API in the Erlang runtime, which has been somewhat stable since release 17.3.” https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7
  4. RUN QUEUE CPU DIRTY CPU RUN QUEUE N SCHEDULER N

    RUN QUEUE IO DIRTY IO MIGRATION LOGIC
  5. THANK YOU @BGMARX RESOURCES http://hansihe.com/erlang/elixir/c/2016/07/26/erlang-nif-preemptive-scheduling.html https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7 http://erlang.org/doc/man/erl_nif.html https://www.youtube.com/watch?v=FYQcn9zcZVA https://www.youtube.com/watch?v=lSLTwWqTbKQ https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/2016/02/09/erlang-scheduler-

    details.html https://jlouisramblings.blogspot.com/2013/01/how-erlang-does-scheduling.html https://www.rust-lang.org/en-US/ http://www.erlang-factory.com/upload/presentations/105/KennethLundin-ErlangFactory2009London- AboutErlangOTPandMulti-coreperformanceinparticular.pdf https://github.com/vinoski/bitwise