2

A while ago we got blessed with the ability to manually compact the Large Object Heap (LOH). I'v read through the GCSettings.LargeObjectHeapCompactionMode Property. What I cannot understand is if one should periodically set this property to GCLargeObjectHeapCompactionMode.CompactOnce or not in order to ensure the health of a long living IIS app pool i.e. manually request LOH compaction.

I do understand that this primarily is a matter of the particular design i.e. common request/response profile, WCF structure and so on. But are there general rules? Does one sound like "never do manual compaction before you are really sure you need that"?

Recently I had a round of refactoring on ASP.NET app I developed 7 years ago. When it was developed I would not give a dime for a thought it is ever going to handle requests 100k in length or it would have to prepare responses of that length. What a noob. It does every other second. Manual compaction helped for the period I was having it overhauled and inventing buffering and streaming where I could. Now I am thinking of leaving the manual compaction be just in case. Am I totally wrong?

Zverev Evgeniy
  • 3,643
  • 25
  • 42

0 Answers0