Skip to content

Instantly share code, notes, and snippets.

@caorong
Forked from EvilFaeton/gist:2886922
Created November 26, 2019 04:10
Show Gist options
  • Save caorong/91dc2628229c96daed574de2299ae0f5 to your computer and use it in GitHub Desktop.
Save caorong/91dc2628229c96daed574de2299ae0f5 to your computer and use it in GitHub Desktop.
Simulate heavy load CPU and IO on Linux
# CPU
for cpu in 1 2 ; do
( while true; do true; done ) &
done
# IO
for cpu in 1 2 ; do
( while true; do find / -type f -exec cp {} /dev/null \; ; done ) &
done
# use 1 2 3 4 for quad core, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment