MemBalancer
Marisa Kirisame, Pranav Shenoy, Pavel Panchekha
- Determine heap size for garbage collected runtime.
- Review the space time tradeoff - the bigger the heap size is the faster it runs.
- Although all heap size for a single heap is pareto optimal, for a system with multiple heaps it may not be.
- This reflect the age old insight that optimality of subcomponent does not imply optimality of the whole system.
- We introduce rule that gurantees global optimality.
- Under such rule, extra memory grow sublinearly (squareroot) w.r.t working memory, as opposed to linearly.
- Take memory away from big heap and give it to small heap, reflecting the law of marginal diminishing return.
- Gets good result in v8 (the javascript compiler of chrome) and racket.
- Currently being implemented by firefox,
chromium,
mmtk,
and julia
-
Note that you can still use MemBalancer without having multiple runtimes.
A typical computer system is very rarely single-tenant.
Even with a single runtime, the application still keep software cache, alongside os filecache, swap, and whatnot.
Runtime taking more memory mean software caches of all form will suffer.