Skip to content

strategicpause/memory-leak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memory-leak

Purpose

Recreate scenarios which can invoke the OOM-killer when running a container.

Build

podman build . -t memory-leak

Run

Locally

go run main.go memory --max-memory 1GB --block-size 100MB --pause=1s

Via Podman

$ podman run \
--memory=1024m \
--name=memory-leak \
--rm \
--memory-swap=0 \
localhost/memory-leak \
./leak memory --max-memory 1GB --block-size 100MB --pause=1s

By default Podman will enable swap memory with a size equal to the memory limit specified. This will turn off swap to make sure OOMs can be recreated at the expected memory limit.

TCP Leak

$ podman run \
--memory=128m \
--name=tcp-leak \
--rm \
localhost/memory-leak \
./leak socket --size 16

The above command will allocate sockets, establish connections, and write 16 KiB.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published