Optimizing Native Code for Erlang

Steve Vinoski
Distributed Systems Expert, Architect at Basho Technologies

Thanks to Erlang’s NIF and linked-in driver interfaces, integrating native C/C++ code into the Erlang virtual machine (VM) is pretty straightforward. This is handy for integrating non-Erlang packages with Erlang applications, or for relieving performance bottlenecks by dropping to native code when measurements show a benefit to doing so. There’s one catch, though: native code has to execute in a millisecond or less to avoid wreaking havoc on the VM’s schedulers. Unfortunately, much native code is “dirty” and doesn’t follow these rules.

Erlang 17 has a new experimental feature called “dirty schedulers” designed to allow developers to integrate dirty native code with the Erlang VM. In this talk, Steve, who implemented dirty schedulers under the guidance of Rickard Green of the OTP team, will cover the details of how dirty schedulers work and how developers can use them to deal with dirty native code. He’ll also discuss future dirty scheduler work and related efforts.

Slides
Video

Steve Vinoski is a member of the architecture group at Basho Technologies, makers of the Riak database and RiakCS cloud storage system. At Basho he works on experimental code, helps engineering with features and maintenance, assists professional services with customer projects, occasionally helps sales with customer visits, and does a lot of conference speaking. Steve's long career in middleware, distributed systems, and integration eventually led him to discover Erlang/OTP in 2006, which he's used for most of his development work ever since. Steve has also been a contributor to the Yaws open source web server since 2008.

Website: steve.vinoski.net

Twitter: @stevevinoski 

GitHub: vinoski


Back to conference page