Presentation is loading. Please wait.

Presentation is loading. Please wait.

Patrick Dussud Technical Fellow Developer Division

Similar presentations


Presentation on theme: "Patrick Dussud Technical Fellow Developer Division"— Presentation transcript:

1 Patrick Dussud Technical Fellow Developer Division
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 Two techniques
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 Virtual Memory and OS or Hosting layer
CLR GC architecture .NET FX and program CLR Root scanning 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 Server GC Low latency mode API
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 channel9.msdn.com/learn
11/22/2018 4:27 PM 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…. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22

23


Download ppt "Patrick Dussud Technical Fellow Developer Division"

Similar presentations


Ads by Google