none
SustainedLowLatency question RRS feed

Answers

  • Hi Kiran,

    SustainedLowLatency mode on .NET Framework 4.0  (available with 4.0.3 update ) applies  only to Workstation GC.

    SustainedLowLatency mode on .NET Framework 4.5 applies to both Workstation and Server GC.

    This is because the SustainedLowLatency mode only makes sense when you have background GC enabled, and in .NET Framework 4.0 we don't have background GC for Server GC, just for Workstation. Background Server GC is introduced in .NET Framework 4.5.

    The purpose of SustainedLowLatency mode is to prevent long pauses caused by a blocking Gen2 collection. While this mode is set, you will only have Gen0, Gen1, and background Gen2 collections. A blocking Gen2 can still happen but only if the system is low in memory or the user induces a collection (calls GC.Collect).

    Thanks,

    Alina Popa

    Common Language Runtime

    Thursday, March 8, 2012 6:18 PM
  • Hi Kiran,

    Welcome to the MSDN Forum.

    Based on my understanding, it is different from each other, but they don't contrary to each other. The note here is a kind of remark, like notice. And this one explain what it is or how it works.

    One of my guess about you think they are different is that you saw "If .... is not enabled, SustainedLowLatency does not affect garbage collection behavior." But "Enables garbage collection that ...", I think that there is such sentence before "Enables garbage collection ..." like "when concurrent garbage collection is enabled," because when you want to set the GCLatencyMode, you should enable "concurrent garbage collection".

    I hope I am clear.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 8, 2012 2:49 PM
    Moderator

All replies

  • Hi Kiran,

    Welcome to the MSDN Forum.

    Based on my understanding, it is different from each other, but they don't contrary to each other. The note here is a kind of remark, like notice. And this one explain what it is or how it works.

    One of my guess about you think they are different is that you saw "If .... is not enabled, SustainedLowLatency does not affect garbage collection behavior." But "Enables garbage collection that ...", I think that there is such sentence before "Enables garbage collection ..." like "when concurrent garbage collection is enabled," because when you want to set the GCLatencyMode, you should enable "concurrent garbage collection".

    I hope I am clear.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 8, 2012 2:49 PM
    Moderator
  • Hi Kiran,

    SustainedLowLatency mode on .NET Framework 4.0  (available with 4.0.3 update ) applies  only to Workstation GC.

    SustainedLowLatency mode on .NET Framework 4.5 applies to both Workstation and Server GC.

    This is because the SustainedLowLatency mode only makes sense when you have background GC enabled, and in .NET Framework 4.0 we don't have background GC for Server GC, just for Workstation. Background Server GC is introduced in .NET Framework 4.5.

    The purpose of SustainedLowLatency mode is to prevent long pauses caused by a blocking Gen2 collection. While this mode is set, you will only have Gen0, Gen1, and background Gen2 collections. A blocking Gen2 can still happen but only if the system is low in memory or the user induces a collection (calls GC.Collect).

    Thanks,

    Alina Popa

    Common Language Runtime

    Thursday, March 8, 2012 6:18 PM
  • Can we have steps or code sample to implement SustainedLowLatency mode in our C# project which is being called from VC++.Net code?
    Monday, February 11, 2013 12:06 PM