Slashdot Log In
Easy, Fast, Cheap Way to Generate CPU Load?
Posted by
Cliff
on Thu Apr 07, 2005 06:57 PM
from the whip-that-processor-into-shape dept.
from the whip-that-processor-into-shape dept.
jsailor asks: "A large client and their engineering team will be evaluating cabinets and their ability to cool high density blade server deployments. Some of these systems can consume upward of 21 kW per rack and accordingly require a lot of airflow and/or liquid systems to cool. The systems actively monitor heat conditions, increase airflow rates, and can throttle CPU speeds if necessary. What we need is an easy, fast, and cheap way to run the 2-way and 4-way blades at or near peak CPU utilization for extended periods of time so thermal analysis can be performed. Ideally, we would be able to boot them off a CD and have some means of monitoring the CPU on each or even setting the level of CPU utilization we'd like them to run at. Please note that we do NOT need to simulate a real world application and disk and network access are not of much concern. While running your favorite compute-intensive project is a nice idea, we need something simple so I've come to the Slashdot community for assistance. What are your thoughts?"
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
How about these? (Score:5, Informative)
EDIT.COM (Score:5, Funny)
Back in the day, the old MS-DOS editing program, EDIT.COM, ran a polling loop that would drive the CPU up to 100%.
The Intel guys used to recommend it as a way to stress test your system.
Parent
while true; do true; done (Score:5, Informative)
Parent
Re:while true; do true; done (Score:3, Informative)
while true; do
otherwise the shell built-in is used and not fork is executed.
Re:while true; do true; done (Score:3, Informative)
I actually tried to check this, but obviously I was too lazy; bash(1) doesn't seem to list true as built-in, but checking (by renaming /bin/true indeed confirms that you are right).
Sorry about that.
Re:How about these? (Score:2, Informative)
So simple. (Score:5, Informative)
for cpu in 1 2 3 4; do
( while true; do true; done ) &
done
If you want to exercise the disks a bit too, replace the middle line with:
( while true; do find / -type f -exec cp {}
Parent
Re:So simple. (Score:3, Informative)
Re:How about these? (Score:5, Informative)
The utility is designed to run instruction loops which require the most POWER CONSUMPTION from the cpu and thus generate the most heat. There are versions tuned from pentiums up to current CPU's. There is also a version designed to cause your ram to use the maximum amount of power it can.
Unlike running any old utility that gives you "100% cpu load" such as the comments about running 'true' in an endless loop presented in this thread, cpuburn is actually targeted at generating heat, power, and system stress. 100% processor utalization does not necessarily mean that you are stressing a computer.
Unsuprisingly, many times cpuburn will often cause a computer that you believe is fine and works properly 100% of the time to hard lock after only a couple of minutes. Over time, dust builds up; fans get slower and give out, etc. and a computer with an adequate cooling solution a year ago may not be able to take the heat anymore. CPUBurn can reveal that. It is a very very good utility.
Parent
Endless fork? (Score:4, Funny)
#!/bin/sh
sh $0
or in c
while ( 1 )
fork();
Flash ads (Score:5, Funny)
Re:Flash ads (Score:3, Funny)
Animated. GIF. Smileys.
Other people use their processing cycles to find puslars. Me? I use mine to have little yellow smiley faces chase each other around with machine guns.
quite simple (Score:3, Interesting)
A little hack someone showed me a while ago. Just set that in the startup script and away you go! Eats up memory and CPU time, so you'll end up with a very very high load and disk activity to boot.
Re:quite simple (Score:2, Informative)
So you might want to expand that to
while [
so when this happens:
"sh: xrealloc:
It just restarts it. (Hmm, the comment appears to be formatted correctly for the command).
POVRay (Score:2, Informative)
here you go (Score:2)
{
for (int i=0; 1; i++)
}
Re:here you go (Score:3, Funny)
int main() { for(
Re:here you go (Score:2)
Cat got your tongue? (something important seems to be missing from your comment
Microsoft's jvc.exe would skip that. (Score:2)
Back in the day, Microsoft used to write a nifty little Java "compiler" called jvc.exe [to differentiate itself from Sun's javac.exe] - this was back before Sun sued them over their Java implementation.
Anyway, jvc.exe in combination with Microsoft's java.exe had the uncanny ability to spot empty loops like that and jump write over them.
[Which, no doubt, did not bring pleasure to the ghost of poor ol' Alan Turing...]
Re:here you go (Score:2)
Put your cycles to good use (Score:2)
You want load? (Score:4, Funny)
First, make it into a server (Score:2, Funny)
Distributed.Net, surely. (Score:4, Insightful)
openssl benchmark (Score:4, Informative)
> while true ; do openssl speed ; done
Doing md2 for 3s on 16 size blocks: 511846 md2's in 3.00s
Doing md2 for 3s on 64 size blocks: 278228 md2's in 3.00s
Doing md2 for 3s on 256 size blocks: 98836 md2's in 3.00s
Doing md2 for 3s on 1024 size blocks: 27645 md2's in 3.00s
Doing md2 for 3s on 8192 size blocks: 3574 md2's in 3.01s
[... continues
-molo
Distributed projects (Score:5, Insightful)
Gentoo (Score:5, Funny)
Prime95, as the overclockers use. (Score:5, Informative)
Re:Prime95, as the overclockers use. (Score:3, Informative)
Fractals (Score:2)
good ol' Hiren's (Score:2, Informative)
And if you don't like that, you can try Knoppix bootable CD. It has (i think) multi-CPU support and you can most likely find
Easy, Fast Way to Generate CPU Load (Score:5, Funny)
Just have it calculate pi... (Score:2)
Come on.. (Score:2)
main() {
a = 0;
for (;;) {
double a;
a *= 1.00001;
}
}
forkbomb (Score:2)
$0&$0&
chmod +x forkbomb.sh
Start top quickly, otherwise, the box will be under so much load, it won't even run.
How about Netbench? (Score:3, Interesting)
LAPACK et. al. (Score:2)
That's what they use to spec and rank supercomputers. It'll burn, burn, burn!
The Ultimate Bootable CD (Score:2)
Burn it to a DVD and it will load even faster.
md5sum (Score:3, Interesting)
Remember the disks too (Score:3, Insightful)
Disk drives generate heat (and fail first from it). To keep your drives excercised, check out Bonnie [garloff.de].
This is easy (Score:2)
bc and ^ (Score:2)
bc
1234123412341234^1234123412
Should work for at least an hour or two on current CPU's.
gzip (Score:5, Informative)
Boot any linux liveCD that supports your hardware, and run the following command:
cat
Sould eat one whole CPU and run forever. If you have an SMP machine, run one instance of that per CPU, and you should max out. The system should still remain responsive enough that you can terminate the processes at will, even though the CPU is at 100% usage.
I would try to pick a liveCD that does not bother starting X since that just adds to the boot time.
You may want to consider the heat generated by components other than the CPU. Hard drives put off a significant amount of heat, as do memory and video, and to a lesser extent network hardware.
To utilize a lot of memory as well as CPU, you might look for something like a prime-factoring program. (prime seives love to eat memory)
For video heat, try something like an unlimited framerate demo in Quake 2. (I think there is even a Linux port)
For network load, just use a ping utility that supports flood-ping and arbitrary payloads. Then floodping yourself or something on the LAN with huge packets.
For hard drive heat, you could just dd
Another option (Score:2)
The actual download page is here [sourceforge.net]
Kernel compiles! (Score:2)
Slashdot community is simple (Score:3, Funny)
Thanks! I think...
It's not so easy (Score:4, Insightful)
Modern CPUs are complicated beasts, with multiple execution units, deep pipelines and big caches. And they're connected to big external memories and disk drive arrays. If you want to stress-test the cooling system, then you need code that keeps all the execution units and all the pipelines and the caches and main memory and the disk array all going full blast. That's not as easy as it sounds. Intel has mentioned various test programs that they use when thermally testing their CPUs, but I don't know that they've ever released them. Perhaps they're afraid they'd might cause damage, and they'd have to deal with a lot of irate customers.
You need stress (Score:3, Informative)
http://weather.ou.edu/~apw/projects/stress/ [ou.edu]
I use it at work for testing all of our servers. You have the option of testing CPU, Memory, IO, or VM, and it will most certainly put a heavy load on the server.
Re:Easiest way (Score:3, Funny)
Re:infinite loop in java (Score:3, Funny)