Commit 54f61040 authored by beorn7's avatar beorn7

Operating: Document effects of higher GOGC values

parent 2087d8fa
...@@ -40,8 +40,11 @@ memory and thus will perform much worse than it could. ...@@ -40,8 +40,11 @@ memory and thus will perform much worse than it could.
Because Prometheus uses most of its heap for long-lived allocations of memory Because Prometheus uses most of its heap for long-lived allocations of memory
chunks, the chunks, the
[garbage collection target percentage](https://golang.org/pkg/runtime/debug/#SetGCPercent) [garbage collection target percentage](https://golang.org/pkg/runtime/debug/#SetGCPercent)
is set to 40 by default. You can still override this setting via the `GOGC` is set to 40 by default (rather than the usual 100). You can still override
environment variable as usual. this setting via the `GOGC` environment variable as usual. A higher value
results in fewer memory chunks and less CPU usage, which makes sense in
scenarios where you need to save CPU usage but can afford to have fewer memory
chunks.
For high-performance set-ups, you might need to adjust more flags. Please read For high-performance set-ups, you might need to adjust more flags. Please read
through the sections below for details. through the sections below for details.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment