Bruce Hunter - 450 - Apr 23, 2014

.NET is known to have issues with GC running at bad times. When you least expect it. The release of 4.5 framework has helped reduce pauses with request/response.

How do you suggest utilizing the new feature for GC “SustainedLowLatency” with ServiceStack?

Are there any recommendations for using this within ASP.NET?

SustainedLowLatency sounds like its for avoiding Gen2 GC collection if possible and is only available on .NET 4.5 on server GC’s (answer #1):

Which will cause issues if run on .NET 4.0 (SS is .NET 4.0):

Otherwise a good time to force a GC.Collect() may be on AppHost.EndRequest() after the response is written. Though you wouldn’t want to do this with every request so may need to to something like
if (noOfRequests++ % 1000 == 0) GC.Collect();

Bruce Hunter:

Hmm, yeah I forgot that SS is using .NET 4.0.30319