Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)?

share|improve this question

closed as not a real question by random May 18 '13 at 3:55

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Via OS-specific mechanisms. –  Ignacio Vazquez-Abrams May 18 '13 at 2:58
Let's suppose this is on modern day Linux. –  Victor Liu May 18 '13 at 3:00
Why don't you patch the kernel so that it lies about the CPU load average? –  Dan D. May 18 '13 at 3:37

2 Answers 2

up vote 1 down vote accepted

This question is covered on Stackoverflow: Artificially modify server load in Ubuntu

share|improve this answer

Last week I wanted to create backup from my HDD I mount it to my old linux machine after that I run tar cvjf command to create and compressed my hdd! My system has celeron CPU and I think it's older that 6 years. It's done after 48Hours and CPU works 99% but my memory didn't use very much maybe 50Mb.

Now there are many solution for your question.

Another one is to calculate Factorial of one number!!! (Big Number)


I write a simple C program like below:

#include <stdio.h>
void main() {
for ( int i = 0; i < 10000000000000; i++);

Then I compiled it with GCC command and opened 5 terminals and executed them! below photo shows my load average. It's 5!!!!! Notice: My program depends on your CPU. I test it with Pentium M !

enter image description here

share|improve this answer
What I meant was that I didn't want to perform computationally intensive tasks. These examples all peg the CPU. –  Victor Liu May 18 '13 at 3:16
Can you please give me an example? –  Sepahrad Salour May 18 '13 at 3:18
Well, I can't think of one that doesn't peg the CPU but increases the cpu load average. Hence the question. –  Victor Liu May 18 '13 at 3:27
Please read my edited post. Hope this helps. –  Sepahrad Salour May 20 '13 at 9:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.