As a fun exercise, what is the best way to maximize the unix CPU load average without actually consuming lots of resources (CPU cycles or memory)?
Asked
Active
Viewed 103 times
2 Answers
0
Last week I wanted to create a backup from my HDD. I mounted it to my old Linux machine and then ran the tar cvjf command to create and compress my HDD. My system has a Celeron CPU which I think is older than 6 years. It's done after 48 hours and the CPU works 99%, but my memory didn't use very much, maybe 50 MB.
Now there are many solutions to your question. Another one is to calculate the factorial of one number (big number).
I've written a simple C program:
#include <stdio.h>
void main() {
for ( int i = 0; i < 10000000000000; i++);
}
Then I compiled it with the GCC command, opened 5 terminals and executed them.
This image shows my load average, which is 5. Notice: My program depends on your CPU. I tested it with Pentium M.

Sepahrad Salour
- 988