-
-
Save caorong/91dc2628229c96daed574de2299ae0f5 to your computer and use it in GitHub Desktop.
Simulate heavy load CPU and IO on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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