Document fixes for cpu/io stress experiments (#3566)
* Added cpu load tunable to node and pod cpu hog experiment; Added yaml example for CPU in node-io-stress experiment Signed-off-by: Akash Shrivastava <as86414@gmail.com> * Fixed env tunables and manifest links Signed-off-by: Akash Shrivastava <as86414@gmail.com> * Fix for pipeline requirement for doc changes Signed-off-by: Akash Shrivastava <as86414@gmail.com>
This commit is contained in:
parent
9837df11cd
commit
d727751be4
|
|
@ -4,6 +4,9 @@ on:
|
|||
branches:
|
||||
- master
|
||||
- v*
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
|
||||
env:
|
||||
DOCKER_BUILDKIT: 1 # Enable Docker_buildkit in all build jobs
|
||||
|
|
|
|||
|
|
@ -261,4 +261,4 @@ Following Platform Chaos experiments are available:
|
|||
<td>Poweroff the vmware VM</td>
|
||||
<td><a href="/litmus/experiments/categories/vmware/vm-poweroff">vm-poweroff</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -207,3 +207,36 @@ spec:
|
|||
- name: TOTAL_CHAOS_DURATION
|
||||
VALUE: '60'
|
||||
```
|
||||
|
||||
### Node CPU Load
|
||||
|
||||
It contains percentage of node CPU to be consumed. It can be tuned via `CPU_LOAD` ENV.
|
||||
|
||||
Use the following example to tune this:
|
||||
|
||||
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/node-cpu-hog/node-cpu-load.yaml yaml)
|
||||
```yaml
|
||||
# stress the cpu of the targeted nodes by load percentage
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: engine-nginx
|
||||
spec:
|
||||
engineState: "active"
|
||||
annotationCheck: "false"
|
||||
chaosServiceAccount: node-cpu-hog-sa
|
||||
experiments:
|
||||
- name: node-cpu-hog
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# percentage of cpu to be stressed
|
||||
- name: CPU_LOAD
|
||||
value: "100"
|
||||
# node cpu core should be provided as 0 for cpu load
|
||||
# to work otherwise it will take cpu core as priority
|
||||
- name: NODE_CPU_CORE
|
||||
value: '0'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
VALUE: '60'
|
||||
```
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# stress the cpu of the targeted nodes by load percentage
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: engine-nginx
|
||||
spec:
|
||||
engineState: "active"
|
||||
annotationCheck: "false"
|
||||
chaosServiceAccount: node-cpu-hog-sa
|
||||
experiments:
|
||||
- name: node-cpu-hog
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# percentage of cpu to be stressed
|
||||
- name: CPU_LOAD
|
||||
value: "100"
|
||||
# node cpu core should be provided as 0 for cpu load
|
||||
# to work otherwise it will take cpu core as priority
|
||||
- name: NODE_CPU_CORE
|
||||
value: '0'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
VALUE: '60'
|
||||
|
|
@ -265,7 +265,29 @@ spec:
|
|||
The CPU usage can be limit to `CPU` cpu while performing io stress. It can be tuned via `CPU` ENV.
|
||||
|
||||
Use the following example to tune this:
|
||||
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/node-io-stress/cpu.yaml yaml)
|
||||
|
||||
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/nodes/node-io-stress/limit-cpu-utilization.yaml yaml)
|
||||
```yaml
|
||||
# limit the cpu uses to the provided value while performing io stress
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: engine-nginx
|
||||
spec:
|
||||
engineState: "active"
|
||||
annotationCheck: "false"
|
||||
chaosServiceAccount: node-io-stress-sa
|
||||
experiments:
|
||||
- name: node-io-stress
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# number of cpu cores to be stressed
|
||||
- name: CPU
|
||||
value: '1'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
VALUE: '60'
|
||||
```
|
||||
|
||||
### Workers For Stress
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ spec:
|
|||
spec:
|
||||
components:
|
||||
env:
|
||||
# total cpu cores to be used
|
||||
# number of cpu cores to be stressed
|
||||
- name: CPU
|
||||
value: '1'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
|
|
@ -200,7 +200,7 @@ Refer the [common attributes](../common/common-tunables-for-all-experiments.md)
|
|||
|
||||
### CPU Cores
|
||||
|
||||
It stresses the `CPU_CORE` cpu cores of the targeted pod for the `TOTAL_CHAOS_DURATION` duration.
|
||||
It stresses the `CPU_CORE` of the targeted pod for the `TOTAL_CHAOS_DURATION` duration.
|
||||
|
||||
Use the following example to tune this:
|
||||
|
||||
|
|
@ -231,6 +231,42 @@ spec:
|
|||
value: '60'
|
||||
```
|
||||
|
||||
### CPU Load
|
||||
It contains percentage of pod CPU to be consumed. It can be tuned via `CPU_LOAD` ENV.
|
||||
|
||||
Use the following example to tune this:
|
||||
|
||||
[embedmd]:# (https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/experiments/categories/pods/pod-cpu-hog/cpu-load.yaml yaml)
|
||||
```yaml
|
||||
# cpu load for the stress
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: engine-nginx
|
||||
spec:
|
||||
engineState: "active"
|
||||
annotationCheck: "false"
|
||||
appinfo:
|
||||
appns: "default"
|
||||
applabel: "app=nginx"
|
||||
appkind: "deployment"
|
||||
chaosServiceAccount: pod-cpu-hog-sa
|
||||
experiments:
|
||||
- name: pod-cpu-hog
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# cpu load in percentage for the stress
|
||||
- name: CPU_LOAD
|
||||
value: '100'
|
||||
# cpu core should be provided as 0 for cpu load
|
||||
# to work, otherwise it will take cpu core as priority
|
||||
- name: CPU_CORES
|
||||
value: '0'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60'
|
||||
```
|
||||
|
||||
### Container Runtime Socket Path
|
||||
|
||||
It defines the `CONTAINER_RUNTIME` and `SOCKET_PATH` ENV to set the container runtime and socket file path.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
# cpu load for the stress
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: engine-nginx
|
||||
spec:
|
||||
engineState: "active"
|
||||
annotationCheck: "false"
|
||||
appinfo:
|
||||
appns: "default"
|
||||
applabel: "app=nginx"
|
||||
appkind: "deployment"
|
||||
chaosServiceAccount: pod-cpu-hog-sa
|
||||
experiments:
|
||||
- name: pod-cpu-hog
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# cpu load in percentage for the stress
|
||||
- name: CPU_LOAD
|
||||
value: '100'
|
||||
# cpu core should be provided as 0 for cpu load
|
||||
# to work, otherwise it will take cpu core as priority
|
||||
- name: CPU_CORES
|
||||
value: '0'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60'
|
||||
|
|
@ -339,7 +339,7 @@ spec:
|
|||
env:
|
||||
# path need to be stressed/filled
|
||||
- name: VOLUME_MOUNT_PATH
|
||||
value: '10'
|
||||
value: '/some-dir-in-container'
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
VALUE: '60'
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue