Presentation is loading. Please wait.

Presentation is loading. Please wait.

Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department.

Similar presentations


Presentation on theme: "Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department."— Presentation transcript:

1 Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department of Computer Sciences University of Texas at Austin IBM Research Myths & Realities The Performance Impact of Garbage Collection

2 Monday, April 13, 2015Myths & 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

3 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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?

4 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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

5 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Architecture

6 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Relative Performance Athlon 2600+ 1.9GHz P4 2.6GHz G5 1.6GHz compress0.931.001.18 jess0.881.001.20 raytrace0.711.000.73 db0.971.001.68 javac0.671.001.37 mtrt0.691.000.75 jack0.621.001.11 pseudojbb0.771.001.24

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

8 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Allocation

9 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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??

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

11 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection jess

12 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection jess

13 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection jess

14 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection jess

15 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection javac

16 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection pseudojbb

17 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection db

18 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Locality

19 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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

20 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Bump Pointer & Free List

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

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

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

24 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Bump Pointer & Free List Run SS & MS in “infinite” heap

25 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Bump Pointer & Free List Run SS & MS in “infinite” heap

26 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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???

27 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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

28 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection Locality & Architecture

29 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection MS/SS Crossover: 1.6GHz PPC

30 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection MS/SS Crossover: 1.9GHz AMD

31 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection MS/SS Crossover: 2.6GHz P4

32 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection MS/SS Crossover: 3.2GHz P4

33 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection MS/SS Crossover 2.6GHz 1.9GHz 1.6GHz localityspace 3.2GHz

34 Monday, April 13, 2015Myths & Realities: The performance impact of garbage collection 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


Download ppt "Steve Blackburn Department of Computer Science Australian National University Perry Cheng TJ Watson Research Center IBM Research Kathryn McKinley Department."

Similar presentations


Ads by Google