The economics of garbage collection
-
Upload
vaidas-brundza -
Category
Technology
-
view
208 -
download
3
description
Transcript of The economics of garbage collection
![Page 1: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/1.jpg)
The Economics of Garbage CollectionJeremy Singer, Richard Jones, Gavin Brown, Mikel Luján
![Page 2: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/2.jpg)
Motivation
![Page 3: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/3.jpg)
The main goals
• Determine allocation curve
• Introduce allocation elasticity
• Make use of introduced elasticity
![Page 4: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/4.jpg)
Microeconomics demand curve
![Page 5: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/5.jpg)
Garbage collection analogy
![Page 6: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/6.jpg)
Empirical Allocation Curves
• Empirical data from real-world Java application
• Different algorithms from MMTk toolkit run on JikesRVM
• Java benchmarks from DaCapo suite
• Fixed size heap 35-500 MB
![Page 7: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/7.jpg)
Full-Heap Collection
• Mark-Sweep GC• Allocation curves obey the law of allocation
![Page 8: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/8.jpg)
Generational Collection
• Generational Mark-Sweep GC• Nursery space – frequently collected• Mature space – long-lived objects• Added weight of 0.1 to Nursery GC
![Page 9: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/9.jpg)
Shifting the Allocation Curve
• Added “tax” – additional words to object header• Allocation curve shifted upwards
![Page 10: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/10.jpg)
Elasticity
![Page 11: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/11.jpg)
Controlling Heap Growth using Elasticity
• Elasticity to improve GC performance
• Controlling the expansion rate heap
• Default heuristics for controlling heap size
• Sensitivity in default heuristics
• Alternative heuristics
![Page 12: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/12.jpg)
Alternative Heuristic for Heap Growth Management
• Based on allocation elasticity
• target elasticity, Eo small E, slow heap growth rateo large E, rapid heap growth rate
![Page 13: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/13.jpg)
Execution Time Benchmarks
![Page 14: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/14.jpg)
Final Heap Sizes
![Page 15: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/15.jpg)
Related Work• Stefanovic et al. used statistical techniques
• Baker offered radioactive decay model
• Garbage collection and transactional memory
![Page 16: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/16.jpg)
Conclusion• Microeconomics and memory management
• Allocation curve
• Allocation elasticity
![Page 17: The economics of garbage collection](https://reader034.fdocuments.us/reader034/viewer/2022042815/5563a7b6d8b42aae0d8b506d/html5/thumbnails/17.jpg)