Comment by ozim

1 day ago

Question: does anyone run "Server GC" for the ASP.NET applications?

There is bunch of people copy pasting documentation to SO "explaining" server GC. I am running bunch of .NET stuff in VMs and never set "Server GC" and never ran into issues with default but also not sure if it is worth testing out.

I guess it does not matter much if you are running in containers but I am running on VMs in IIS.

When I play around with changing various GCs for Java (via Clojure), then I always setup benchmarks measuring what kind of thing I want to improve, run all GCs via that benchmark to chose which to use for that service/project and call it a day. There is a lot of theorizing and navel-gazing around GCs it seems to me, and in the end it is the results that count so setup some way to measure, find the differences then move on from there :)

Server GC is a tradeoff between latency and throughput. It makes a ton of sense for a web server where a small additional overhead of a few milliseconds on some responses won't matter.

Workstation GC is what you want when latency is critical. This is what you'd use if you were developing a UI or game engine.

I've seen workstation GC stay in the microsecond region when strategically executing GC.Collect at allocation batch boundaries.

  • Well great but you did not write out anything more than I could understand as a 15+ years developer of C#/.Net from whatever all those people in Stack Overflow wrote.

    Do you have anything like running a business line application for couple of years on Server GC to write about?