GCBurn icon indicating copy to clipboard operation
GCBurn copied to clipboard

Garbage collection / allocation performance tests for various languages (for now, just C# / .NET and Go)

GCBurn

Garbage collection / allocation performance tests for C# / .NET and Go.

Description and results

Please see Go vs C#, part 2: Garbage Collection.

Other useful links:

Running GCBurn

Prerequisites:

  1. Install .NET Core SDK: https://www.microsoft.com/net/download
  2. Install Go: https://golang.org/doc/install?download

To run a single test, use run or Run.bat scripts; --help option shows all other options you can use.

To run a sequence of tests, use test-all or Test-All.bat scripts, and likely, that's the way you want to run it. There are two options:

  • -o OUTPUT_SUFFIX_STRING changes the names of its output files from *-Default.txt to *-OUTPUT_SUFFIX_STRING.txt
  • -d DURATION_IN_SECONDS sets the duration of a single GCBurn test pass. The default duration is 2 minutes - we've found it's almost always enough to catch long Gen2 GC pauses on this test; besides that, setting it to larger values tends to crash Go more reliably on "Static set = 50+% RAM" test cases.

Contributing

If you are willing to translate the test to another language (e.g. Java) and share your findings, it would be simply amazing. Please contact me on Facebook if you need any help with this.