antonputra / tutorials

DevOps Tutorials
https://youtube.com/antonputra
MIT License
3.19k stars 2.5k forks source link

Lesson 211 - Improvements for Caddy #341

Open dunglas opened 2 weeks ago

dunglas commented 2 weeks ago

For a more fair comparison, you should set the GOGC environment variable to off to disable Go's garbage collector. Stress tests and benchmarks will trigger a lot of collections that will occur very differently (when the server is idle on the happy path) when handling real-life traffic, which tends to distort comparisons (it's also possible to change the ratio instead).

If you're using containers with a small amount of available memory, you should also GOMEMLIMIT, this can dramatically improve performance.

More info:

antonputra commented 2 weeks ago

Thank you! I'll try it out, actually i deploy both on VMs, using m7a.large instances.