Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.03 KB

README.md

File metadata and controls

25 lines (19 loc) · 1.03 KB

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) 2019 Aptible and contributors.