performance considerations in concurrent garbage
play

Performance Considerations in Concurrent Garbage-Collected Systems - PowerPoint PPT Presentation

Performance Considerations in Concurrent Garbage-Collected Systems Peter Holditch, Chief Architect EMEA, Azul Systems Presented to JAOO 2008 Garbage Collection Series About the speaker Peter Holditch (Chief Architect, EMEA), Azul Systems


  1. Performance Considerations in Concurrent Garbage-Collected Systems Peter Holditch, Chief Architect EMEA, Azul Systems Presented to JAOO 2008 Garbage Collection Series

  2. About the speaker Peter Holditch (Chief Architect, EMEA), Azul Systems Working with distributed TP systems for nearly 20 years Working with java TP systems since WLS 4.0 (9 years ago…) Dealing with java application performance / scale problems daily Concurrent GC is a must have for this… • Can’t scale without it 2008 Garbage Collection Series | www.azulsytems.com/e2e 2

  3. About Azul Azul makes scalable Java Compute Appliances • Power Java Virtual Machines on Solaris OS, Linux, AIX, HPUX • Scale individual instances to 100s of cores and 100s of GB • Production installations ranging from 1GB to 320GB of heap All our customers run business-critical java systems aided by our hardware 2008 Garbage Collection Series | www.azulsytems.com/e2e 3

  4. What’s a concurrent garbage collector? A Concurrent Collector performs garbage collection work concurrently with the application’s own execution A Parallel Collector uses multiple CPUs to perform garbage collection 2008 Garbage Collection Series | www.azulsytems.com/e2e 4

  5. Agenda Background – The big picture A load on garbage – The gory details • Failure & Sensitivity • Terminology & Metrics • Detail and inter-relations of key metrics • Collector mechanism examples Testing Recommendations Q & A 2008 Garbage Collection Series | www.azulsytems.com/e2e 5

  6. Why we really need concurrent collectors Software is unable to fill up hardware effectively 2000: • A 512MB heap was “large” • A 1GB commodity server was “large” • A 2 core commodity server was “large” 2008: • A 2GB heap is “large” • A 32-64GB commodity server is “medium” • An 8-16 core commodity server is “medium” The erosion started in the late 1990s 2008 Garbage Collection Series | www.azulsytems.com/e2e 6

  7. Why we really need concurrent collectors Software is unable to fill up hardware effectively V o l u m e 2000: • A 512MB heap was “large” • A 1GB commodity server was “large” • A 2 core commodity server was “large” 2008: • A 2GB heap is “large” • A 32-64GB commodity server is “medium” • An 8-16 core commodity server is “medium” The erosion started in the late 1990s 2008 Garbage Collection Series | www.azulsytems.com/e2e 7

  8. Benefits for trading platforms Azul benefit to Data User Issue Benefit Server Heap size increased Trading volume increased Trading volumes peak at from 2.2 GB to 22 GB NY 10X to 1.6M concurrent 10x increase in trading volume 10x increase in trading volume 156k concurrent trades Peak GC pause time Investment trades > 10 sec peak GC pause Bank #1 reduced from 10 sec 3-4x shorter batch duration 3-4x shorter batch duration Consistent response times times to < 1 sec Room to grow 2x greater clearing volume 2x greater clearing volume Batch report on 20,000 Batch job duration reduced Memory increased by 3X to 2 hours trading positions requires 6 NY from 6 GB to 28 GB hours to complete Higher quality reporting data Investment live data Ability to run on-line processing Ability to run on-line processing Stale reporting data Increased trading throughput Bank #2 No more GC pauses GC instabilities with 6 GB Application stability and and end of day concurrently and end of day concurrently live data response time consistency 4-hour end-of-day batch Batch job reduced by 4X to UK Heap size increased job <1 hour Investment from 4 GB to 10 GB Azul uniquely delivers these benefits Azul uniquely delivers these benefits Higher quality reporting data Limited number of Bank #1 concurrent trades Increased trading throughput with no application changes with no application changes End-of day clearing limited End-of-day clearing volume Heap size increased (and in a reduced datacentre footprint) (and in a reduced datacentre footprint) to 150k trades increased 2X to 300k trades from 10 GB to 40 GB UK Trading volume limited to 6 Trading volume increased GC pauses reduced Investment trades / second 2X to 12 trades / second bank #2 from 3 mins to < 1 3 minute peak GC pauses Fast, consistent response second with 10 GB heap times 2008 Garbage Collection Series | www.azulsytems.com/e2e 8

  9. Scale Without Sprawl With Azul Before Azul • 55% Less Power • 60% less Cost 8kW / 36U 20 million users 16 x 2-socket 4 x Azul 3220 dual core x86 70+ x 2-socket dual core x86 18kW / 70U 6kW / 36U 4 x Azul 3210 10 million users 56 x 2-socket dual core x86 16 x 2-socket • 57% Less Power 14kW / 56U dual core x86 • 50% less Cost 1 million users 44 x86 based servers (Single core) 11kW / 44U 2008 Garbage Collection Series | www.azulsytems.com/e2e 9

  10. High throughput, large dataset problems DB 2008 Garbage Collection Series | www.azulsytems.com/e2e 10

  11. High throughput, large dataset problems Cache DB 2008 Garbage Collection Series | www.azulsytems.com/e2e 11

  12. High throughput, large dataset problems DB 2008 Garbage Collection Series | www.azulsytems.com/e2e 12

  13. High throughput, large dataset problems Cache Cache DB 2008 Garbage Collection Series | www.azulsytems.com/e2e 13

  14. Agenda Background – The big picture A load on garbage – The gory details • Failure & Sensitivity • Terminology & Metrics • Detail and inter-relations of key metrics • Collector mechanism examples Testing Recommendations Q & A 2008 Garbage Collection Series | www.azulsytems.com/e2e 14

  15. What constitutes “failure” for a collector? It’s not just about correctness any more A Stop-The-World collector fails if it gets it wrong… A concurrent collector [also] fails if it stops the application for longer than requirements permit • “Occasional pauses” longer than SLA allows are real failures • Even if the Application Instance or JVM didn’t crash • Otherwise, you would have used a STW collector to begin with Simple example: Clustering • Node failover must occur in X seconds or less • A GC pause longer than X will trigger failover. It’s a fault. ( If you don’t think so, ask the guy whose pager just went off… ) 2008 Garbage Collection Series | www.azulsytems.com/e2e 15

  16. Concurrent collectors can be sensitive Go out of the smooth operating range, and you’ll pause Correctness now includes response time Just because it didn’t pause under load X, doesn’t mean it won’t pause under load Y Outside of the smooth operating range: • More state (with no additional load) can cause a pause • More load (with no additional state) can cause a pause • Different use patterns can cause a pause Understand/Characterize your smooth operating range 2008 Garbage Collection Series | www.azulsytems.com/e2e 16

  17. Terminology Useful terms for discussing concurrent collection Mutator Promotion • Your program… • Allocation into old generation Parallel Marking • Can use multiple CPUs • Finding all live objects Concurrent Sweeping • Runs concurrently with program • Locating the dead objects Pause time Compaction • Time during which mutator is not • Defragments heap running any code • Moves objects in memory Generational • Remaps all affected references • Frees contiguous memory regions • Collects young objects and long lived objects separately. 2008 Garbage Collection Series | www.azulsytems.com/e2e 17

  18. Metrics Useful metrics for discussing concurrent collection Heap population (aka Live set) Cycle time • How much of your heap is alive • How long it takes the collector to free up memory Allocation rate Marking time • How fast you allocate • How long it takes the collector to Mutation rate find all live objects • How fast your program updates Sweep time references in memory • How long it takes to locate dead Heap Shape objects • The shape of the live object graph • * Relevant for Mark-Sweep • * Hard to quantify as a metric... Compaction time Object Lifetime • How long it takes to free up • How long objects live memory by relocating objects • * Relevant for Mark-Compact 2008 Garbage Collection Series | www.azulsytems.com/e2e 18

  19. Cycle Time How long until we can have some more free memory? Heap Population (Live Set) matters • The more objects there are to paint, the longer it takes Heap Shape matters • Affects how well a parallel marker will do • One long linked list is the worst case of most markers How many passes matters • A multi-pass marker revisits references modified in each pass • Marking time can therefore vary significantly with load 2008 Garbage Collection Series | www.azulsytems.com/e2e 19

  20. Heap Population (Live Set) It’s not as simple as you might think… In a Stop-The-World situation, this is simple • Start with the “roots” and paint the world • Only things you have actual references to are alive When mutator runs concurrently with GC: • Not a “snapshot” of a single program state • Objects allocated during GC cycle are considered “live” • Objects that die after GC starts may be considered “live” • Weak references “strengthened” during GC… So assume: • Live_Set >= STW_live_set + (Allocation_Rate * Cycle_time) 2008 Garbage Collection Series | www.azulsytems.com/e2e 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend