docs(README): hint of CPU limit lower than 1000m (#795)
The example of my latest PR based on a cpu resource limit of `100m`. But as the article describes, a cpu limit of lower than `1000m` or `1` can also lead to cpu throttling. I've updates the README, to be correct and inform the user to take care of a correct cpu resource limit. Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/795 Reviewed-by: pat-s <pat-s@noreply.gitea.com> Co-authored-by: Markus Pesch <markus.pesch@cryptic.systems> Co-committed-by: Markus Pesch <markus.pesch@cryptic.systems>
This commit is contained in:
parent
a4c706f521
commit
edd8557bb0
@ -158,7 +158,7 @@ cannot use the available CPU time to perform computing operations.
|
|||||||
|
|
||||||
The application must be informed that despite several CPUs only a part (limit) of the available computing time is
|
The application must be informed that despite several CPUs only a part (limit) of the available computing time is
|
||||||
available. As this is a Golang application, this can be implemented using `GOMAXPROCS`. The following example is one way
|
available. As this is a Golang application, this can be implemented using `GOMAXPROCS`. The following example is one way
|
||||||
of defining `GOMAXPROCS` automatically based on the defined CPU limit like `100m`. Please keep in mind, that the CFS
|
of defining `GOMAXPROCS` automatically based on the defined CPU limit like `1000m`. Please keep in mind, that the CFS
|
||||||
rate of `100ms` - default on each kubernetes node, is also very important to avoid CPU throttling.
|
rate of `100ms` - default on each kubernetes node, is also very important to avoid CPU throttling.
|
||||||
|
|
||||||
Further information about this topic can be found [here](https://kanishk.io/posts/cpu-throttling-in-containerized-go-apps/).
|
Further information about this topic can be found [here](https://kanishk.io/posts/cpu-throttling-in-containerized-go-apps/).
|
||||||
@ -166,6 +166,8 @@ Further information about this topic can be found [here](https://kanishk.io/post
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The environment variable `GOMAXPROCS` is set automatically, when a CPU limit is defined. An explicit configuration is
|
> The environment variable `GOMAXPROCS` is set automatically, when a CPU limit is defined. An explicit configuration is
|
||||||
> not anymore required.
|
> not anymore required.
|
||||||
|
>
|
||||||
|
> Please note that a CPU limit < `1000m` can also lead to CPU throttling. Please read the linked documentation carefully.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
deployment:
|
deployment:
|
||||||
@ -179,7 +181,7 @@ deployment:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 1000m
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user