Using GC Efficiently – Part 1

So the goal here is to explain the cost of things so you can make good decisions in your managed memory usage – it’s not to explain GC itself – it’s to explain how to use it. I assume most of you are more interested in using a garbage collector than implementing one yourself.  It…

69

Using GC Efficiently – Part 2

In this article I’ll talk about different flavors of GC, the design goals behind each of them and how they work differently from each other so you can make a good decision of which flavor of GC you should choose for your applications.   Existing GC flavors in the runtime today   We have the…

66

GC Performance Counters

There are many .NET Memory Performance Counters and this is meant to give you some guidelines in interpreting the counter data and how to correlate them. This assumes you have a basic understanding of GC.   First thing you may want to look at is “% Time in GC”. This is the percentage of the…

52

64-bit vs 32-bit

As 64-bit machines become more common, the problems we need to solve also evolve. In this post I’d like to talk about what it means for the GC and the applications’ memory usage when we move from 32-bit to 64-bit.   One big limitation of 32-bit is the virtual memory address space – as a…

50

Gen2 free list changes in CLR 4.6 GC

I wanted to mention this because I started seeing posts about it. In 4.6 we improved the way we use the gen2 free list to promote gen1 survivors into. Unfortunately there was a perf bug that I didn’t notice till it was fairly late so it wasn’t approved to be checked into 4.6 at the…

40

Using GC Efficiently – Part 3

In this article I’ll talk about pinning and weak references – stuff related to GC handles.   (I was planning on talking about finalization in this part of the “Using GC Efficiently” series but since I already covered it in pretty much detail in one of my previous blog entries I won’t repeat it here….

28

So, what’s new in the CLR 4.0 GC?

PDC 2008 happened not long ago so I get to write another “what’s new in GC” blog entry. For quite a while now I’ve been working on a new concurrent GC that replaces the existing one. And this new concurrent GC is called “background GC”. First of all let me apologize for having not written…

24

Clearing up some confusion over finalization and other areas in GC

In the WinDev conference that I just went to, there seems to be some confusion over finalization (such as why it even exists and etc) and other areas. I hope the following will clear up that confusion. If not, let me know.   Finalization   1)      Why we have finalization   Finalization is necessary because…

21

Large Object Heap

LOH (Large Object Heap) contains objects that are 85,000 bytes or bigger (there’s also some objects that are less than 85,000 bytes that are allocated on the LOH by the runtime itself but usually they are very small and we’ll ignore them for this discussion).   The way LOH is implemented changed dramatically from 1.0…

21

I Am a Happy Janitor – Part 1: Finding garbage

Indeed what I do is very much like the job of the janitors – like the ones who clean your building, or janitors you see at a food court, or yourself when you are taking care of garbage at your house. Doubtful you say? Let me prove it to you.   Finding garbage   What…

21