This thesis shows that object-level, trace-driven simulation can facilitate evaluation of language runtime systems and reaches new conclusions about the relative performance of important garbage collection algorithms. In particular, I reach the unexpected conclusion that mark-and-sweep garbage collection, when augmented with generations, shows comparable CPU performance and much better reference locality than the more widely used copying algorithms.
In the past, evaluation of garbage collection algorithms has been limited by the high cost of implementing the algorithms. Substantially different algorithms have rarely been compared in a systematic way. With the availability of high-performance, low-cost workstations, trace-driven performance evaluation of these algorithms is now economical. This thesis describes MARS, a runtime system simulator that is driven by operations on program objects, and not memory addresses. MARS has been attached to a commercial Common Lisp system and eight large Lisp applications are used in the thesis as test programs.
To illustrate the advantages of the object-level tracing technique used by MARS, this thesis compares the relative performance of stop-and-copy, incremental, and mark-and-sweep collection algorithms, all organized with multiple generations. The comparative evaluation is based on several metrics: CPU overhead, reference locality, and interactive availability. Mark-and-sweep collection shows slightly higher CPU overhead than stop-and-copy collection (5%), but requires significantly less physical memory to achieve the same page fault rate (30-40%). Incremental collection has very good interactive availability, but implementing the read barrier on stock hardware incurs a substantial CPU overhead (30-60%). In the future, I will use MARS to investigate other performance aspects of sophisticated runtime systems.
Cited By
- Wagner G, Larsen P, Brunthaler S and Franz M (2016). Thinking Inside the Box, ACM Transactions on Programming Languages and Systems, 38:3, (1-37), Online publication date: 2-May-2016.
- Oliver E and Keshav S Design principles for opportunistic communication in constrained computing environments Proceedings of the 2008 ACM workshop on Wireless networks and systems for developing regions, (31-36)
- Blackburn S, Hertz M, Mckinley K, Moss J and Yang T (2007). Profile-based pretenuring, ACM Transactions on Programming Languages and Systems, 29:1, (2-es), Online publication date: 1-Jan-2007.
- Cha C, Kim H, Hwang K, Kim S, Lee S and Won H Garbage collection in an embedded java virtual machine Proceedings of the 10th international conference on Knowledge-Based Intelligent Information and Engineering Systems - Volume Part I, (443-450)
- Cheadle A, Field A, Marlow S, Jones S and While R Exploring the barrier to entry Proceedings of the 4th international symposium on Memory management, (163-174)
- Zee K and Rinard M (2019). Write barrier removal by static analysis, ACM SIGPLAN Notices, 37:11, (191-210), Online publication date: 17-Nov-2002.
- Zee K and Rinard M Write barrier removal by static analysis Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (191-210)
- Blackburn S, Jones R, McKinley K and Moss J Beltway Proceedings of the ACM SIGPLAN 2002 conference on Programming language design and implementation, (153-164)
- Hertz M, Blackburn S, Moss J, McKinley K and Stefanović D Error-free garbage collection traces Proceedings of the 2002 ACM SIGMETRICS international conference on Measurement and modeling of computer systems, (140-151)
- Hertz M, Blackburn S, Moss J, McKinley K and Stefanović D (2019). Error-free garbage collection traces, ACM SIGMETRICS Performance Evaluation Review, 30:1, (140-151), Online publication date: 1-Jun-2002.
- Blackburn S, Jones R, McKinley K and Moss J (2019). Beltway, ACM SIGPLAN Notices, 37:5, (153-164), Online publication date: 17-May-2002.
- Shuf Y, Gupta M, Bordawekar R and Singh J Exploiting prolific types for memory management and optimizations Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (295-306)
- Shuf Y, Gupta M, Bordawekar R and Singh J (2002). Exploiting prolific types for memory management and optimizations, ACM SIGPLAN Notices, 37:1, (295-306), Online publication date: 1-Jan-2002.
- Blackburn S, Singhai S, Hertz M, McKinely K and Moss J (2019). Pretenuring for Java, ACM SIGPLAN Notices, 36:11, (342-352), Online publication date: 1-Nov-2001.
- Blackburn S, Singhai S, Hertz M, McKinely K and Moss J Pretenuring for Java Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (342-352)
- Cheadle A, Field A, Marlow S, Jones S and While R (2000). Non-stop Haskell, ACM SIGPLAN Notices, 35:9, (257-267), Online publication date: 1-Sep-2000.
- Cheadle A, Field A, Marlow S, Jones S and While R Non-stop Haskell Proceedings of the fifth ACM SIGPLAN international conference on Functional programming, (257-267)
- Cheng P, Harper R and Lee P (1998). Generational stack collection and profile-driven pretenuring, ACM SIGPLAN Notices, 33:5, (162-173), Online publication date: 1-May-1998.
- Cheng P, Harper R and Lee P Generational stack collection and profile-driven pretenuring Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, (162-173)
- Gonçalves M and Appel A Cache performance of fast-allocating programs Proceedings of the seventh international conference on Functional programming languages and computer architecture, (293-305)
- Reinhold M Cache performance of garbage-collected programs Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, (206-217)
- Stefanovic D and Moss J (2019). Characterization of object behaviour in Standard ML of New Jersey, ACM SIGPLAN Lisp Pointers, VII:3, (43-54), Online publication date: 1-Jul-1994.
- Stefanovic D and Moss J Characterization of object behaviour in Standard ML of New Jersey Proceedings of the 1994 ACM conference on LISP and functional programming, (43-54)
- Reinhold M (2019). Cache performance of garbage-collected programs, ACM SIGPLAN Notices, 29:6, (206-217), Online publication date: 1-Jun-1994.
- Cook J, Wolf A and Zorn B (2019). Partition selection policies in object database garbage collection, ACM SIGMOD Record, 23:2, (371-382), Online publication date: 1-Jun-1994.
- Cook J, Wolf A and Zorn B Partition selection policies in object database garbage collection Proceedings of the 1994 ACM SIGMOD international conference on Management of data, (371-382)
- Grunwald D, Zorn B and Henderson R Improving the cache locality of memory allocation Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation, (177-186)
- Sansom P and Peyton Jones S Generational garbage collection for Haskell Proceedings of the conference on Functional programming languages and computer architecture, (106-116)
- Grunwald D, Zorn B and Henderson R (2019). Improving the cache locality of memory allocation, ACM SIGPLAN Notices, 28:6, (177-186), Online publication date: 1-Jun-1993.
- Baker H (1992). The treadmill, ACM SIGPLAN Notices, 27:3, (66-70), Online publication date: 1-Mar-1992.
- Wilson P, Lam M and Moher T (2019). Effective “static-graph” reorganization to improve locality in garbage-collected systems, ACM SIGPLAN Notices, 26:6, (177-191), Online publication date: 1-Jun-1991.
- Wilson P, Lam M and Moher T Effective “static-graph” reorganization to improve locality in garbage-collected systems Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, (177-191)
- Johnson D (1991). The case for a read barrier, ACM SIGARCH Computer Architecture News, 19:2, (279-287), Online publication date: 2-Apr-1991.
- Appel A and Li K (1991). Virtual memory primitives for user programs, ACM SIGARCH Computer Architecture News, 19:2, (96-107), Online publication date: 2-Apr-1991.
- Johnson D (1991). The case for a read barrier, ACM SIGOPS Operating Systems Review, 25:Special Issue, (279-287), Online publication date: 2-Apr-1991.
- Appel A and Li K (1991). Virtual memory primitives for user programs, ACM SIGOPS Operating Systems Review, 25:Special Issue, (96-107), Online publication date: 2-Apr-1991.
- Johnson D (1991). The case for a read barrier, ACM SIGPLAN Notices, 26:4, (279-287), Online publication date: 2-Apr-1991.
- Appel A and Li K (1991). Virtual memory primitives for user programs, ACM SIGPLAN Notices, 26:4, (96-107), Online publication date: 2-Apr-1991.
- Johnson D The case for a read barrier Proceedings of the fourth international conference on Architectural support for programming languages and operating systems, (279-287)
- Appel A and Li K Virtual memory primitives for user programs Proceedings of the fourth international conference on Architectural support for programming languages and operating systems, (96-107)
- Wilson P (1991). Some issues and strategies in heap management and memory hierarchies, ACM SIGPLAN Notices, 26:3, (45-52), Online publication date: 2-Jan-1991.
- Humphrey S and Krovetz B (1990). Selected M-Related Dissertations Bibliography, ACM SIGART Bulletin, 2:1, (122-137), Online publication date: 1-Nov-1990.
- Zorn B Comparing mark-and sweep and stop-and-copy garbage collection Proceedings of the 1990 ACM conference on LISP and functional programming, (87-98)
Recommendations
Age-based garbage collection
Modern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...
Age-based garbage collection
OOPSLA '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsModern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...
Garbage collection hints
HiPEAC'05: Proceedings of the First international conference on High Performance Embedded Architectures and CompilersThis paper shows that Appel-style garbage collectors often make suboptimal decisions both in terms of when and how to collect. We argue that garbage collection should be done when the amount of live bytes is low (in order to minimize the collection cost)...