memory-eater
Eats memory at a specified constant rate

Installation
Home brew
$ brew install kishaningithub/tap/memory-eater
Yum
yum install -y https://github.com/kishaningithub/memory-eater/releases/download/v0.0.9/memory-eater_0.0.9_linux_amd64.rpm
Systemd
Do the yum installation as above and do the following
curl https://raw.githubusercontent.com/kishaningithub/memory-eater/main/memory-eater.service --output /etc/systemd/system/memory-eater.service
For a detailed list see releases page
Examples
Eat 100MB per second
memory-eater --step-size=100MB --step-duration=1s
Usage
$ memory-eater -h
Eats memory at a given constant rate
Usage:
memory-eater [flags]
Examples:
memory-eater --step-size=100MB --step-duration=1s
Flags:
-h, --help help for memory-eater
--profile profile this cli tool
--step-duration string Duration of every step. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h" (default "1s")
--step-size string Size of memory to eat during every step. Valid byte units are "B", "KB", "MB", "GB", "TB", "PB" and "EB" (default "1MB")
Advanced examples
Profiling the utility
- To profile just add
--profile flag to any command you want to profile
- To view the results run
go tool pprof -http=:1235 mem.pprof
- Open url
http://localhost:1235 in your browser