Similar presentations

2
Overview OM - optimization manager – Erlang-to-Erlang optimizer (mostly) – ~20k lines of Erlang – intended to accelerate large applications The rest of this talk – What does OM do? – How well does it work?

13
Aggregation Optimization across module boundaries – but in Erlang, any module can be replaced at any time (“hot code loading”) Merge optimized hot modules into aggregates – optimize each aggregate aggressively – but in Erlang you can replace any module at runtime – how to do it?

14
Hot code loading Remote calls m:f(X) logically do the following: – lookup module named m – lookup function named f/1 in the found module – call the found function A new version of m can be loaded at any time – but occurs seldom in practice (every month? week?) – (an aside: OTP further structures code replacement) we do not take advantage of this

15
Hot code loading (2) Inlining of remote calls is not possible – what if the inlined module subsequently changes? – worse, remote calls are very common Merging two modules into one is problematic – making remote calls into local calls changes behaviour – safe approach: speculate that code has not changed.

20
Results (2) Each benchmark compiled with OM – same input used for training and production – latest(m) simulated with cheap test Each benchmark run times for baseline and optimized – removed outliers for gen_tcp and mnesia to get more focussed speedup values