Optimal Heap Limits for Reducing Browser Memory Use

04/22/2022
by   Marisa Kirisame, et al.
0

Garbage collected language runtimes must carefully tune heap limits to reduce garbage collection time and memory usage. However, there's a trade-off: a lower heap limit reduces memory use but increases garbage collection time. Classic methods for setting heap limits include manually-tuned heap limits and multiple-of-working-memory rules of thumb. But because it's a trade-off, it's not clear what heap limit rule is best or how even to compare them. We address this problem with a new framework where heap limits are set for multiple heaps at once. In this framework, standard heap limit rules are non-compositional: multiple heaps using the same heap limit rule allocate memory in non-Pareto-optimal ways. We use our framework to derive a compositional "square-root" heap limit rule, which achieves minimizes total memory usage for any amount of total garbage collection time. Paradoxically, the square-root heap limit rule achieves coordination without communication: it allocates memory optimally across multiple heaps without requiring any communication between heaps. To demonstrate that this heap limit rule is effective, we prototype it for V8, the JavaScript runtime used in Google Chrome, Microsoft Edge, and other browsers, as well as in server-side frameworks like node.js and Deno. On real-world web pages, our prototype achieves reductions of approximately 16.99 of memory usage. On memory-intensive benchmarks, reductions of up to 6.55 garbage collection time are possible with no change in total memory usage.

READ FULL TEXT

page 13

page 15

research
01/19/2022

Incomplete sets in P for logspace-reduction

In this article, we investigate the behaviour of TMs with time limit and...
research
09/01/2023

Efficient RLHF: Reducing the Memory Usage of PPO

Reinforcement Learning with Human Feedback (RLHF) has revolutionized lan...
research
06/29/2020

Building Rule Hierarchies for Efficient Logical Rule Learning from Knowledge Graphs

Many systems have been developed in recent years to mine logical rules f...
research
08/12/2019

Shared-Memory Branch-and-Reduce for Multiterminal Cuts

We introduce the fastest known exact algorithm for the multiterminal cut...
research
11/30/2016

Comparing Apples and Oranges: Two Examples of the Limits of Statistical Inference, With an Application to Google Advertising Markets

We show how the classic Cramer-Rao bound limits how accurately one can s...
research
11/27/2019

Stability of defection, optimisation of strategies and the limits of memory in the Prisoner's Dilemma

Memory-one strategies are a set of Iterated Prisoner's Dilemma strategie...
research
07/31/2018

Cutting Down Training Memory by Re-fowarding

Deep Neutral Networks(DNN) require huge GPU memory when training on mode...

Please sign up or login with your details

Forgot password? Click here to reset