Note that this can cause systems to trip the Linux Kernel OOM killer without enough physical or swap Memory.
The operating system may swap out the allocated memory. This attack doesn't take swap memory into account.
In contrast to the Stress Memory action, this actions tries to reduce the CPU usage as much as possible.
When using the attack to meet a specific memory usage, it may allocate or free memory to reach the desired memory usage.
If you specify a usage that exceeds the total memory (e.g. > 100%) it fills up the memory as much as possible until the process is oomkilled, as it's impossible to reach usages higher than 100%.
Use Cases
Test the system's ability to handle memory spikes.
Observe the system's behavior when it runs out of memory.
Observe the system's behavior when it runs low on memory for file buffers.
Parameters
Parameter
Description
Default
Duration
How long should memory be wasted?
30s
Mode
Fill and meet specified usage: Fill up the memory until the desired usage is met. Memory allocation will be adjusted constantly to meet the target. Fill the specified amount: Allocate and hold the specified amount of Memory.
Fill and meet specified usage
Size
Percentage of total memory or Megabytes:
% of total memory
Fail on OOM Kill
Should it be treated as a failure when the attacked container was oomkilled?