Skip to content

A simple configurable memory hog, packaged in a container

License

Notifications You must be signed in to change notification settings

krallin/docker-hog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple configurable hog program to simulate apps that exceed their memory allocation.

Configuration

  • HOG_MAX_BYTES: How much memory to hog before exiting. Default is LONG_MAX, which essentially means no limit. Set to e.g. 2147483648 to hog up to 2 GiB.
  • HOG_WAIT_SECONDS: How long to wait before we start hogging. Default is 0, which means don't wait at all. Set to e.g. 2 to wait 2 seconds before the hogging begins.
  • HOG_GOAL_SECONDS: how long should the allocation of HOG_MAX_BYTES happen over? Default is 0, which means hog as fast as possible. Set to e.g. 60 for the hogging to happen over a minute.
  • HOG_CHECKPOINTS: how often should the hog stop and sleep in order to hit HOG_GOAL_SECONDS? The higher this number, the more accurate the stopping point (and the more likely the hog is to stop if it receives SIGTERM). Default is 64.

Copyright and License

MIT License, see LICENSE for details.

Copyright (c) 2016 Aptible and contributors.

About

A simple configurable memory hog, packaged in a container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%