none
Range for Server GC Generation 0 durations RRS feed

  • Question

  • Hi,

    Can someone from MSFT share the expected range for Server GC Generation 0 durations?
    With ETW, I'm observing 3.5 to 6.5 milliseconds for my app running on .NET 3.5 SP1.
    I want to know if this is inline with what is expected.

    Thanks!
    YeeMan
    Tuesday, October 20, 2009 3:47 PM

Answers

  • Hi,
    Actually, the generation 0 objects' duration is consist of two parts:
        part1: from the point that an managed object was allocated to the point that gen 0 heap has no space for next object. (>90%)
        part2: is the GC time. (<10%)

    if the gen 0 heap is exhausted too quick, the duration will be shorter; if little objects are created, the duration will be longer.
    So, instead of digging too much on that value, it is better to pay more attention on the percentage of GC time, it is a bad sign if the percentage higger than 10% (you can see the percentage value from Performance Monitor by adding '% Time in GC ' under '.NET CLR Memory ' catagory).
    By the way, if GC finds that most gen 0 objects are collected per GC operation, it will decrease the gen 0 heap size to make the GC more easier and faster. Vice versa (if gen 0 heap size is increased, it will reduce the GC frequency.), the '% Time in GC ' will benifit a lot from the dynamic adjustment.

    Thanks,
    Eric 



    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    • Marked as answer by YeeManB Thursday, October 22, 2009 1:13 PM
    Thursday, October 22, 2009 9:06 AM

All replies

  • Hi,
    Actually, the generation 0 objects' duration is consist of two parts:
        part1: from the point that an managed object was allocated to the point that gen 0 heap has no space for next object. (>90%)
        part2: is the GC time. (<10%)

    if the gen 0 heap is exhausted too quick, the duration will be shorter; if little objects are created, the duration will be longer.
    So, instead of digging too much on that value, it is better to pay more attention on the percentage of GC time, it is a bad sign if the percentage higger than 10% (you can see the percentage value from Performance Monitor by adding '% Time in GC ' under '.NET CLR Memory ' catagory).
    By the way, if GC finds that most gen 0 objects are collected per GC operation, it will decrease the gen 0 heap size to make the GC more easier and faster. Vice versa (if gen 0 heap size is increased, it will reduce the GC frequency.), the '% Time in GC ' will benifit a lot from the dynamic adjustment.

    Thanks,
    Eric 



    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    • Marked as answer by YeeManB Thursday, October 22, 2009 1:13 PM
    Thursday, October 22, 2009 9:06 AM
  • Clarification:
    The duration I am speaking of is from CLR GC SuspendEE to CLR GC ResumeFromSuspension.
    So I think it's just your part2.

    My % time in GC is less than 10%, but we still want to minimze GC pauses.

    I am noticing a significantly bigger Gen0 heap then Gen1 with a lot of Promoted Finalized Objects from Gen 0.
    From your advice and my observations, I'll try to get rid of these objects if at all possible. 
    I think that will shrink my GC times.

    Thursday, October 22, 2009 1:13 PM