SlideShare a Scribd company logo
Quantifying the Performance of Garbage Collection vs.  Explicit Memory Management Matthew Hertz Canisius College Emery Berger University of Massachusetts Amherst
Explicit Memory Management malloc  /  new allocates space for an object free  /  delete returns memory to system Simple, but tricky to get right Forget to  free   memory leak free  too soon    “dangling pointer”
Dangling Pointers Node x = new Node (“happy”); Node ptr = x; delete x;  // But I’m not dead yet! Node y = new Node (“sad”); cout <<  ptr->data  << endl;  // sad   Insidious, hard-to-track down bugs
Solution: Garbage Collection No need to call  free Garbage collector periodically scans objects on heap Reclaims  unreachable  objects Won’t reclaim objects until it can prove object will not be used again
No More Dangling Pointers Node x = new Node (“happy”); Node ptr = x; // x still live (reachable through ptr)  Node y = new Node (“sad”); cout <<  ptr->data  << endl;  // happy!   So why not use GC   all the time ?
Conventional Wisdom “ GC worse than  malloc , because…” Extra processing ( collection ) Poor cache performance ( ibid ) Bad page locality ( ibid ) Increased footprint ( delayed reclamation )
Conventional Wisdom “ GC improves performance, by…” Quicker allocation ( fast path inlining & bump pointer alloc. ) Better cache performance  ( object reordering ) Improved page locality  ( heap compaction )
Outline Motivation Quantifying GC performance A hard problem Oracular memory management Selecting & generating the Oracles Experimental methodology Results
Quantifying GC Performance Apples-to-apples comparison Examine unaltered applications Runs differ only in memory manager Examine impact on  time  &  space
Quantifying GC Performance Evaluate state-of-art algorithms Garbage collectors Generational collectors Copying collectors Standard for Java, not compatible with C/C++ Explicit memory managers Fast, single-threaded allocators
Comparing Memory Managers BDW Collector Node v = malloc(sizeof(Node)); v->data= malloc(sizeof(NodeData)); memcpy(v->data, old->data,  sizeof(NodeData)); free(old->data); v->next = old->next; v->next->prev = v; v->prev = old->prev; v->prev->next = v; free(old); Using GC in C/C++ is easy:
Comparing Memory Managers BDW Collector Node v = malloc(sizeof(Node)); v->data= malloc(sizeof(NodeData)); memcpy(v->data, old->data,  sizeof(NodeData)); free(old->data); v->next = old->next; v->next->prev = v; v->prev = old->prev; v->prev->next = v; free(old); … ignore calls to  free .
Comparing Memory Managers Lea Allocator Node node = new Node(); node.data = new NodeData(); useNode(node); node = null; ... node = new Node(); ... node.data = new NodeData(); ... Adding  malloc/free  to Java: not easy…
Comparing Memory Managers Lea Allocator Node node = new Node(); node.data = new NodeData(); useNode(node); node = null; ... node = new Node(); ... node.data = new NodeData(); ... ... where should  free  be inserted? free(node.data)? free(node)?
Inserting Free Calls Do not know where programmer would call  free Hints provided from  null -ing pointers Restructure code to avoid memory leaks? Tests programming skills, not memory manager Want  unaltered  applications
Oracular Memory Manager Oracle Consult oracle to place  free  calls Oracle does not disrupt hardware state Simulator inserts  free … Java Simulator C malloc/free perform actions at no cost below here execute program here allocation
Object Lifetime & Oracle Placement Oracles bracket placement of  frees Lifetime -based : most aggressive Reachability-based : most conservative unreachable live dead reachable free(obj) obj = new Object; free(obj) free(??) freed by lifetime-based  oracle freed by reachability-based  oracle can be collected can be freed
Reachability Oracle Generation Illegal instructions mark heap events Simulated identically to legal instructions Oracle Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocations, ptr updates, prog  roots Merlin analysis
Liveness Oracle Generation Record allocations, memory accesses Preserve code, type objects, etc. May use objects without accessing them Oracle Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocations, mem access,  prog  roots Post- process
Liveness Oracle Generation Record allocations, memory accesses Preserve code, type objects, etc. May use objects without accessing them Oracle if (f.x == y) { … } uses address of  f.x ,  but may not touch  f.x  or  f Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocation, mem access,  prog.  roots Post- process
Oracular Memory Manager Consult oracle before each allocation When needed, modify instructions to call  free Extra costs hidden by simulator Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here oracle allocation
Experimental Methodology Java platform: MMTk/Jikes RVM(2.3.2)  Simulator: Dynamic SimpleScalar (DSS) Simulates 2GHz PowerPC processor G5 cache configuration
Experimental Methodology Garbage collectors: GenMS, GenCopy, GenRC, SemiSpace, CopyMS, MarkSweep Explicit memory managers: Lea, MSExplicit (MS + explicit deallocation)
Experimental Methodology Perfectly repeatable runs Pseudoadaptive  compiler Same sequence of optimizations Advice generated from mean of 5 runs Deterministic thread switching Deterministic system clock Use “illegal” instructions in  all  runs
Execution Time for pseudoJBB GC performance can be competitive
Footprint at Quickest Run GC uses much more memory
Footprint at Quickest Run GC uses much more memory 1.00 1.38 1.61 5.10 5.66 4.84 7.69 7.09 0.63
Avg. Relative Cycles and Footprint GC trades space for time
Javac Paging Performance Much  slower in limited physical RAM
pseudoJBB Paging Performance Lifetime analysis adds little
Summary of Results Best collector equals Lea's performance… Up to 10% faster on some benchmarks ... but uses more memory Quickest runs use 5x or more memory At least twice mean footprint
Take-home: Practitioners GC ok if: system has more than 3x needed RAM, and no competition with other processes GC not so good if: Limited RAM Competition for physical memory Relies upon RAM for performance In-memory database Search engines, etc.
Take-home: Researchers GC performance  already good enough  with enough RAM Problems: Paging is a killer Performance suffers when RAM limited
Future Work Obvious dimensions Other collectors: Bookmarking collector [PLDI 05] Parallel collectors Other allocators: New version of DLmalloc (2.8.2) VAM [ISMM 05] Other architectures: Examine impact of cache size
Future Work Other memory management methods Regions, reaps
Conclusion Code available at:  http://www-cs.canisius.edu/~hertzm

More Related Content

What's hot (20)

Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
Haim Yadid
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
Azul Systems Inc.
 
Garbage collection in JVM
Garbage collection in JVMGarbage collection in JVM
Garbage collection in JVM
aragozin
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
Azul Systems Inc.
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
Roger Rafanell Mas
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
Maarten Balliauw
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
Atthakorn Chanthong
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in Java
Abhishek Asthana
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
guest1f2740
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
Ihor Bobak
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
Minh Hoang
 
An Introduction To Java Profiling
An Introduction To Java ProfilingAn Introduction To Java Profiling
An Introduction To Java Profiling
schlebu
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
Peter Lawrey
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015
Holden Karau
 
HotSpot JVM Tuning
HotSpot JVM TuningHotSpot JVM Tuning
HotSpot JVM Tuning
Gilad Garon
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?
Roman Elizarov
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
Maarten Balliauw
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
Java Usergroup Berlin-Brandenburg
 
Java Garbage Collection - How it works
Java Garbage Collection - How it worksJava Garbage Collection - How it works
Java Garbage Collection - How it works
Mindfire Solutions
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
Haim Yadid
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
Azul Systems Inc.
 
Garbage collection in JVM
Garbage collection in JVMGarbage collection in JVM
Garbage collection in JVM
aragozin
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
Azul Systems Inc.
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
Roger Rafanell Mas
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
Maarten Balliauw
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in Java
Abhishek Asthana
 
Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
guest1f2740
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
Ihor Bobak
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
Minh Hoang
 
An Introduction To Java Profiling
An Introduction To Java ProfilingAn Introduction To Java Profiling
An Introduction To Java Profiling
schlebu
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
Peter Lawrey
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015
Holden Karau
 
HotSpot JVM Tuning
HotSpot JVM TuningHotSpot JVM Tuning
HotSpot JVM Tuning
Gilad Garon
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?
Roman Elizarov
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
Maarten Balliauw
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
 
Java Garbage Collection - How it works
Java Garbage Collection - How it worksJava Garbage Collection - How it works
Java Garbage Collection - How it works
Mindfire Solutions
 

Viewers also liked (19)

Bni loan qualification_101
Bni loan qualification_101Bni loan qualification_101
Bni loan qualification_101
Tom Drasler
 
Budget Cuts And Their Effects
Budget Cuts And Their EffectsBudget Cuts And Their Effects
Budget Cuts And Their Effects
endre1mr
 
Cloud Computing - Gina Franco
Cloud Computing - Gina FrancoCloud Computing - Gina Franco
Cloud Computing - Gina Franco
Image Tech - Web & Multimedia Solutions
 
Zappos.com, My Experience: Colin Gilchrist
Zappos.com, My Experience: Colin GilchristZappos.com, My Experience: Colin Gilchrist
Zappos.com, My Experience: Colin Gilchrist
Colin Gilchrist
 
Happy Monthsary!
Happy Monthsary!Happy Monthsary!
Happy Monthsary!
gelobasilio020509
 
2 3ton per hour sand gold processing
2 3ton per hour sand gold processing2 3ton per hour sand gold processing
2 3ton per hour sand gold processing
Evita Lee
 
Compuertas técnicas avanzadas parte 2
Compuertas   técnicas avanzadas parte 2Compuertas   técnicas avanzadas parte 2
Compuertas técnicas avanzadas parte 2
Andrés Cuervo
 
OSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be MissingOSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be Missing
Coverity
 
Ss aba
Ss abaSs aba
Ss aba
leroy walker
 
Cuanto influye la tecnología en mi medio
Cuanto influye la tecnología en mi  medioCuanto influye la tecnología en mi  medio
Cuanto influye la tecnología en mi medio
agustinapascal
 
Cover Diari de Girona
Cover Diari de GironaCover Diari de Girona
Cover Diari de Girona
Alejandro Mallado
 
Meeting the critical needs of older people
Meeting the critical needs of older peopleMeeting the critical needs of older people
Meeting the critical needs of older people
localinsight
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
sullis
 
PlayStation 4
PlayStation 4PlayStation 4
PlayStation 4
carolinagonzalezcsj
 
Zeimer BNI Presentation June 8, 2011
Zeimer BNI Presentation June 8, 2011Zeimer BNI Presentation June 8, 2011
Zeimer BNI Presentation June 8, 2011
Zeimer's Advertising Shoppe
 
GANGA
GANGAGANGA
GANGA
aarshsaab
 
RIEMS
RIEMSRIEMS
RIEMS
Juan Carlos Padron Castro
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
zukun
 
Bni loan qualification_101
Bni loan qualification_101Bni loan qualification_101
Bni loan qualification_101
Tom Drasler
 
Budget Cuts And Their Effects
Budget Cuts And Their EffectsBudget Cuts And Their Effects
Budget Cuts And Their Effects
endre1mr
 
Zappos.com, My Experience: Colin Gilchrist
Zappos.com, My Experience: Colin GilchristZappos.com, My Experience: Colin Gilchrist
Zappos.com, My Experience: Colin Gilchrist
Colin Gilchrist
 
2 3ton per hour sand gold processing
2 3ton per hour sand gold processing2 3ton per hour sand gold processing
2 3ton per hour sand gold processing
Evita Lee
 
Compuertas técnicas avanzadas parte 2
Compuertas   técnicas avanzadas parte 2Compuertas   técnicas avanzadas parte 2
Compuertas técnicas avanzadas parte 2
Andrés Cuervo
 
OSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be MissingOSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be Missing
Coverity
 
Cuanto influye la tecnología en mi medio
Cuanto influye la tecnología en mi  medioCuanto influye la tecnología en mi  medio
Cuanto influye la tecnología en mi medio
agustinapascal
 
Meeting the critical needs of older people
Meeting the critical needs of older peopleMeeting the critical needs of older people
Meeting the critical needs of older people
localinsight
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
sullis
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
zukun
 
Ad

Similar to Quantifying the Performance of Garbage Collection vs. Explicit Memory Management (20)

A New Age of JVM Garbage Collectors (Clojure Conj 2019)
A New Age of JVM Garbage Collectors (Clojure Conj 2019)A New Age of JVM Garbage Collectors (Clojure Conj 2019)
A New Age of JVM Garbage Collectors (Clojure Conj 2019)
Alexander Yakushev
 
Garbage collection
Garbage collectionGarbage collection
Garbage collection
Anand Srinivasan
 
Intro to Garbage Collection
Intro to Garbage CollectionIntro to Garbage Collection
Intro to Garbage Collection
Monica Beckwith
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
ESUG
 
Memory management
Memory managementMemory management
Memory management
Daniel C. França
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)
Prashanth Kumar
 
Garbage Collection in Hotspot JVM
Garbage Collection in Hotspot JVMGarbage Collection in Hotspot JVM
Garbage Collection in Hotspot JVM
jaganmohanreddyk
 
[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe
SAP HANA Cloud Platform
 
An efficient memory system for java Garbage Collection
An efficient memory system for java Garbage CollectionAn efficient memory system for java Garbage Collection
An efficient memory system for java Garbage Collection
Rohit Deshpande
 
Memory as a Programming Concept in C and C Frantisek Franek
Memory as a Programming Concept in C and C Frantisek FranekMemory as a Programming Concept in C and C Frantisek Franek
Memory as a Programming Concept in C and C Frantisek Franek
inscomazieyq
 
Memory Management with Java and C++
Memory Management with Java and C++Memory Management with Java and C++
Memory Management with Java and C++
Mohammad Shaker
 
Jvm is-your-friend
Jvm is-your-friendJvm is-your-friend
Jvm is-your-friend
ColdFusionConference
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friend
Kai Koenig
 
Chapter 7 Run Time Environment
Chapter 7   Run Time EnvironmentChapter 7   Run Time Environment
Chapter 7 Run Time Environment
Radhakrishnan Chinnusamy
 
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
sidg75
 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory Management
Eelco Visser
 
Gclogs j1
Gclogs j1Gclogs j1
Gclogs j1
Kirk Pepperdine
 
Heap Memory Management.pptx
Heap Memory Management.pptxHeap Memory Management.pptx
Heap Memory Management.pptx
Viji B
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
osa_ora
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
Haim Yadid
 
A New Age of JVM Garbage Collectors (Clojure Conj 2019)
A New Age of JVM Garbage Collectors (Clojure Conj 2019)A New Age of JVM Garbage Collectors (Clojure Conj 2019)
A New Age of JVM Garbage Collectors (Clojure Conj 2019)
Alexander Yakushev
 
Intro to Garbage Collection
Intro to Garbage CollectionIntro to Garbage Collection
Intro to Garbage Collection
Monica Beckwith
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
ESUG
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)
Prashanth Kumar
 
Garbage Collection in Hotspot JVM
Garbage Collection in Hotspot JVMGarbage Collection in Hotspot JVM
Garbage Collection in Hotspot JVM
jaganmohanreddyk
 
An efficient memory system for java Garbage Collection
An efficient memory system for java Garbage CollectionAn efficient memory system for java Garbage Collection
An efficient memory system for java Garbage Collection
Rohit Deshpande
 
Memory as a Programming Concept in C and C Frantisek Franek
Memory as a Programming Concept in C and C Frantisek FranekMemory as a Programming Concept in C and C Frantisek Franek
Memory as a Programming Concept in C and C Frantisek Franek
inscomazieyq
 
Memory Management with Java and C++
Memory Management with Java and C++Memory Management with Java and C++
Memory Management with Java and C++
Mohammad Shaker
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friend
Kai Koenig
 
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12
sidg75
 
Compiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory ManagementCompiler Construction | Lecture 15 | Memory Management
Compiler Construction | Lecture 15 | Memory Management
Eelco Visser
 
Heap Memory Management.pptx
Heap Memory Management.pptxHeap Memory Management.pptx
Heap Memory Management.pptx
Viji B
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
osa_ora
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
Haim Yadid
 
Ad

More from Emery Berger (20)

Doppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language BarrierDoppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language Barrier
Emery Berger
 
Dthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic MultithreadingDthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic Multithreading
Emery Berger
 
Programming with People
Programming with PeopleProgramming with People
Programming with People
Emery Berger
 
Stabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance EvaluationStabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance Evaluation
Emery Berger
 
DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)
Emery Berger
 
Operating Systems - Advanced File Systems
Operating Systems - Advanced File SystemsOperating Systems - Advanced File Systems
Operating Systems - Advanced File Systems
Emery Berger
 
Operating Systems - File Systems
Operating Systems - File SystemsOperating Systems - File Systems
Operating Systems - File Systems
Emery Berger
 
Operating Systems - Networks
Operating Systems - NetworksOperating Systems - Networks
Operating Systems - Networks
Emery Berger
 
Operating Systems - Queuing Systems
Operating Systems - Queuing SystemsOperating Systems - Queuing Systems
Operating Systems - Queuing Systems
Emery Berger
 
Operating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel ComputingOperating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel Computing
Emery Berger
 
Operating Systems - Concurrency
Operating Systems - ConcurrencyOperating Systems - Concurrency
Operating Systems - Concurrency
Emery Berger
 
Operating Systems - Advanced Synchronization
Operating Systems - Advanced SynchronizationOperating Systems - Advanced Synchronization
Operating Systems - Advanced Synchronization
Emery Berger
 
Operating Systems - Synchronization
Operating Systems - SynchronizationOperating Systems - Synchronization
Operating Systems - Synchronization
Emery Berger
 
Processes and Threads
Processes and ThreadsProcesses and Threads
Processes and Threads
Emery Berger
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
Emery Berger
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
Emery Berger
 
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained EnvironmentsMC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
Emery Berger
 
Vam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory AllocatorVam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory Allocator
Emery Berger
 
Garbage Collection without Paging
Garbage Collection without PagingGarbage Collection without Paging
Garbage Collection without Paging
Emery Berger
 
DieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe LanguagesDieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe Languages
Emery Berger
 
Doppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language BarrierDoppio: Breaking the Browser Language Barrier
Doppio: Breaking the Browser Language Barrier
Emery Berger
 
Dthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic MultithreadingDthreads: Efficient Deterministic Multithreading
Dthreads: Efficient Deterministic Multithreading
Emery Berger
 
Programming with People
Programming with PeopleProgramming with People
Programming with People
Emery Berger
 
Stabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance EvaluationStabilizer: Statistically Sound Performance Evaluation
Stabilizer: Statistically Sound Performance Evaluation
Emery Berger
 
DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)DieHarder (CCS 2010, WOOT 2011)
DieHarder (CCS 2010, WOOT 2011)
Emery Berger
 
Operating Systems - Advanced File Systems
Operating Systems - Advanced File SystemsOperating Systems - Advanced File Systems
Operating Systems - Advanced File Systems
Emery Berger
 
Operating Systems - File Systems
Operating Systems - File SystemsOperating Systems - File Systems
Operating Systems - File Systems
Emery Berger
 
Operating Systems - Networks
Operating Systems - NetworksOperating Systems - Networks
Operating Systems - Networks
Emery Berger
 
Operating Systems - Queuing Systems
Operating Systems - Queuing SystemsOperating Systems - Queuing Systems
Operating Systems - Queuing Systems
Emery Berger
 
Operating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel ComputingOperating Systems - Distributed Parallel Computing
Operating Systems - Distributed Parallel Computing
Emery Berger
 
Operating Systems - Concurrency
Operating Systems - ConcurrencyOperating Systems - Concurrency
Operating Systems - Concurrency
Emery Berger
 
Operating Systems - Advanced Synchronization
Operating Systems - Advanced SynchronizationOperating Systems - Advanced Synchronization
Operating Systems - Advanced Synchronization
Emery Berger
 
Operating Systems - Synchronization
Operating Systems - SynchronizationOperating Systems - Synchronization
Operating Systems - Synchronization
Emery Berger
 
Processes and Threads
Processes and ThreadsProcesses and Threads
Processes and Threads
Emery Berger
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
Emery Berger
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
Emery Berger
 
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained EnvironmentsMC2: High-Performance Garbage Collection for Memory-Constrained Environments
MC2: High-Performance Garbage Collection for Memory-Constrained Environments
Emery Berger
 
Vam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory AllocatorVam: A Locality-Improving Dynamic Memory Allocator
Vam: A Locality-Improving Dynamic Memory Allocator
Emery Berger
 
Garbage Collection without Paging
Garbage Collection without PagingGarbage Collection without Paging
Garbage Collection without Paging
Emery Berger
 
DieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe LanguagesDieHard: Probabilistic Memory Safety for Unsafe Languages
DieHard: Probabilistic Memory Safety for Unsafe Languages
Emery Berger
 

Recently uploaded (20)

Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdfEdge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und AnwendungsfälleDomino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
panagenda
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdfEdge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und AnwendungsfälleDomino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
panagenda
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Domino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use CasesDomino IQ – What to Expect, First Steps and Use Cases
Domino IQ – What to Expect, First Steps and Use Cases
panagenda
 

Quantifying the Performance of Garbage Collection vs. Explicit Memory Management

  • 1. Quantifying the Performance of Garbage Collection vs. Explicit Memory Management Matthew Hertz Canisius College Emery Berger University of Massachusetts Amherst
  • 2. Explicit Memory Management malloc / new allocates space for an object free / delete returns memory to system Simple, but tricky to get right Forget to free  memory leak free too soon  “dangling pointer”
  • 3. Dangling Pointers Node x = new Node (“happy”); Node ptr = x; delete x; // But I’m not dead yet! Node y = new Node (“sad”); cout << ptr->data << endl; // sad  Insidious, hard-to-track down bugs
  • 4. Solution: Garbage Collection No need to call free Garbage collector periodically scans objects on heap Reclaims unreachable objects Won’t reclaim objects until it can prove object will not be used again
  • 5. No More Dangling Pointers Node x = new Node (“happy”); Node ptr = x; // x still live (reachable through ptr) Node y = new Node (“sad”); cout << ptr->data << endl; // happy!  So why not use GC all the time ?
  • 6. Conventional Wisdom “ GC worse than malloc , because…” Extra processing ( collection ) Poor cache performance ( ibid ) Bad page locality ( ibid ) Increased footprint ( delayed reclamation )
  • 7. Conventional Wisdom “ GC improves performance, by…” Quicker allocation ( fast path inlining & bump pointer alloc. ) Better cache performance ( object reordering ) Improved page locality ( heap compaction )
  • 8. Outline Motivation Quantifying GC performance A hard problem Oracular memory management Selecting & generating the Oracles Experimental methodology Results
  • 9. Quantifying GC Performance Apples-to-apples comparison Examine unaltered applications Runs differ only in memory manager Examine impact on time & space
  • 10. Quantifying GC Performance Evaluate state-of-art algorithms Garbage collectors Generational collectors Copying collectors Standard for Java, not compatible with C/C++ Explicit memory managers Fast, single-threaded allocators
  • 11. Comparing Memory Managers BDW Collector Node v = malloc(sizeof(Node)); v->data= malloc(sizeof(NodeData)); memcpy(v->data, old->data, sizeof(NodeData)); free(old->data); v->next = old->next; v->next->prev = v; v->prev = old->prev; v->prev->next = v; free(old); Using GC in C/C++ is easy:
  • 12. Comparing Memory Managers BDW Collector Node v = malloc(sizeof(Node)); v->data= malloc(sizeof(NodeData)); memcpy(v->data, old->data, sizeof(NodeData)); free(old->data); v->next = old->next; v->next->prev = v; v->prev = old->prev; v->prev->next = v; free(old); … ignore calls to free .
  • 13. Comparing Memory Managers Lea Allocator Node node = new Node(); node.data = new NodeData(); useNode(node); node = null; ... node = new Node(); ... node.data = new NodeData(); ... Adding malloc/free to Java: not easy…
  • 14. Comparing Memory Managers Lea Allocator Node node = new Node(); node.data = new NodeData(); useNode(node); node = null; ... node = new Node(); ... node.data = new NodeData(); ... ... where should free be inserted? free(node.data)? free(node)?
  • 15. Inserting Free Calls Do not know where programmer would call free Hints provided from null -ing pointers Restructure code to avoid memory leaks? Tests programming skills, not memory manager Want unaltered applications
  • 16. Oracular Memory Manager Oracle Consult oracle to place free calls Oracle does not disrupt hardware state Simulator inserts free … Java Simulator C malloc/free perform actions at no cost below here execute program here allocation
  • 17. Object Lifetime & Oracle Placement Oracles bracket placement of frees Lifetime -based : most aggressive Reachability-based : most conservative unreachable live dead reachable free(obj) obj = new Object; free(obj) free(??) freed by lifetime-based oracle freed by reachability-based oracle can be collected can be freed
  • 18. Reachability Oracle Generation Illegal instructions mark heap events Simulated identically to legal instructions Oracle Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocations, ptr updates, prog roots Merlin analysis
  • 19. Liveness Oracle Generation Record allocations, memory accesses Preserve code, type objects, etc. May use objects without accessing them Oracle Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocations, mem access, prog roots Post- process
  • 20. Liveness Oracle Generation Record allocations, memory accesses Preserve code, type objects, etc. May use objects without accessing them Oracle if (f.x == y) { … } uses address of f.x , but may not touch f.x or f Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here trace file allocation, mem access, prog. roots Post- process
  • 21. Oracular Memory Manager Consult oracle before each allocation When needed, modify instructions to call free Extra costs hidden by simulator Java PowerPC Simulator C malloc/free perform actions at no cost below here execute program here oracle allocation
  • 22. Experimental Methodology Java platform: MMTk/Jikes RVM(2.3.2) Simulator: Dynamic SimpleScalar (DSS) Simulates 2GHz PowerPC processor G5 cache configuration
  • 23. Experimental Methodology Garbage collectors: GenMS, GenCopy, GenRC, SemiSpace, CopyMS, MarkSweep Explicit memory managers: Lea, MSExplicit (MS + explicit deallocation)
  • 24. Experimental Methodology Perfectly repeatable runs Pseudoadaptive compiler Same sequence of optimizations Advice generated from mean of 5 runs Deterministic thread switching Deterministic system clock Use “illegal” instructions in all runs
  • 25. Execution Time for pseudoJBB GC performance can be competitive
  • 26. Footprint at Quickest Run GC uses much more memory
  • 27. Footprint at Quickest Run GC uses much more memory 1.00 1.38 1.61 5.10 5.66 4.84 7.69 7.09 0.63
  • 28. Avg. Relative Cycles and Footprint GC trades space for time
  • 29. Javac Paging Performance Much slower in limited physical RAM
  • 30. pseudoJBB Paging Performance Lifetime analysis adds little
  • 31. Summary of Results Best collector equals Lea's performance… Up to 10% faster on some benchmarks ... but uses more memory Quickest runs use 5x or more memory At least twice mean footprint
  • 32. Take-home: Practitioners GC ok if: system has more than 3x needed RAM, and no competition with other processes GC not so good if: Limited RAM Competition for physical memory Relies upon RAM for performance In-memory database Search engines, etc.
  • 33. Take-home: Researchers GC performance already good enough with enough RAM Problems: Paging is a killer Performance suffers when RAM limited
  • 34. Future Work Obvious dimensions Other collectors: Bookmarking collector [PLDI 05] Parallel collectors Other allocators: New version of DLmalloc (2.8.2) VAM [ISMM 05] Other architectures: Examine impact of cache size
  • 35. Future Work Other memory management methods Regions, reaps
  • 36. Conclusion Code available at: http://www-cs.canisius.edu/~hertzm