[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3385412.3385977acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Improving program locality in the GC using hotness

Published: 11 June 2020 Publication History

Abstract

The hierarchical memory system with increasingly small and increasingly fast memory closer to the CPU has for long been at the heart of hiding, or mitigating the performance gap between memories and processors. To utilise this hardware, programs must be written to exhibit good object locality. In languages like C/C++, programmers can carefully plan how objects should be laid out (albeit time consuming and error-prone); for managed languages, especially ones with moving garbage collectors, a manually created optimal layout may be destroyed in the process of object relocation. For managed languages that present an abstract view of memory, the solution lies in making the garbage collector aware of object locality, and strive to achieve and maintain good locality, even in the face of multi-phased programs that exhibit different behaviour across different phases.
This paper presents a GC design that dynamically reorganises objects in the order mutators access them, and additionally strives to separate frequently and infrequently used objects in memory. This improves locality and the efficiency of hardware prefetching. Identifying frequently used objects is done at run-time, with small overhead. HCSGC also offers tunability, for shifting relocation work towards mutators, or for more or less aggressive object relocation.
The ideas are evaluated in the context of the ZGC collector on OpenJDK and yields performance improvements of 5% (tradebeans), 9% (h2) and an impressive 25–45% (JGraphT), all with 95% confidence. For SPECjbb, results are inconclusive due to a fluctuating baseline.

References

[1]
Diab Abuaiadh, Yoav Ossia, Erez Petrank, and Uri Silbershtein. 2004.
[2]
An Efficient Parallel Heap Compaction Algorithm. SIGPLAN Not. 39, 10 (Oct. 2004), 224–236.
[3]
Ali-Reza Adl-Tabatabai, Richard L. Hudson, Mauricio J. Serrano, and Sreenivas Subramoney. 2004. Prefetch Injection Based on Hardware Monitoring and Object Metadata. SIGPLAN Not. 39, 6 (June 2004), 267–276.
[4]
Paolo Boldi, Marco Rosa, Massimo Santini, and Sebastiano Vigna. 2011.
[5]
Paolo Boldi and Sebastiano Vigna. 2004. The WebGraph Framework I: Compression Techniques. In Proc. of the Thirteenth International World Wide Web Conference (WWW 2004). ACM Press, Manhattan, USA, 595–601.
[6]
Michael D. Bond and Kathryn S. McKinley. 2008. Tolerating Memory Leaks. SIGPLAN Not. 43, 10 (Oct. 2008), 109–126. 1145/1449955.1449774
[7]
Michael D. Bond and Kathryn S. McKinley. 2009. Leak Pruning. SIGARCH Comput. Archit. News 37, 1 (March 2009), 277–288.
[8]
Wen-ke Chen, Sanjay Bhansali, Trishul Chilimbi, Xiaofeng Gao, and Weihaw Chuang. 2006. Profile-guided Proactive Garbage Collection for Locality Optimization. SIGPLAN Not. 41, 6 (June 2006), 332–340.
[9]
Trishul M. Chilimbi and James R. Larus. 1998.
[10]
Using Generational Garbage Collection to Implement Cache-conscious Data Placement. SIGPLAN Not. 34, 3 (Oct. 1998), 37–48.
[11]
[12]
Juliana Franco, Martin Hagelin, Tobias Wrigstad, Sophia Drossopoulou, and Susan Eisenbach. 2017.
[13]
You Can Have It All: Abstraction and Good Cache Performance. In Proceedings of the 2017 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Vancouver, BC, Canada) (Onward! 2017). ACM, New York, NY, USA, 148–167.
[14]
[15]
Andy Georges, Dries Buytaert, and Lieven Eeckhout. 2007. Statistically Rigorous Java Performance Evaluation. In Proceedings of the 22Nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications (Montreal, Quebec, Canada) (OOPSLA ’07). ACM, New York, NY, USA, 57–76.
[16]
[17]
John Hopcroft and Robert Tarjan. 1973. Algorithm 447: Efficient Algorithms for Graph Manipulation. Commun. ACM 16, 6 (June 1973), 372–378.
[18]
Xianglong Huang, Stephen M. Blackburn, Kathryn S. McKinley, J Eliot B. Moss, Zhenlin Wang, and Perry Cheng. 2004. The Garbage Collection Advantage: Improving Program Locality. SIGPLAN Not. 39, 10 (Oct. 2004), 69–80.
[19]
jgrapht 2019.
[20]
https://jgrapht.org/
[21]
Rahman Lavaee. 2016. The Hardness of Data Packing. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg, FL, USA) (POPL ’16). Association for Computing Machinery, New York, NY, USA, 232–242.
[22]
Per Lidén. 2017.
[23]
CFV: New Project: ZGC. OpenJDK Mailing List. http://mail.openjdk.java.net/pipermail/announce/2017October/ 000237.html.
[24]
Per Lidén and Stefan Karlsson. 2018. JEP 333: ZGC: A Scalable Low-Latency Garbage Collector. http://openjdk.java.net/jeps/333. Accessed: 2019-04-05.
[25]
Per Lidén and Stefan Karlsson. 2018. The Z Garbage Collector—Low Latency GC for OpenJDK. http://cr.openjdk.java.net/~pliden/slides/ ZGC-Jfokus-2018.pdf. Accessed: 2019-04-05.
[26]
Robert Mcgill, John W. Tukey, and Wayne A. Larsen. 1978. Variations of Box Plots. The American Statistician 32, 1 (1978), 12–16.
[27]
Erez Petrank and Dror Rawitz. 2002. The Hardness of Cache Conscious Data Placement. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Portland, Oregon) (POPL ’02). Association for Computing Machinery, New York, NY, USA, 101–112.
[28]
Ram Samudrala and John Moult. 1998. A graph-theoretic algorithm for comparative modeling of protein structure11Edited by F. Cohen. Journal of Molecular Biology 279, 1 (1998), 287 – 302. 10.1006/jmbi.1998.1689
[29]
Yefim Shuf, Manish Gupta, Hubertus Franke, Andrew Appel, and Jaswinder Pal Singh. 2002. Creating and Preserving Locality of Java Applications at Allocation and Garbage Collection Times. SIGPLAN Not. 37, 11 (Nov. 2002), 13–25.
[30]
Po-An Tsai and Daniel Sanchez. 2019. Compress Objects, Not Cache Lines: An Object-Based Compressed Memory Hierarchy. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (Providence, RI, USA) (ASPLOS ’19). ACM, New York, NY, USA, 229–242. org/10.1145/3297858.3304006

Cited By

View all
  • (2024)Mark–Scavenge: Waiting for Trash to Take Itself OutProceedings of the ACM on Programming Languages10.1145/36897918:OOPSLA2(2268-2295)Online publication date: 8-Oct-2024
  • (2024)Mutator-Driven Object Placement using Load BarriersProceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3679007.3685060(14-27)Online publication date: 13-Sep-2024
  • (2024)Polar: A Managed Runtime with Hotness-Segregated Heap for Far MemoryProceedings of the 15th ACM SIGOPS Asia-Pacific Workshop on Systems10.1145/3678015.3680490(15-22)Online publication date: 4-Sep-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2020
1174 pages
ISBN:9781450376136
DOI:10.1145/3385412
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2020

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. GC
  2. cache optimisation
  3. data locality
  4. prefetching

Qualifiers

  • Research-article

Conference

PLDI '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)150
  • Downloads (Last 6 weeks)13
Reflects downloads up to 10 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Mark–Scavenge: Waiting for Trash to Take Itself OutProceedings of the ACM on Programming Languages10.1145/36897918:OOPSLA2(2268-2295)Online publication date: 8-Oct-2024
  • (2024)Mutator-Driven Object Placement using Load BarriersProceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3679007.3685060(14-27)Online publication date: 13-Sep-2024
  • (2024)Polar: A Managed Runtime with Hotness-Segregated Heap for Far MemoryProceedings of the 15th ACM SIGOPS Asia-Pacific Workshop on Systems10.1145/3678015.3680490(15-22)Online publication date: 4-Sep-2024
  • (2024)A Managed Memory System for Micro Controllers with NOR Flash MemoryProceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management10.1145/3652024.3665511(57-67)Online publication date: 20-Jun-2024
  • (2024)Encore: CodaActive Object Languages: Current Research Trends10.1007/978-3-031-51060-1_3(59-91)Online publication date: 29-Jan-2024
  • (2023)Heap Size Adjustment with CPU ControlProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622988(114-128)Online publication date: 19-Oct-2023
  • (2023)Concurrent GCs and Modern Java Workloads: A Cache PerspectiveProceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management10.1145/3591195.3595269(71-84)Online publication date: 6-Jun-2023
  • (2022)Compressed Forwarding Tables ReconsideredProceedings of the 19th International Conference on Managed Programming Languages and Runtimes10.1145/3546918.3546928(45-63)Online publication date: 14-Sep-2022
  • (2022)Deep Dive into ZGC: A Modern Garbage Collector in OpenJDKACM Transactions on Programming Languages and Systems10.1145/353853244:4(1-34)Online publication date: 21-Sep-2022
  • (2022)MaPHeA: A Framework for Lightweight Memory Hierarchy-aware Profile-guided Heap AllocationACM Transactions on Embedded Computing Systems10.1145/352785322:1(1-28)Online publication date: 13-Dec-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media