1 / 21

Task-aware Garbage Collection in a Multi-Tasking Virtual Machine

Task-aware Garbage Collection in a Multi-Tasking Virtual Machine. Sunil Soman Laurent Dayn è s Chandra Krintz RACE Lab, UC Santa Barbara Sun Microsystems Labs. Outline. Introduction MVM overview Task-aware collection Performance isolation Fast, immediate resource reclamation

bess
Download Presentation

Task-aware Garbage Collection in a Multi-Tasking Virtual Machine

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. Task-aware Garbage Collection in a Multi-Tasking Virtual Machine Sunil Soman Laurent Daynès Chandra Krintz RACE Lab, UC Santa Barbara Sun Microsystems Labs

  2. Outline • Introduction • MVM overview • Task-aware collection • Performance isolation • Fast, immediate resource reclamation • Independent allocation & young gen collection • Evaluation • Conclusion

  3. Introduction • Multi-tasking VMs • Multiple users/applications • Improved startup • Reuse & sharing • Performance isolation • Accounting & timely resource reclamation • Sharing/performance isolation conflict • Loss of scalability • Bottleneck: memory management system

  4. MVM overview • Multiple isolated instances in same VM • Implements Isolates API (JSR 121) • Safety & isolation guaranteed • Task re-entrance • Class sharing • Separate task-dependent parts, rest shared • Accessed thru table indexed by unique task id • Based on Hotspot VM • Generational mark-compact GC

  5. MVM Garbage Collection • Shared generational heap • Scavenged young gen (eden & survivor spaces) • 4 phase mark-compact collected old generation • Card table for tracking mature to young pointers eden young from to old permanent

  6. MVM Garbage Collection • Lack of “task awareness” • Scalability & performance isolation • Space occupied by dead tasks reclaimed on GC • Parameter virtualization

  7. Task-aware collection • Performance isolation • Hybrid heap layout • Task-concurrent scavenging • Fast, immediate resource reclamation • Without requiring full or partial GC

  8. Hybrid heap layout eden from to old permanent eden to from Per-task . . eden to from

  9. Hybrid heap layout: young gen

  10. Hybrid heap layout: Old gen • Promotion Area Buffers • Per-task old generation regions • Allocated on demand • Adjusted on full heap GC • Used for scavenging & pretenuring • Provide • Performance isolation • GC-less reclamation on task termination • Per-task card table scanning • Enabled due to precise accounting of old gen

  11. Task 3 Allocation top Allocation top Allocation top Allocation top Resource Reclamation Task 1 Task 2 Free PABs . . . . .

  12. Task-concurrent Scavenging • Leverages hybrid heap design • Mutators can execute during scavenge • Concurrent old gen direct allocation • Synchronization • Threads belonging to GC initiator stopped • Threads poll on protected page • Suspended on access fault • Threads belonging to other tasks not suspended

  13. Evaluation • Experimental setup • Dual UltraSPARC 1.5GHz, Solaris 10 • Dacapo & Spec98 benchmarks long app short app … time • Throughput & Response time • # short apps & average pause time • Hybrid heap layout vs Shared heap

  14. Results: Thruput & resp. time Short (javac w/small input) + long running program (jess, jack, ps)

  15. Evaluation • Concurrent execution performance • Hybrid heap + task-conc. scavenging vs shared • Instances of same task run concurrently • 1 thru 5 instances • GC time & # GCs • End-to-end execution time

  16. Concurrent Exec: GC Time 62% 54% 100%

  17. Concurrent Exec: Change in GCs

  18. Concurrent Exec: Exec. Time

  19. Related Work • Prior MVM • Thread-local heaps [Domani ’02, Steensgaard ’00] • Isolation [Back ’05] • Card table/remset opt [Azagury ’98, Detlefs ’02]

  20. Summary • Task-aware collection • Performance isolation • Immediate, GC-free reclamation • Heap layout, mechanisms & perf. evaluation • Significantly improves overall execution, throughput & response time

  21. Future Work • Better multi-tasking workloads • Old generation collection • Independent collection of PABs • Different collection policies • Automatic performance tuning • Per-application tuning of GC parameters • Global management

More Related