Linux, Solaris, Docker, Zones – CPU hog load test

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

A controlled CPU HOG load test – Change the number to the number of CPU's

print "Eating the CPUs\n";
foreach $i (1..16) {
    $pid = fork();
    last if $pid == 0;
    print "Created PID $pid\n";
while (1) {

Another form of loading all cpu’s, might not work in latest Linux bash releases

Note: Make sure you are not running anything important on the system (docker or zone), as it will max all cpus.


Leave a Reply

Notify of