Start your 30 day free trial.
START FOR FREE
Docs Home

CPU Experiment

Supported platforms:

The CPU experiment generates high load for one or more CPU cores. It does this by running expensive arithmetic…

No items found.

The CPU experiment generates high load for one or more CPU cores. It does this by running expensive arithmetic operations across a number of threads (one for each core targeted). When the CPU Gremlin runs, the OS Scheduler decides where the process will run and your application (and all other processes) will compete for CPU time. There's no guarantee that our process will all block others.

As of 2.58.0: When the CPU experiment is run against a container target (including Kubernetes), the target's available CPU cores reflects its cgroup limits. This value is currently rounded up to the nearest whole CPU value. For example, a CPU experiment run against a container with a CPU limit of 500m will compute a maximum of 1 cpu available. Support for fractional CPUs in these environments may come in a subsequent release.

Options

Parameter Flag Required Default Version Description
Cores -c int False 1 0.0.1 The number of cores to try to utilize. Capped to the number of available CPUs.
Percent -p <0-100> False 100 2.11.0 The percent of each CPU to utilize.
All Cores -a False False 2.11.0 If set, target all available CPUs (cannot be used with -c parameter).
Length -l int False 60 0.0.1 The length of the experiment (seconds).

Example
CPU experiments are additive up to the available CPU on the host. For example, if the typical host CPU usage is 50% and you execute a CPU Attack of 25% (magnitude), CPU usage will be increased to approximately 75% during the experiment.

Privileges Required

On this page
Back to top