MC 2 : High Performance GC for Memory-Constrained Environments - Narendran Sachindran, J. Eliot B. Moss, Emery D. Berger Sowmiya Chocka Narayanan.

Slides:



Advertisements
Similar presentations
An Implementation of Mostly- Copying GC on Ruby VM Tomoharu Ugawa The University of Electro-Communications, Japan.
Advertisements

Garbage collection David Walker CS 320. Where are we? Last time: A survey of common garbage collection techniques –Manual memory management –Reference.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 MC 2 –Copying GC for Memory Constrained Environments Narendran Sachindran J. Eliot.
Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department.
1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
1 Overview Assignment 5: hints  Garbage collection Assignment 4: solution.
Reducing Pause Time of Conservative Collectors Toshio Endo (National Institute of Informatics) Kenjiro Taura (Univ. of Tokyo)
1 Error-Free Garbage Collection Traces: How to Cheat and Not Get Caught ACM SIGMETRICS, 2002.
An On-the-Fly Mark and Sweep Garbage Collector Based on Sliding Views Hezi Azatchi - IBM Yossi Levanoni - Microsoft Harel Paz – Technion Erez Petrank –
By Jacob SeligmannSteffen Grarup Presented By Leon Gendler Incremental Mature Garbage Collection Using the Train Algorithm.
MC 2 : High Performance GC for Memory-Constrained Environments N. Sachindran, E. Moss, E. Berger Ivan JibajaCS 395T *Some of the graphs are from presentation.
An Efficient Machine-Independent Procedure for Garbage Collection in Various List Structures, Schorr and Waite CACM August 1967, pp Curtis Dunham.
OOPSLA 2003 Mostly Concurrent Garbage Collection Revisited Katherine Barabash - IBM Haifa Research Lab. Israel Yoav Ossia - IBM Haifa Research Lab. Israel.
1 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
Task-aware Garbage Collection in a Multi-Tasking Virtual Machine Sunil Soman Laurent Daynès Chandra Krintz RACE Lab, UC Santa Barbara Sun Microsystems.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science CRAMM: Virtual Memory Support for Garbage-Collected Applications Ting Yang, Emery.
21 September 2005Rotor Capstone Workshop Parallel, Real-Time Garbage Collection Daniel Spoonhower Guy Blelloch, Robert Harper, David Swasey Carnegie Mellon.
Generational Stack Collection And Profile driven Pretenuring Perry Cheng Robert Harper Peter Lee Presented By Moti Alperovitch
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
U NIVERSITY OF M ASSACHUSETTS Department of Computer Science Automatic Heap Sizing Ting Yang, Matthew Hertz Emery Berger, Eliot Moss University of Massachusetts.
Age-Oriented Concurrent Garbage Collection Harel Paz, Erez Petrank – Technion, Israel Steve Blackburn – ANU, Australia April 05 Compiler Construction Scotland.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Garbage Collection Without Paging Matthew Hertz, Yi Feng, Emery Berger University.
1 Reducing Generational Copy Reserve Overhead with Fallback Compaction Phil McGachey and Antony L. Hosking June 2006.
Jangwoo Shin Garbage Collection for Real-Time Java.
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
Garbage Collection Memory Management Garbage Collection –Language requirement –VM service –Performance issue in time and space.
A Parallel, Real-Time Garbage Collector Author: Perry Cheng, Guy E. Blelloch Presenter: Jun Tao.
1 Overview Assignment 6: hints  Living with a garbage collector Assignment 5: solution  Garbage collection.
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
Exploiting Prolific Types for Memory Management and Optimizations By Yefim Shuf et al.
David F. Bacon Perry Cheng V.T. Rajan IBM T.J. Watson Research Center The Metronome: A Hard Real-time Garbage Collector.
380C Lecture 17 Where are we & where we are going –Managed languages Dynamic compilation Inlining Garbage collection –Why you need to care about workloads.
Ulterior Reference Counting: Fast Garbage Collection without a Long Wait Author: Stephen M Blackburn Kathryn S McKinley Presenter: Jun Tao.
A Real-Time Garbage Collector Based on the Lifetimes of Objects Henry Lieberman and Carl Hewitt (CACM, June 1983) Rudy Kaplan Depena CS395T: Memory Management.
Fast Conservative Garbage Collection Rifat Shahriyar Stephen M. Blackburn Australian National University Kathryn S. M cKinley Microsoft Research.
A Mostly Non-Copying Real-Time Collector with Low Overhead and Consistent Utilization David Bacon Perry Cheng (presenting) V.T. Rajan IBM T.J. Watson Research.
Dynamic Object Sampling for Pretenuring Maria Jump Department of Computer Sciences The University of Texas at Austin Stephen M. Blackburn.
Message Analysis-Guided Allocation and Low-Pause Incremental Garbage Collection in a Concurrent Language Konstantinos Sagonas Jesper Wilhelmsson Uppsala.
1 Real-Time Replication Garbage Collection Scott Nettles and James O’Toole PLDI 93 Presented by: Roi Amir.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science 1 Automatic Heap Sizing: Taking Real Memory into Account Ting Yang, Emery Berger,
OOPLs /FEN March 2004 Object-Oriented Languages1 Object-Oriented Languages - Design and Implementation Java: Behind the Scenes Finn E. Nordbjerg,
Computer Science Department Daniel Frampton, David F. Bacon, Perry Cheng, and David Grove Australian National University Canberra ACT, Australia
September 11, 2003 Beltway: Getting Around GC Gridlock Steve Blackburn, Kathryn McKinley Richard Jones, Eliot Moss Modified by: Weiming Zhao Oct
Investigating the Effects of Using Different Nursery Sizing Policies on Performance Tony Guan, Witty Srisa-an, and Neo Jia Department of Computer Science.
380C lecture 19 Where are we & where we are going –Managed languages Dynamic compilation Inlining Garbage collection –Opportunity to improve data locality.
Fast Garbage Collection without a Long Wait Steve Blackburn – Kathryn McKinley Presented by: Na Meng Ulterior Reference Counting:
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
1 Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT) Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss (UMass),
David F. Bacon Perry Cheng V.T. Rajan IBM T.J. Watson Research Center ControllingFragmentation and Space Consumption in the Metronome.
A REAL-TIME GARBAGE COLLECTOR WITH LOW OVERHEAD AND CONSISTENT UTILIZATION David F. Bacon, Perry Cheng, and V.T. Rajan IBM T.J. Watson Research Center.
Runtime The optimized program is ready to run … What sorts of facilities are available at runtime.
2/4/20161 GC16/3011 Functional Programming Lecture 20 Garbage Collection Techniques.
1 GC Advantage: Improving Program Locality Xianglong Huang, Zhenlin Wang, Stephen M Blackburn, Kathryn S McKinley, J Eliot B Moss, Perry Cheng.
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
The Metronome Washington University in St. Louis Tobias Mann October 2003.
Simple Generational GC Andrew W. Appel (Practice and Experience, February 1989) Rudy Kaplan Depena CS 395T: Memory Management February 9, 2009.
Real-time Garbage Collection By Tim St. John Low Overhead and Consistent Utilization. Low Overhead and Consistent Utilization. Multithreaded Java Microcontroller.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
1 The Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT), Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss.
GARBAGE COLLECTION Student: Jack Chang. Introduction Manual memory management Memory bugs Automatic memory management We know... A program can only use.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
Dynamic Compilation Vijay Janapa Reddi
Ulterior Reference Counting Fast GC Without The Wait
David F. Bacon, Perry Cheng, and V.T. Rajan
Strategies for automatic memory management
Chapter 12 Memory Management
Garbage Collection Advantage: Improving Program Locality
Reference Counting vs. Tracing
Presentation transcript:

MC 2 : High Performance GC for Memory-Constrained Environments - Narendran Sachindran, J. Eliot B. Moss, Emery D. Berger Sowmiya Chocka Narayanan

Motivation Handheld Devices Cellular phones, PDAs widely used Constrained memory Diverse applications Media players Video games Digital cameras GPS Scaled down desktop apps ( , browser etc.) Require high throughput, short response time, better memory utilization

Talk Outline Generational collection and MC overview MC 2 overview Algorithmic Details Experimental Results Conclusions

Generational Collection Divide heap into regions called generations Generations segregate objects by age Focus GC effort on younger objects Nursery Old Generation

Generational Copying Collection Old Generation A B C Root D ED E Nursery Remset

Generational Copying Collection A B C Root D E A D B E Old Generation Nursery

MC Overview Extends gen. copying Divides space into equal size windows Reserves one or more windows for copying Collects in two phases: mark and copy Generational copying MC Nursery Old Generation

MC – Mark Phase

MC-Copy Phase

MC 2 – Mark Phase Logically order old gen. windows Three mark phase tasks: Mark reachable objects Calculate live data volume in each window Build per-window remembered sets Start when old gen. getting full: 80%, say Interleave marking with nursery allocation Do some marking after every n(32KB) bytes allocated Reduces mark phase pauses

MC 2 Example – Mark Phase MC 2 marks two objects during nursery allocation Old Generation Nursery L1L1 L2L2 L3L3 L4L4 Root L max Root Nursery Unreachable Reachable Marked Copied

MC 2 Example – Classify Windows Old Generation Nursery L1L1 L2L2 L3L3 L4L4 Root L max Root Locate high-occupancy windows and discard remsets Nursery Unreachable Reachable Marked Copied

MC 2 Example – Classify Windows Old Generation Nursery L1L1 L2L2 L3L3 L4L4 Root L max Root Locate high-occupancy windows and discard remsets Nursery Unreachable Reachable Marked Copied

MC 2 Example – Classify Windows Old Generation Nursery L2L2 L3L3 L4L4 Root L max Root L max Locate high-occupancy windows and discard remsets Nursery Unreachable Reachable Marked Copied

Incremental Marking Error

Handling marking error Track mutations using write barrier Record modified old generation objects Scan these modified objects at GC time Record interesting slots in remembered sets Snapshot at the beginning Incremental Update

MC 2 – Copy Phase Copy and compact reachable data Performed in small increments One windowful of live data copied per increment One increment per nursery collection High-occupancy windows copied logically

MC 2 Example – Copy Phase Old Generation Nursery L max L2L2 L3L3 L4L4 Root L max Root Copy a window worth of data during nursery collection Nursery Unreachable Reachable Marked Copied

MC 2 Example – Copy Phase Old Generation Nursery L max L2L2 L3L3 L4L4 Root L max Root Nursery Unreachable Reachable Marked Copied Copy a window worth of data during nursery collection

MC 2 Example – Copy Phase Old Generation Nursery L2L2 L3L3 L4L4 Root L max Root Nursery Unreachable Reachable Marked Copied Copy a window worth of data during nursery collection

MC 2 Example – Copy Phase Old Generation Nursery L2L2 L3L3 L4L4 Root L max Root Nursery Unreachable Reachable Marked Copied Copy a window worth of data during nursery collection

MC 2 Example – Copy Phase Old Generation Nursery L max Root L max Root Nursery Unreachable Reachable Marked Copied Copy a window worth of data during nursery collection

Algorithmic Details Large remembered sets Bounding space overhead Popular objects Preventing long pauses

Handling large remembered sets Normal remembered set for W1 stores 5 pointers (20 bytes on a 32 bit machine) W1W2

Handling large remembered sets W1W2 Card 1 Card 2 Card table requires only 2 bytes (one per card)

Handling large remembered sets Set a limit on the total remembered set size (e.g., 5% of total heap space). Replace large remembered sets with card table when total size approaches limit Good trade off between speed and space utilization

Handling popular objects Divide heap into small physical windows Normally copy a group of physical windows Popular physical windows not grouped Normal Windows Popular Window Normal Windows

Handling popular objects Divide heap into small physical windows Normally copy a group of physical windows Popular physical windows not grouped Normal Window Group Popular Window Normal Window Group

Handling popular objects Identify popular object while converting remembered set to card table Isolate popular object at high end of heap Do not need to maintain references to the objects Copying a popular object can cause a long pause, but does not recur

Experimental Results Implemented in Jikes RVM (2.2.3)/MMTk Pentium GHz, 512MB memory, RedHat Linux Benchmarks: SPECjvm98, pseudojbb Collectors evaluated Generational Mark-Sweep (MS) Generational Mark-(Sweep)-Compact (MSC) MC 2 MSC, MC 2 use separate code and data spaces Results: Execution time, pause time in a heap 1.8x program live size

Execution Time relative to MC 2 (Heap Size = 1.8x max. live size)

Max. Pause Time relative to MC 2 (Heap Size = 1.8x max. live size) MC 2 max. pause range: 17-41ms

Bounded Mutator Utilization (jess)

Bounded Mutator Utilization (javac)

Conclusions MC 2 : suitable for handheld devices with soft real time requirements Low space overhead (50-80%) Good throughput (3-4% slower than non- incremental compacting collector) Short pause times (17-41ms, factor of 6 lower than non-incremental compacting collector) Well distributed pauses Discussion...

References Narendran Sachindran, J. Eliot, B. Moss, Mark-copy: fast copying GC with less space overhead, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA Henry Lieberman, Carl Hewitt, A real-time garbage collector based on the lifetimes of objects, Communications of the ACM, v.26 n.6, p , June 1983 H. Schorr, W. M. Waite, An efficient machine-independent procedure for garbage collection in various list structures, Communications of the ACM, v.10 n.8, p , Aug. 1967