docs(README): hint of CPU limit lower than 1000m
This commit is contained in:
parent
7f921ff1eb
commit
da0daf74aa
@ -68,7 +68,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/).
|
||||||
@ -76,6 +76,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 take care the a CPU limit < `1000m` can also lead to CPU throttling. Please read the linked documentation carefully.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install prometheus-fail2ban-exporter prometheus-exporters/prometheus-fail2ban-exporter \
|
helm install prometheus-fail2ban-exporter prometheus-exporters/prometheus-fail2ban-exporter \
|
||||||
@ -83,7 +85,7 @@ helm install prometheus-fail2ban-exporter prometheus-exporters/prometheus-fail2b
|
|||||||
--set 'prometheus.metrics.serviceMonitor.enabled=true' \
|
--set 'prometheus.metrics.serviceMonitor.enabled=true' \
|
||||||
--set 'daemonSet.fail2banExporter.env.name=GOMAXPROCS' \
|
--set 'daemonSet.fail2banExporter.env.name=GOMAXPROCS' \
|
||||||
--set 'daemonSet.fail2banExporter.env.valueFrom.resourceFieldRef.resource=limits.cpu' \
|
--set 'daemonSet.fail2banExporter.env.valueFrom.resourceFieldRef.resource=limits.cpu' \
|
||||||
--set 'daemonSet.fail2banExporter.resources.limits.cpu=100m'
|
--set 'daemonSet.fail2banExporter.resources.limits.cpu=1000m'
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
Loading…
Reference in New Issue
Block a user