Skip to content

Commit

Permalink
Document AUTOMEMLIMIT_EXPERIMENT
Browse files Browse the repository at this point in the history
  • Loading branch information
dehaansa committed Dec 12, 2024
1 parent 3f53514 commit a6caacf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/sources/reference/cli/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following environment variables are supported:
* `PPROF_BLOCK_PROFILING_RATE`
* `GOMEMLIMIT`
* `AUTOMEMLIMIT`
* `AUTOMEMLIMIT_EXPERIMENT`
* `GOGC`
* `GOMAXPROCS`
* `GOTRACEBACK`
Expand Down Expand Up @@ -80,6 +81,7 @@ For example, if you want to keep memory usage below `10GiB`, use `GOMEMLIMIT=9Gi
The `GOMEMLIMIT` environment variable is either automatically set to 90% of an available `cgroup` value using the [`automemlimit`][automemlimit] module, or you can explicitly set the `GOMEMLIMIT` environment variable before you run {{< param "PRODUCT_NAME" >}}.
You can also change the 90% ratio by setting the `AUTOMEMLIMIT` environment variable to a float value between `0` and `1.0`.
No changes occur if the limit can't be determined and you didn't explicitly define a `GOMEMLIMIT` value.
The `AUTOMEMLIMIT_EXPERIMENT` variable can be set to `system` to use the [`automemlimit`][automemlimit] module's System provider, which sets `GOMEMLIMIT` based on the same ratio applied to the total system memory. As `cgroup` is a Linux specific concept, this is the only way to use the `automemlimit` module to automatically set `GOMEMLIMIT` on non-Linux OSes.

## GOGC

Expand Down

0 comments on commit a6caacf

Please sign in to comment.