1 / 34

Myths & Realities The Performance Impact of Garbage Collection

Myths & Realities The Performance Impact of Garbage Collection. Background. No prior apples-to-apples comparisons MMTk Canonical policies implemented (SS, MS, RC, genX, etc) Shared mechanisms Good performance (match/beat old Watson GCs) Ideal platform for apples-to-apples comparisons.

kayla
Download Presentation

Myths & Realities The Performance Impact of Garbage Collection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Myths & RealitiesThe Performance Impact of Garbage Collection

  2. Background • No prior apples-to-apples comparisons • MMTk • Canonical policies implemented (SS, MS, RC, genX, etc) • Shared mechanisms • Good performance (match/beat old Watson GCs) • Ideal platform for apples-to-apples comparisons Myths & Realities: The performance impact of garbage collection

  3. Some Questions • Architecture • How well do modern OO languages play to modern architectures? • Collection • Is generational GC “a waste of time”? • Are write barriers expensive? • Allocation • Free list or bump pointer? • “Locality is everything” • Really??? • Is it different for young & old? Why? • Locality and architecture • What is the impact, what is the trend? Myths & Realities: The performance impact of garbage collection

  4. Methodology • Jikes RVM & MMTk • Platforms • 1.6GHz G5 (PowerPC 970) • 1.9GHz AMD Athlon 2600+ • 2.6GHz Intel P4 • Linux 2.6.0 with perfctr patch & libraries • Separate accounting of GC & Mutator perf counts • SPECjvm98 & pseudojbb Myths & Realities: The performance impact of garbage collection

  5. Architecture Myths & Realities: The performance impact of garbage collection

  6. Relative Performance Myths & Realities: The performance impact of garbage collection

  7. Architecture - Q & A How big is the mismatch between modern arch & modern languages??? Myths & Realities: The performance impact of garbage collection

  8. Allocation Myths & Realities: The performance impact of garbage collection

  9. Allocation Choices • Bump pointer • ~70 bytes IA32 instructions, 726MB/s • Free list • ~140 bytes IA32 instructions, 654MB/s • Bump pointer 11% faster in tight loop • < 1% in practical setting • No significant difference (?) • Second order effects? • Locality?? • Collection mechanism?? Myths & Realities: The performance impact of garbage collection

  10. Implications for Locality • Compare SS & MS mutator • Mutator time = total – GC time • Mutator memory performance: L1, L2 & TLB Myths & Realities: The performance impact of garbage collection

  11. jess Myths & Realities: The performance impact of garbage collection

  12. jess Myths & Realities: The performance impact of garbage collection

  13. jess Myths & Realities: The performance impact of garbage collection

  14. jess Myths & Realities: The performance impact of garbage collection

  15. javac Myths & Realities: The performance impact of garbage collection

  16. pseudojbb Myths & Realities: The performance impact of garbage collection

  17. db Myths & Realities: The performance impact of garbage collection

  18. Locality Myths & Realities: The performance impact of garbage collection

  19. Bump Pointer & Free List • Is the locality differential age-dependant? • Re-run experiment with GenCopy & GenMS • Generational variants of MarkSweep & SemiSpace • Young objects treated identically • Mature objects either SemiSpace or MarkSweep Myths & Realities: The performance impact of garbage collection

  20. Bump Pointer & Free List Myths & Realities: The performance impact of garbage collection

  21. Bump Pointer & Free List • Why? • Mature space locality? • Nursery absorbs most allocs – lower frag • Relatively frequent copying in SS • Contigious allocation in nursery? Myths & Realities: The performance impact of garbage collection

  22. Bump Pointer & Free List • Why? • Mature space locality? • Nursery absorbs most allocs – lower frag • Relatively frequent copying in SS • Contigious allocation in nursery? Myths & Realities: The performance impact of garbage collection

  23. Bump Pointer & Free List • Why? • Mature space locality • Nursery absorbs most allocs – lower frag • Relatively frequent copying in SS • Contigious allocation in nursery Myths & Realities: The performance impact of garbage collection

  24. Bump Pointer & Free List Run SS & MS in “infinite” heap Myths & Realities: The performance impact of garbage collection

  25. Bump Pointer & Free List Run SS & MS in “infinite” heap Myths & Realities: The performance impact of garbage collection

  26. Bump Pointer & Free List Run SS & MS in “infinite” heap • Infinite heap does not degrade locality (!?) • Exceptions: jess (degrades), db (improves) why? • Is spatial locality unimportant in mature space??? Myths & Realities: The performance impact of garbage collection

  27. BP & FL Locality Implications • Is spatial locality unimportant in mature space?? • No [Huang et al OOPSLA 2004] • But perhaps temporal locality is more significant • Seems clear contiguous allocation is good • Vast majority of objects < cache line • h/w prefetcher may be significant • Hard to improve over alloc order, easy to mess up? • Unlikely to be true: MarkSweep < Compacting < SemiSpace Myths & Realities: The performance impact of garbage collection

  28. Locality &Architecture Myths & Realities: The performance impact of garbage collection

  29. MS/SS Crossover: 1.6GHz PPC Myths & Realities: The performance impact of garbage collection

  30. MS/SS Crossover: 1.9GHz AMD Myths & Realities: The performance impact of garbage collection

  31. MS/SS Crossover: 2.6GHz P4 Myths & Realities: The performance impact of garbage collection

  32. MS/SS Crossover: 3.2GHz P4 Myths & Realities: The performance impact of garbage collection

  33. MS/SS Crossover locality space 2.6GHz 1.6GHz 1.9GHz 3.2GHz Myths & Realities: The performance impact of garbage collection

  34. Conclusions • Need for (re) evaluation of GC performance • Key GC insights > 20yrs old • Technology has changed • Absence of apples-to-apples comparisons • Highly architecturally sensitive • MMTk + perf counters • High performance infrastructure • Multiple GCs, shared mechanisms • Some myths exposed & new realities Myths & Realities: The performance impact of garbage collection

More Related