Skip to content

Instantly share code, notes, and snippets.

@philm
Last active February 9, 2016 18:34
Show Gist options
  • Save philm/7ddaaac7163db7e96e96 to your computer and use it in GitHub Desktop.
Save philm/7ddaaac7163db7e96e96 to your computer and use it in GitHub Desktop.
How to max out CPUs via command line

When you need to simulate processor load...

Single core

cat /dev/zero > /dev/null

Multiple cores (1 2 3 4 - change as needed)

for i in 1 2 3 4; do while : ; do : ; done & done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment