Linux program to artificially create CPU usage

3

Since I own one of those Centrino based Core 2 notebooks that create annoying buzzing noises when idle (= entering C3 or C4 power saving states), I'm looking for a program that creates artificial CPU usage. It should allow me to limit the CPU usage to a certain percentage (I know that there are a lot of easy ways to create 100% usage ;-).

Another option would be to disable the C3 or C4 states, but in newer kernels the sysfs interface to set the max_cstate on-the-fly was removed for some reason, and I don't always want to reboot after switching from AC to battery (and vice versa).

nisc

Posted 2010-07-27T21:32:00.017

Reputation: 983

1

How about this http://weather.ou.edu/~apw/projects/stress/ ? Also, take a look at this question: http://superuser.com/questions/167185/

– AndrejaKo – 2010-07-27T22:37:35.877

Answers

4

Give cpulimit a try. For example cpulimit -e cpuburn -l 20 would limit a process called cpuburn to maximum of 20% CPU.

Use cpulimit with some CPU hungry software such as SETI@Home or cpuburn and you should have a winning combo.

Janne Pikkarainen

Posted 2010-07-27T21:32:00.017

Reputation: 6 717

Does not really solve the problem, since now I get a pulsating buzzing noise instead of a constant one. Cpulimit seems to work by pausing and resuming the process with a certain frequency.

Still you answered my question ;-) – nisc – 2010-08-06T09:27:25.883

I don't know if other people find this looking for cpuburn but here's a cpuburn that works great.

– ZombieDev – 2014-05-09T13:33:22.723

3

Have you considered setting up something like Folding@Home This will use all your CPU, and by default it will be at the lowest priority meaning that almost anything else you run will get preference. Plus you can feel good about your contribution to humanity.

Zoredache

Posted 2010-07-27T21:32:00.017

Reputation: 18 453

1

Or BOINC which also has a broader selection of projects to choose from, including medical ones. The software for the Great Internet Mersenne Prime Search is often used for stress-testing systems.

– Paused until further notice. – 2010-07-28T04:05:02.040

0

Under any Linux/Unix you can execute 'yes' on the terminal which will also generate a good bit of CPU stress.

Mijndert Stuij

Posted 2010-07-27T21:32:00.017

Reputation: 331