Optimal Heap Limits for Reducing Browser Memory Use
Marisa Kirisame, Pranav Shenoy, Pavel Panchekha

TL;DR
This paper introduces a new framework for setting heap limits in garbage-collected runtimes, deriving an optimal rule that reduces memory usage and garbage collection time without communication between heaps.
Contribution
The paper proposes the square-root heap limit rule, an optimal method for allocating memory across multiple heaps to minimize total memory and garbage collection time.
Findings
Reduces memory usage by approximately 16% in real-world web pages.
Achieves up to 30% reduction in garbage collection time on benchmarks.
Demonstrates effectiveness of the rule in a prototype for V8 JavaScript engine.
Abstract
Garbage-collected language runtimes 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-live-size rules of thumb, but it is not clear when one rule is better than another or how to compare them. We address this problem with a new framework where heap limits are set for multiple heaps at once. Our key insight is that every heap limit rule induces a particular allocation of memory across multiple processes, and this allocation can be sub-optimal. We use our framework to derive an optimal "square-root" heap limit rule, which minimizes total memory usage for any amount of total garbage collection time. Paradoxically, the square-root heap limit rule achieves this…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Malware Detection Techniques · Parallel Computing and Optimization Techniques
