Dashboard
Fault Injection

Memory Experiment

The Memory experiment consumes a set amount of memory or as much as is available (whichever is lower) and holds onto it for the duration of the experiment. The experiment allocates blocks of memory with malloc until it reaches the desired amount, deallocating the memory with free upon experiment completion.

Options

ParameterFlagRequiredDefaultVersionDescription
MB-m intFalse0.0.1The number of megabytes to allocate.
GB-g floatFalse0.50.0.1The number of gigabytes to allocate.
Percentage-p <0-100>False1002.8.30The percentage of total memory to allocate.
Allocation Strategy-s absolute | totalFalseabsolute2.24.0absolute tells Gremlin to consume the full amount requested, total tells Gremlin to consume only that which brings the system up to the target utilization.
Length-l intFalse600.0.1The length of the experiment (seconds).

Example
When --allocation-strategy=absolute (the default from the CLI), Memory experiments are additive and are allocated from available memory. For example, if the pre-experiment memory utilization is 500 MB and you initiate a Memory Attack of 500 MB (magnitude), Gremlin will attempt to allocate an additional 500 MB of memory bringing the utilization to approximately 1000 MB (1 GB). Use --allocation-strategy=total to change this behavior. In the prior example, Gremlin will not allocate any memory if the system is already at 500 MB and --allocation-strategy=total.

Troubleshooting

When running a memory experiment on Linux hosts or Kubernetes, the Gremlin process may be terminated by the system's Out of Memory Manager (OOMKiller). Please see this knowledge base article for additional information.

No items found.
Previous
This is some text inside of a div block.
Compatibility
Installing the Gremlin Agent
Authenticating the Gremlin Agent
Configuring the Gremlin Agent
Managing the Gremlin Agent
User Management
Integrations
Health Checks
Notifications
Command Line Interface
Updating Gremlin
Quick Start Guide
Services and Dependencies
Detected Risks
Reliability Tests
Reliability Score
Targets
Experiments
Scenarios
GameDays
Overview
Deploying Failure Flags on AWS Lambda
Deploying Failure Flags on AWS ECS
Deploying Failure Flags on Kubernetes
Classes, methods, & attributes
API Keys
Examples
Container security
General
Linux
Windows
Chao
Helm
Glossary
Alfi
Additional Configuration for Helm
Amazon CloudWatch Health Check
AppDynamics Health Check
Application Level Fault Injection (ALFI)
Blackhole Experiment
CPU Experiment
Certificate Expiry
Custom Health Check
Custom Load Generator
DNS Experiment
Datadog Health Check
Disk Experiment
Dynatrace Health Check
Grafana Cloud Health Check
Grafana Cloud K6
IO Experiment
Install Gremlin on Kubernetes manually
Install Gremlin on OpenShift 4
Installing Gremlin on AWS - Configuring your VPC
Installing Gremlin on Kubernetes with Helm
Installing Gremlin on Windows
Installing Gremlin on a virtual machine
Installing the Failure Flags SDK
Jira
Latency Experiment
Memory Experiment
Network Tags
New Relic Health Check
Overview
Overview
Overview
Overview
Overview
Packet Loss Attack
PagerDuty Health Check
Preview: Gremlin in Kubernetes Restricted Networks
Private Network Integration Agent
Process Collection
Process Killer Experiment
Prometheus Health Check
Role Based Access Control
Running Failure Flags experiments
Scheduling Scenarios
Shared Scenarios
Shutdown Experiment
Slack
Teams
Time Travel Experiment
Troubleshooting Gremlin on OpenShift
User Authentication via SAML and Okta
Users
Webhooks
Integration Agent for Linux
Test Suites
Restricting Testing Times
Reports
Process Exhaustion Experiment
Enabling DNS collection