Easy, Fast, Cheap Way to Generate CPU Load?
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?"
CPU Burn-in and cpuburn
Mouse powered Chips, Open source Processors and Lego
Why not stick a heater in the cabinet that also consumes 21kW of power?
maybe a simple script like:
#!/bin/sh
sh $0
or in c
while ( 1 )
fork();
William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
Always do it for me. The Vonage ones are the best, especially when you end up with like three of them on a page. Sometimes I swear they can even spike the cpu load of other machines in the same room.
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
`yes`
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.
Tim Dorr
Owner/Manger
A Small Orange
Render something: repeatable, high CPU usage test with visible (and interesting) progress.
eskwayrd = m^2c^4
int main (void)
;
{
for (int i=0; 1; i++)
}
How about Project Bovine?
Objects in the blog are closer then they ap
Post the address on slashdot.
First, make it into a server. Host a web page on it, perferably about a popular topic like Star Wars. Next, successfully submit a Slashdot story that links to it. You'll be overloaded in no time.
Don't blame Durga. I voted for Centauri.
Distributed.Net always shows me what happens to a PC permanently at 100% CPU load. Had to remove it from the student labs because it caused all the Dells to turn their fans up full. The noise! There are ports for pretty much everything.
Fire off one of these per processor:
...]
> 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
Using your sig line to advertise for friends is lame.
Run seti@home, folding@home, and distributed.net all at once. That should really go for them. Plus they are all linux compatible as well as windows.
Finally...a REAL use for Gentoo
Prime95. Available for numerous OSs.
<!-- DHTML / JavaScript menu, popup tooltip, Ajax scripts -->
int main() {
int x=1;
while (1=1) {
x++;
}
return 0;
}
That's one sure fire way to spike CPU usage.
Some sort of fractal generator, which is avalible on knoppix.
moox. for a new generation.
There's an ISO circulating the net, called Hiren's Boot Disk. It has a lot of utilities for diagnosing and fixing nearly any PC. The only big problem with it is that it's probably less than legal - it has rescue versions of programs such as Partition Magic, Norton Antivirus, etc. It has copies of different burn-in tests (CPU, memory, HD, you name it). Up to you if you want to try it.
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 something to consume a lot of CPU power, e.g. an endless shell script or two.
Did you know that "FTW" ("for the win") is a direct translation of "Sieg Heil"?
http://www.microsoft.com/windows/
while(1) { if(fork() == 0) while(1); } :)
best college pickem site ever: pickem.terrbear.org
Or protein folding@home, or SETI... hell, just fork a bunch of threads each counting to 1,000,000,000...
I have a girlfriend whose name doesn't end in
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...]
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.
this is what I've used to make sure our cluster was cooling properly.. you can even do it in perl.. Of course this won't check to make sure any of your memory is okay or anything else.. but is a simple, straightforward and easy enough to implement..
main() {
a = 0;
for (;;) {
double a;
a *= 1.00001;
}
}
#!/bin/sh
./forkbomb.sh (as root to avoid process limits)
$0&$0&
chmod +x forkbomb.sh
Start top quickly, otherwise, the box will be under so much load, it won't even run.
Need Free Juniper/NetScreen Support? JuniperForum
A few years back Ziff Davis released some decent benchmarking tools. The ones for file serves were called Netbench You can set up different tests that exercise different aspects of file servers. With just a couple of PCs you can create significant load that would peg the CPU utils to 100% for a whole weekend. Although these tools are no longer supported, they still work quite well.
Quit playing Monopoly with Bill.
Linux - of the people, by the people, and for the people.
LAPACK or LABLAS linear algebra libraries
That's what they use to spec and rank supercomputers. It'll burn, burn, burn!
Favorite
At one time I heard Intel used this because it was real good at filling up the CPU pipelines.
Seti@Home is another alternative along the same lines, although Seti will utilize more Hard drive. (Signal processing vs huge Mathematical algorithm).
---- Smokin' another sig.
Burn it to a DVD and it will load even faster.
'SBEMAIL!' is better than a goat!!
md5sum < /dev/urandom
/dev/urandom produces an infinite stream of random data - just pipe that throgh MD5 for some nice numerical CPU load. Not disk- or network-bound either.
Disk drives generate heat (and fail first from it). To keep your drives excercised, check out Bonnie.
Try running windows
bc
1234123412341234^1234123412
Should work for at least an hour or two on current CPU's.
http://tinyurl.com/4ny52
Boot Knoppix, open (BASH) shell, type:
/dev/null \; ; done ) &
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 {}
Got time? Spend some of it coding or testing
So you need simple, fast, no-need-for-network CPU load?
/dev/urandom | gzip > /dev/null
/dev/zero to a blank HD (since you are booting from CD, destroying the contents of the HD won't crash the OS)
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
There are some CPU spinners in the CPU scheduler evaluation project that should be of assistance.
The actual download page is here
//now you can run load tests under any operating system that has the jre
public class loop
{
public static void main(String[] args)
{
int x=1;
while (1>0)
{
x++;
}
}
}
Can't believe nobody's suggested just doing kernel compiles in a loop...?
we need something simple so I've come to the Slashdot community for assistance.
Thanks! I think...
That title says it. It's bash syntax. Will give you about 100% CPU utilization on Linux. Run several instances at once to load more CPU's. (while true; do true; done) & (while true; do true; done) & (while true; do true; done) & Since true is /bin/true, each iteration forks twice, which means zero-filling at least a few pages of memory per iteration, which recent Linux AFAIK does with SIMD instructions where possible (someone correct me if that's not correct), so that actually loads more of the CPU core than one would think at first.
Software should be free as in speech, but if we also get some free beer, all the better.
Sounds like you got some serious, serious horsepower, so I can't resist asking! ;-)
Hulk SMASH Celiac Disease
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.
They have a hardware kill mode. http://www.mersenne.org/
yes|grep no
Note to self: get smarter troll to guard door.
Write a c program to calculate factorial of -1.
Runs for ever. Run one or add a thread for every cpu.
Most of this happens in registers leaving memory utilization alone.
Courtesy of VA Linux. I don't imagine it would be hard to make a custom Knoppix (or other live distro) ISO with this.
http://sourceforge.net/projects/va-ctcs/
From the StressLinux website:
stresslinux is a minimal linux distribution running from a bootable cdrom or via PXE.
stresslinux makes use of some utilities available on the net like: stress, cpuburn, hddtemp, lm_sensors ...
stresslinux is dedicated to users who want to test their system(s) entirely on high load and monitoring the health.
Actually, factorial(x) is defined as gamma(x+1). And the gamma function is defined for negative values of x also. So computing the "factorial" of a negative number isn't really a problem.
perl -e "for(2..$ARGV[0]){last unless fork}print$$,$/;sqrt(rand(1<<32))while 1"
This will suck up all the CPU for one processor, add the number of processes to run on the end of the command line to load multiple CPUs.
gamma works on a + bi where a <= 0 and b == 0?
if the answer isn't violence, neither is your silence / freedom of expression doesn't make it alright
You can't seriously believe that hard drives don't put out mucho heat. Seriously, that's kind of idiotic. Why don't you touch your tongue to a hard drive after it's been running for about 12 hours straight and come back to us and rephrase the question.
--
sig
I have a few simulations that are taking upwards of 48 hours each to run on puny Athlon 1300s. I could load your systems for a couple hours. :-)
One future, two choices. Oppose them or let them destroy us.
Download CPUBurn here.
Run x instances, where x is the number of CPUs in your machine.
As easy as that.
Better use /dev/zero or /dev/urandom as /dev/random may not provide characters fast enough to be of any use (heating).
Meme of the day: I browse "Disable Sigs: Checked". So should you.
- Minimal linux distribution running from a bootable cdrom or via PXE.
.
- Uses of some utitlities like: stress, cpuburn, hddtemp, lm_sensors, smartmontools
- Dedicated to users who want to test their systems entirely on high load and monitoring their health.
http://www.stresslinux.org/
On a serious note, linpack (http://www.netlib.org/linpack/) You can run as many processes as required for your machine (i.e. 1 process per cpu) and with care you can use as much memory as you want (memory gets really hot and takes a lot more power than most people think). I do development testing for manufacturers who want us to sell their kit, I have burnt out many (now the manufacturers believe me that they are underspec'd) power supplies by using a well tuned linpack run to overload the system. It will take a bit of compilation to get it right for your system I suspect, but it can really heat a room up (got exhaust temps >60 celcius on some machines).
Yes... though it blows up for non-positive integers. See mathworld for details.
Overclockers often use Prime95 to do CPU temperature/stress testing. It is available in many flavors:
Trust me, it will heat things up!
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
There's a software package called 'stress' that should fill your needs nicely.
http://weather.ou.edu/~apw/projects/stress/
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.
-What have you contributed lately?
run 7zip compressing a very large file to 7z format in ULTRA mode, large file being CD ISO sized or so. either that or video encoding, but video encoding has been improved greatly over the years while 7z ULTRA mode is basically designed to not care about resource usage and squeeze an extra 2 megs off a 5 gig DVD image even if it takes 3 more hours to do it. (BTW, ULTRA is amazing with game compression, HL2 in 1.5 gigs anyone?)
Snowden and Manning are heroes.
Note: do {} while(1); is NOT a good way
Granted, it's 100% BUT it doesn't stress the heat generators of the CP (namely the ALU/FPU)
burnp6 (google for it)
Prime95 (stress test, Linux versions available, runs off command line)
or other alternatives: like the gzip one
how long until
#!/usr/bin/perl for(;;){ $a--; $b++; $c=($a*$b)/5; $b=$b+$c; $b=$b/13; } start up an instance for each CPU
Add a link to your servers, and post a front page link on slashdot!
meh
Here's an idea for you:
1. Get 10-20 older Athlon boxes.
2. Put them in the same room with the blade servers you want to test.
(3. And do I need to add this step - profit!)
...benchmarks into a print-string-and-exit monitor call plus a string corresponding to the final answer. This was back in MicroVAX days. Hi, Jeremy!
Got time? Spend some of it coding or testing
Also you end up running out of memory with all the processes and grinding to a halt as you move to swap space. So CPU utilization is not going to be 100% since you're waiting on the disk.
Don't you hate meta-sigs?