1 / 23

Future of GC

FT36. Future of GC. Patrick Dussud Technical Fellow Developer Division. Why I A m Excited to Work on GC. Large benefit for customer workloads Sometimes larger than code generation gains GC contract is crisp and small Simple principles

marlis
Télécharger la présentation

Future of GC

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. FT36 Future of GC Patrick Dussud Technical Fellow Developer Division

  2. Why I Am Excited to Work on GC • Large benefit for customer workloads • Sometimes larger than code generation gains • GC contract is crisp and small • Simple principles • The implementation can greatly evolve without compromising compatibility • It’s still a relatively unexplored area, in terms of engineering

  3. Contents • GC backgrounder • CLR GC history • Future Directions

  4. GC Principles • Automatic discovery of live data • System can destroy and reclaim the rest • Two techniques • Tracing • Reference Count • In fact there are multiple variants in between

  5. GC Factors of Merit • Speed of the allocator • GC time overhead (% in GC) • GC pause time • Working set for a given workload • Multi – Core scaling (all of preceding F.O.M)

  6. Mechanisms and Policy • Often mechanisms are a clever way to implement a policy (see favorite GC research papers) • Better: An architecture including multiple policy-free mechanisms controlled by policy • Key to a long lived implementation

  7. CLR GC architecture .NET FX and program CLR Rootscanning GC Policies Thread suspension Mechanisms Runtime Helpers Virtual Memory and OS or Hosting layer

  8. CLR GC V1 • Choice of Workstation or server GC • Common architecture • Both allocators are MP scalable • Most mechanisms are shared • Policies are tuned to each scenarios • Concurrent GC to reduce pause time • MP scalable GC for servers to reduce GC overhead

  9. CLR GC V1 Workload Assumptions • Workstation • Allocation activity is moderate • Low pause time important • Server • Uniform workload on multiple requests • Pause time tolerable

  10. CLR V3 GC • Workstation • Low latency mode API • Server GC • Gen 2 notifications API

  11. CLR V4 GC • Workstation • Background GC: Allows ephemeral GCs (Gen0-1) while engaged in a concurrent Gen2 GC • Alleviate the assumption that allocation activity is moderate • Net effect: Reduced pause time in full GC for all workloads

  12. Technology Trends • More cores • More memory (Larger heaps) • Virtualization

  13. GC Scorecard • Speed of the allocator • GC time overhead (% in GC) • Max GC pause time for large heaps • Working set for a given workload

  14. GC Pause Time • Background GC needs more feedback but it seems very good so far • Same approach can be brought to Server GC • Real Time GC not likely for mainstream CLR because of its adverse effect on program execution speed (read barriers)

  15. Working Set • Large Object Heap isn’t compacting • Background GC isn’t compacting • Will pause executing threads on low memory situations • Considering LOH compaction • Partial compaction for Background GC • Picking a badly fragmented (small)area • Compacting it while doing a gen0-1 GC

  16. How About Hardware Assist? • Done in the 80s:TI Explorer and Symbolics Ivory chips • At that time transistors were at a premium, Ivory was too slow for general computing • Now transistors are cheaper • Read Barriers would give the most bang for the buck

  17. How About OS assist? • Good research on avoiding paged out object scanning • Paging is becoming less relevant • Some mechanisms canbe improved by having more integration between the Virtual Memory manager and the segment manager of GC • Useful for virtualization • Can delay paging

  18. More Ideas Worth Exploring • Tracing is worthwhile when survival is low • Gen2 survival is generally high • Loosely maintained Reference Count on Gen2 objects would allow for a large percentage of dead objects reclamation without tracing the whole heap. There is research literature on the subject

  19. A Final Note • Thank you for providing so much feedback over the years! • Keep the feedback coming. This is what makes our GC great!

  20. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  21. Learn More On Channel 9 • Expand your PDC experience through Channel 9. • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses. channel9.msdn.com/learn Built by Developers for Developers….

More Related