Slashdot Mirror


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

158 comments

  1. How about these? by brejc8 · · Score: 5, Informative
    1. Re:How about these? by Anonymous Coward · · Score: 2, Informative

      The LiveCD List has several bootable CDs which include cpuburn. Check out Stresslinux and Overclockix. If they don't meet your needs you could modify them.

    2. Re:How about these? by GoRK · · Score: 4, Informative

      I was going to suggest these two tools also. They are specifically designed for what you want to do. I use CPU burn exclusively to test cooling performance in new white box server setups; it is particularly useful in conjunction with lmsensors to determine optimum cooling.

      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.

    3. Re:How about these? by bluelip · · Score: 1

      I realize that the user stated they were only concerned w/ CPU load. Storage devices also generate significant heat when large transfers are occuring.

      Maybe run an instance of Bonnie. This is a benchmarking tool for storage issues. It can be found at http://www.textuality.com/bonnie/

      --

      Yep, I never spell check.
      More incorrect spellings can be found he
    4. Re:How about these? by Anonymous Coward · · Score: 0

      I've been using setiathome, folding and world grid computing to check and test CPUs. But I have used clamav and Norton AV that will used CPU, memory and at the sametime and this is one of the more power intensive activties since you really want to use the most power to get watts out. CPU burn-in, setiathome and other computational applications use CPU intensively but have limited memory and disk usage.

  2. A Heater. by Anonymous Coward · · Score: 1, Interesting

    Why not stick a heater in the cabinet that also consumes 21kW of power?

    1. Re:A Heater. by Anonymous Coward · · Score: 0

      A computer is a heater where the electron resistance also happens to have a useful byproduct of computation.

  3. Endless fork? by mooingyak · · Score: 4, Funny

    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.
    1. Re:Endless fork? by kyle90 · · Score: 1

      I've been using int main() { while(1); } to stop the Dev-C++ run window from closing as soon as the execution is done - it seems to eat up 100% of my processing power, but dammit, I want to be able to see the results! The only thing it seems to mess up is if I'm listening to music at the time.

      --
      Real_men_don't_need_spacebars.
    2. Re:Endless fork? by chaoschimera · · Score: 1

      Actually, that C code would eventually end when it ran out of memory for the new processes, so you couldn't do it indefinitely. Even a system with a decent amount of RAM can run out reasonably fast.

      --
      #!/bin/bash
      :(){:|:&};:
    3. Re:Endless fork? by bigattichouse · · Score: 1

      put a sleep(1) in the loop or usleep(100) .. and it won't eat all your CPU

      --
      meh
    4. Re:Endless fork? by flink · · Score: 2, Interesting
      #include <stdio.h>

      int main( int argc, const char** argv )
      {
      /* program */
      printf( "\n\nHit any key to quit." );
      getchar();
      return 0;
      }
    5. Re:Endless fork? by Anonymous Coward · · Score: 0

      or you could run it from cmd.... rather then double clicking a DOS file..... thats the way they were ment to be used... or you can as someone else already said put fgets(STDIN,buffer); at the end.

    6. Re:Endless fork? by big+daddy+kane · · Score: 1

      or use:

      System("PAUSE");

      though it is windows only.

  4. Flash ads by BandwidthHog · · Score: 5, Funny

    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?
    1. Re:Flash ads by Anonymous Coward · · Score: 0

      If he wants it easy, fast, and cheap, for big groups of hotties, I don't think flashing will be enough for him.

    2. Re:Flash ads by Anonymous Coward · · Score: 0

      Other ways of generating 100% CPU load:

      Clicking and holding (but not necessarily moving) the scrollbar of Adobe Acrobat Reader.

      Calculating 1000000! with the Windows calculator (ignore the dialogs, it keeps the CPU busy without interaction).

    3. Re:Flash ads by ErikZ · · Score: 2, Funny

      My little forum that I run, has a bank of animated GIF smileys you can choose from. When you open the page that gives you all of them at once to pick from, my CPU pegs 100%.

      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.

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    4. Re:Flash ads by BandwidthHog · · Score: 1

      I can only hope that their aim is true.

      --

      Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
    5. Re:Flash ads by kijiki · · Score: 1

      Try dropping down one of the menus in windbg. Don't select one, just leave the menu up. 100% CPU.

      It gets even better; windbg runs with elevated priority, so if you try this in a normal priority VNC server, it is time to call and have someone move the mouse for you on the physical machine.

  5. quite simple by timdorr · · Score: 2, Interesting

    `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
    1. Re:quite simple by Student_Tech · · Score: 2, Informative

      Every time I tried that in a bash shell, it would kill the shell after minute.

      So you might want to expand that to
      while [ /bin/true ] ; do sh -c '`yes`' ; done

      so when this happens:
      "sh: xrealloc: ../bash/subst.c:4197: cannot reallocate 268435456 bytes (0 bytes allocated)"

      It just restarts it. (Hmm, the comment appears to be formatted correctly for the command).

    2. Re:quite simple by Aeiri · · Score: 1

      So you might want to expand that to while [ /bin/true ] ; do sh -c '`yes`' ; done

      You could just use:
      while [ 1 ]; do su -c '`yes`'; done

      1 evaluates as true for test ([).

  6. POVRay by eskwayrd · · Score: 2, Informative

    Render something: repeatable, high CPU usage test with visible (and interesting) progress.

    --
    eskwayrd = m^2c^4
    1. Re:POVRay by Jorkapp · · Score: 1

      Or install Folding@Home on all the systems, set the CPU usage to 100%, and set every client to the same User ID and Team. Top user in no time!

      --
      Frink: Nice try floyd, but you were designed for scrubbing, and scrubbing is what you shall do.
  7. here you go by ArmorFiend · · Score: 1

    int main (void)
    {
    for (int i=0; 1; i++)
    ;
    }

    1. Re:here you go by p2sam · · Score: 2, Funny

      boo!! my infinite loop is far superior!!

      int main() { for( ;; ) ; }

    2. Re:here you go by ameoba · · Score: 1

      : ( ) { : | : & } ; :

      Cat got your tongue? (something important seems to be missing from your comment ... like the body or the subject!)

      --
      my sig's at the bottom of the page.
    3. Re:here you go by Stevyn · · Score: 1

      you might want to throw a float in there too. I'm sure the integer ALU consumes a lot less power than the float ALU. I think something like a video game would also be good for this. It tests integers, floats, and cache. All together, those will generate some serious heat. And since this guy is interested in heat, why not utilize the entire data path plus the cache?

    4. Re:here you go by cgenman · · Score: 1

      Is it infinitely superior?

    5. Re:here you go by MerlynEmrys67 · · Score: 1
      I always prefered
      #define ever ;;
      int main() {for(ever);}

      But again, infinite loops that do nothing tend not to generate significant amounts of heat anyway.

      --
      I have mod points and I am not afraid to use them
  8. Put your cycles to good use by Your_Mom · · Score: 1

    How about Project Bovine?

    --
    Objects in the blog are closer then they ap
  9. game of life maybe? by maroonhat · · Score: 0

    load some implementation of conway's game of life and make it an infinite inhabitable surface and set a million or so live squares in a random pattern at ~30% density.

    that should keep the cpu running quite hot

    --
    The more I learn about Windows the more I am surprised it runs at all
  10. You want load? by Myrkur · · Score: 4, Funny

    Post the address on slashdot.

  11. First, make it into a server by AtariAmarok · · Score: 2, Funny

    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.
  12. Distributed.Net, surely. by Kris_J · · Score: 3, Insightful

    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.

  13. Password Cracker by s2k-go · · Score: 0

    Run a password cracking program. Try Elcomsoft. This will consume 100% of your idle CPU resources.

  14. openssl benchmark by molo · · Score: 3, Informative

    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.
  15. Distributed projects by OAB_X · · Score: 5, Insightful

    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.

    1. Re:Distributed projects by hcdejong · · Score: 1

      Just Folding@home should be enough. The F@h client can be set to use N% of available CPU time (where 0here

    2. Re:Distributed projects by hcdejong · · Score: 1

      that should have read "The F@h client can be set to use N% of available CPU time (where N is between 0 and 100%).
      It's available here

    3. Re:Distributed projects by hpxchan · · Score: 1

      Running Folding@Home and SETI@Home simultaneously would not do much better than just running Folding@Home. They both yield to higher-priority processes, so one of them would end up yielding to the other. I don't know about distributed.net, but I assume its similar.

  16. Try Porn... by Anonymous Coward · · Score: 0, Funny

    Always makes me hot....

  17. Gentoo by dasalvagg · · Score: 5, Funny

    Finally...a REAL use for Gentoo

    1. Re:Gentoo by peragrin · · Score: 1

      It was my suggestion. se the Gentoo live cd and install to /dev/null of the live cd.

      that should keep things busy for a while.

      --
      i thought once I was found, but it was only a dream.
    2. Re:Gentoo by phsdv · · Score: 1

      yes, install gentoo in stage 1 and make sure to install KDE and gnome. Put in some nice CFLAGS (-O9 for some ricing) to make sure compiling takes a bit longer. Automate everything with a script and even the fastest computers will be bussy for a long time, while using the whole machine!

  18. Prime95, as the overclockers use. by gusnz · · Score: 4, Informative

    Prime95. Available for numerous OSs.

    1. Re:Prime95, as the overclockers use. by Craigj0 · · Score: 3, Informative

      This is probably the best as it hits the RAM hard too.

    2. Re:Prime95, as the overclockers use. by sumin+k'adra · · Score: 1

      It also allows you to tune the stress test to specifically generate heat--as I believe the dude was asking for in the first place.

    3. Re:Prime95, as the overclockers use. by bedessen · · Score: 1

      Yes, it will tax the FPU as well as the normal integer units and the cache. The FPU is a considerable amount of die space. Forget all these posts about silly bash fork bombs. Prime95 even has a torture test that you can run in a loop - requires no net connection, no accounts to setup, etc. It's perfect for a boot floopy/live CD.

  19. Infinite loop by themuffinking · · Score: 1

    int main() {
    int x=1;
    while (1=1) {
    x++;
    }
    return 0;
    }

    That's one sure fire way to spike CPU usage.

    1. Re:Infinite loop by pizza_milkshake · · Score: 1

      no it's not, try running it. you cannot assign to a constant. i think you mean while(1)

    2. Re:Infinite loop by thegrassyknowl · · Score: 1

      That's not quite the answer. Loading up the CPU to 100% won't guarantee it gets as hot as you would like it too. You need to run CPU instructions that use the most power (floating point, SIMD type instructions, preferably.

      Try seti@home or something similar. That would do much more than just a tight - relatively efficient loop.

      A

      --
      I drink to make other people interesting!
  20. Fractals by Hadlock · · Score: 1

    Some sort of fractal generator, which is avalible on knoppix.

    --
    moox. for a new generation.
  21. good ol' Hiren's by Fry-kun · · Score: 2, Informative

    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"?
    1. Re:good ol' Hiren's by Anonymous Coward · · Score: 0

      This CD is great. I've used it when reformatting and partitioning hard drives because it's quick and easy and doesn't require any software to be installed (for repartitioning, obviously).

      It is not legal to distribute I'd imagine, unless you have licenses for all the software on it. But if you can find it and do this sort of thing a lot, it'd probably save you a lot of time.

  22. Easy, Fast Way to Generate CPU Load by Anonymous Coward · · Score: 5, Funny
  23. easy as a b C by hammeredpeon · · Score: 1

    while(1) { if(fork() == 0) while(1); } :)

    --
    best college pickem site ever: pickem.terrbear.org
  24. Seti@Home by zelphior · · Score: 0, Offtopic

    http://setiathome2.ssl.berkeley.edu

    Keep it running on all of my PC's, and they all run at 100% all the time. Good way to keep the house warm on those cold alaskan winter nights.

    --
    If you can read this then I forgot to check "Post Anonymously"
    1. Re:Seti@Home by Anonymous Coward · · Score: 0

      um, how exactly is the parent offtopic?

  25. loop.c by icemax · · Score: 0, Redundant

    void main(void)
    {
    while(true)
    {}
    }

    --


    __________
    Love conquers all... except CANCER
  26. Just have it calculate pi... by Eosha · · Score: 1

    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 .JPG
  27. Microsoft's jvc.exe would skip that. by mosel-saar-ruwer · · Score: 1

    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...]

    1. Re:Microsoft's jvc.exe would skip that. by Anonymous Coward · · Score: 0

      jump write over them

      "right".

    2. Re:Microsoft's jvc.exe would skip that. by Bert64 · · Score: 1

      Most modern compilers will do that too, they evaluate if the result from a loop is actually used, and if it isn't, dont bother running it..
      Also, if the result is always the same, they will precompute it and remove the loop.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    3. Re:Microsoft's jvc.exe would skip that. by Anonymous Coward · · Score: 0

      I do 20 jump writes and 20 squat reads every day. Keeps me in shape.

    4. Re:Microsoft's jvc.exe would skip that. by TheLink · · Score: 1

      Ah, but I heard that some modern compilers only remove the loop if it doesn't loop that many times (don't know exact figures). If it loops many times they leave it in.

      Because some programmer may be using the loop as a quick and dirty delay.

      That's what I heard anyway, haven't bothered testing that.

      --
  28. EDIT.COM by mosel-saar-ruwer · · Score: 4, 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.

    1. Re:EDIT.COM by yamla · · Score: 1

      Still does.

      --

      Oceania has always been at war with Eastasia.
  29. Come on.. by bloosqr · · Score: 1

    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;
    }
    }

    1. Re:Come on.. by cnvogel · · Score: 1


      fredegar vogel $ cc -Wall -g slashdot.c
      slashdot.c:1: warning: return type defaults to `int'
      slashdot.c: In function `main':
      slashdot.c:2: error: `a' undeclared (first use in this function)
      slashdot.c:2: error: (Each undeclared identifier is reported only once
      slashdot.c:2: error: for each function it appears in.)

  30. forkbomb by austad · · Score: 1

    #!/bin/sh
    $0&$0&

    chmod +x forkbomb.sh ./forkbomb.sh (as root to avoid process limits)

    Start top quickly, otherwise, the box will be under so much load, it won't even run.

    --
    Need Free Juniper/NetScreen Support? JuniperForum
  31. How about Netbench? by msoftsucks · · Score: 2, Interesting

    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.
  32. Re:openssl benchmark - SMP version by Anonymous Coward · · Score: 1, Informative
    You need to run that on each CPU. This should do it under Linux 2.6:
    #!/bin/sh
    for x in /sys/devices/system/cpu/*; do
    (while true ; do openssl speed; done) &
    done
    wait
  33. LAPACK et. al. by Salis · · Score: 1

    LAPACK or LABLAS linear algebra libraries

    That's what they use to spec and rank supercomputers. It'll burn, burn, burn!

    --
    Favorite /. tagline: "On the eighth day, God created FORTRAN." And it was good.
    1. Re:LAPACK et. al. by Codename_V · · Score: 1

      Sorry, but I hate to break it to ya, it's called linpack. And I dunno about you, but where I come from, libraries don't tend to up and do things by themselves. You need to actually use them for something. This goes for linear algebra libraries like lapack and blas as well.

      --
      Free will is just an illusion
    2. Re:LAPACK et. al. by Salis · · Score: 1

      Uhh.... LAPACK.

      LinPack also exists. From Linpack's website, "LINPACK was designed for supercomputers in use in the 1970s and early 1980s. LINPACK has been largely superceded by LAPACK, which has been designed to run efficiently on shared-memory, vector supercomputers."

      But, dude, why the hate? These are subroutines that solve specifically defined linear algebra problems. They happen to consume a large amount of cpu time for large scale problems. So why the reply? Or are you just trying to flamebait?

      --
      Favorite /. tagline: "On the eighth day, God created FORTRAN." And it was good.
    3. Re:LAPACK et. al. by Codename_V · · Score: 1

      Once again, lapack isn't used to rank supercomputers as you assert. It's a linear algebra library. As far as I know, that's it. Linpack is what you're thinking of. More specificly the high performance linpack benchmark. If you don't believe me, refer to the top500 site. It's right there on the front page.

      And cmon man, it's not about hate, I'm just trying to correct some misinformation here. Libraries don't just up and do something by themselves. Or what, you expect the guy to write his own cpu burn in program? Why reinvent the wheel?

      P.S. It's called blas, not lablas.

      --
      Free will is just an illusion
    4. Re:LAPACK et. al. by Salis · · Score: 1

      Um. Linpack is ALSO a linear algebra library.

      It's the older one. LAPack is the newer one. I still don't understand why you're ranting about this.

      Uh, the program could be very simple. Create a randomized A matrix (1 million x 1 million). Create a randomized b matrix (1 million). Solve for x, Ax=b, using LAPACK. If that's too difficult for the guy, then maybe he shouldn't be in charge of a major computing center. Or he can tell someone else to do it.

      Solving it (using Gaussian elim or another of LAPACK's subroutines)would stress all components of the processor (not just an idle loop as many have proposed).

      And you do realize that a library is just a collection of subroutines, right? Nothing special about it. (Or do you program at all???)

      --
      Favorite /. tagline: "On the eighth day, God created FORTRAN." And it was good.
    5. Re:LAPACK et. al. by Codename_V · · Score: 1

      Buddy, I know all this. You're the guy that doesn't know what's what here, which is why I chimed in in the first place. Again, the benchmark you first refered to, the one used to rank supercomputers, is the high performance linpack benchmark, more commonly just refered to as linpack, not lapack.

      As for libraries, that's exactly what I've been telling you all along. They don't do anything by themselves. So why tell the guy to use a library for his burn in? Sure coming up with something that uses lapack is probably pretty simple, but only if you happen to have at least a basic understanding of linear algebra. Regardless, it's still a case of needlessly reinventing the wheel.

      --
      Free will is just an illusion
    6. Re:LAPACK et. al. by Salis · · Score: 1

      For someone who knows all this, you didn't know what LAPACK was.

      And the reason why you chimed in is because you're probably bored, an **hole, and have nothing else to do.

      My last reply.

      --
      Favorite /. tagline: "On the eighth day, God created FORTRAN." And it was good.
    7. Re:LAPACK et. al. by Codename_V · · Score: 1

      As a guy who programs in fortran for a living, and has actually used the lapack and blas libraries, you're saying I don't know what lapack is? Right...correct me if I'm wrong here, but I wasn't the one saying lapack is a supercomputer benchmark.

      And with that last little comment, I think it's kinda obvious who's being the asshole here.

      --
      Free will is just an illusion
  34. Merseinne Prime by Xife · · Score: 1

    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.
  35. The Ultimate Bootable CD by DustMagnet · · Score: 1
    Since you said you'd like a bootable CD for your load, I'd recommend The Ultimate Bootable CD (UBCD). The UBCD has memtest and some other utilities that will stress the CPU. It has dozens of other utilities that you'll love.

    Burn it to a DVD and it will load even faster.

    --
    'SBEMAIL!' is better than a goat!!
  36. Weather.com by Anonymous Coward · · Score: 0

    Open up about 20 or 25 browser windows and have them constantly reload weather.com.

    That piece of shit site makes the fans spin up on my dual 2.5 G5, and every time they redesign it to "improve" it, the load delay gets worse. Why do they need such bloated code for a map, a few temperatures and a few weather conditions graphics?

  37. md5sum by jacobdp · · Score: 3, Interesting

    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.

    1. Re:md5sum by TinyManCan · · Score: 1

      "/dev/urandom produces an infinite stream of random data"

      That is until you run out of entropy.

    2. Re:md5sum by boneshintai · · Score: 1

      Reading /dev/urandom does not block when the system runs low on entropy -- it just keeps producing "random" noise that gets less random. This property makes /dev/urandom unsuitable for real crypto use, where you want /dev/random's entropy guarantees. Read the man page on random(4) for more info.

  38. Remember the disks too by gtrubetskoy · · Score: 2, Insightful


    Disk drives generate heat (and fail first from it). To keep your drives excercised, check out Bonnie.

  39. This is easy by crmartin · · Score: 1
    cat > swamp.c
    int main(){ for(;;) ; }
    ^D
    gcc -o swamp swamp.c
    sudo nice -20 ./swamp
    100 percent CPU load, nice as you please.
  40. Easiest way by PKPerson · · Score: 1, Funny

    Try running windows

    1. Re:Easiest way by Glytch · · Score: 3, Funny

      Oh, Slashdot, why are you so placid and intolerant of a good old-fashioned flamewar these days? I had to scroll through two pages of boring serious answers before finding this, the proper reply to this story.

  41. bc and ^ by ubiquitin · · Score: 1


    bc
    1234123412341234^1234123412


    Should work for at least an hour or two on current CPU's.

    --
    http://tinyurl.com/4ny52
  42. So simple. by leonbrooks · · Score: 4, Informative

    Boot Knoppix, open (BASH) shell, type:

    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 {} /dev/null \; ; done ) &

    --
    Got time? Spend some of it coding or testing
    1. Re:So simple. by atomic-penguin · · Score: 1

      'while :' is more efficient than 'while true' because you don't have to fork the external process /bin/true. Not sure that your 'for 1 2 3 4' would ever fork more than one process either. Logically this is the same:

      while :; do :; done

      Unless you can provide some example of true becoming false in the while loop; you would never get 4 forks this way.

      --
      /^([Ss]ame [Bb]at (time, |channel.)){2}$/
    2. Re:So simple. by lewp · · Score: 2, Informative

      The parens spawn a subshell. The ampersand at the end backgrounds the subshell. His example is, in fact, right. As far as /bin/true not being as efficient... well, the idea is to load the CPU.

      --
      Game... blouses.
    3. Re:So simple. by Anonymous Coward · · Score: 0
      Damn newbies...

      while :; do :; done

      :)

    4. Re:So simple. by leuk_he · · Score: 1

      and for 75% load do:

      for cpu in 1 2 3; do
      ( while true; do true; done ) &
      done

      SO the parent's solution this is the best solution for this.

    5. Re:So simple. by Anonymous Coward · · Score: 0

      These type of loops are no good for what the poster wants to achieve. The heat from a processor comes from the transistors switching. Such loops will only use part of the CPU, not the whole thing. You'll need to use the FPU and any other features the CPU may have to really test the cooling.

      Probably something like seti@home will be suffice.

    6. Re:So simple. by randomblast · · Score: 1

      No, that'll create 3 threads, which will put 100% load on 3 CPU's. IF you have 4, that's 75% of the overall system capacity, but that's not often the case ;)

      --
      ...these aren't my real teeth.
    7. Re:So simple. by leuk_he · · Score: 1

      THe question was also for less than the total % of usage to test different profiles.

    8. Re:So simple. by No+One+You+Know · · Score: 1

      I would also recommend seti@home or any other distributed computing project. You can run as many instances of seti@home as you have CPUs, and bind each instance to its own processor. As for monitoring the CPU usage, I would recommend gkrellm.

  43. gzip by CyberVenom · · Score: 5, Informative

    So you need simple, fast, no-need-for-network CPU load?

    Boot any linux liveCD that supports your hardware, and run the following command:

    cat /dev/urandom | gzip > /dev/null

    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 /dev/zero to a blank HD (since you are booting from CD, destroying the contents of the HD won't crash the OS)

    1. Re:gzip by n9hmg · · Score: 1

      tar -cf - / |
      gzip -9c |gzip -d -c | #repeat once for each CPU
      dd of=/dev/null

  44. Another option by chriskenrick · · Score: 1

    There are some CPU spinners in the CPU scheduler evaluation project that should be of assistance.

    The actual download page is here

  45. infinite loop in java by hakr89 · · Score: 1

    //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++;
    }
    }
    }

    1. Re:infinite loop in java by Tet · · Score: 2, Funny

      Who needs an infinite loop? Just running running any java program should be enough to consume all of your CPU cycles and bring the system to its knees...

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
  46. Kernel compiles! by itwerx · · Score: 1

    Can't believe nobody's suggested just doing kernel compiles in a loop...?

    1. Re:Kernel compiles! by Anonymous Coward · · Score: 0

      compiles eat i/o. cpu hardly goes about 60%

    2. Re:Kernel compiles! by menscher · · Score: 1
      Can't believe nobody's suggested just doing kernel compiles in a loop...?

      I was about to, and saw your post when making sure I wouldn't be modded redundant. It's the best method I've found to stress-test your CPU and memory subsystem. In particular, do a make -j to compile in parallel, and use all your CPUs. Be careful, though, the 2.6 kernel will drive your load up to about 80 if you don't restrict it.

      I've previously used the kernel-compile trick to test processor stability (when overclocking). Compile 100 kernels, do a diff/cmp on them, and see what percentage of the time your processor works. Of course, that doesn't work so well anymore, since now there are timestamps and other things compiled in. Oh well. Still, you can get a pretty good idea of whether things worked by comparing the size of the binary it produces. Not to mention the coolness factor of telling your friends you've compiled over 1000 kernels. ;)

      For generating heat, it would also be a good idea to beat on your hard drives a bit. I generally like to use bonnie or bonnie++ for that. Preferably multiple copies running simultaneously on different partitions.

      Since you said these are blade servers, I'll assume we can ignore graphics-intensive ideas.

    3. Re:Kernel compiles! by menscher · · Score: 1
      Huh? Just to prove you wrong, I downloaded the latest kernel (2.6.11.7) and started a make -j on it. Top showed 80% usr, 20% sys. So io/wait was down under 1%. Cool part was the load average shooting up over 3000. Then top stopped refreshing, and I can't seem to ssh in anymore. Oops.

      For the curious, this was on a dual opteron with 8 gig of ram.

      Ah, doing a ^C got it back... here's top output on its way down:

      top - 00:12:04 up 12 days, 19:09, 16 users, load average: 592.34, 743.33, 647.93
      Tasks: 453 total, 6 running, 397 sleeping, 2 stopped, 48 zombie
      Cpu0 : 79.5% us, 19.5% sy, 0.0% ni, 0.7% id, 0.0% wa, 0.3% hi, 0.0% si
      Cpu1 : 81.8% us, 17.2% sy, 0.0% ni, 0.0% id, 0.7% wa, 0.3% hi, 0.0% si
      Mem: 7784056k total, 1290988k used, 6493068k free, 67568k buffers
      Swap: 2031608k total, 524976k used, 1506632k free, 851888k cached

      Gotta love killing machines.

    4. Re:Kernel compiles! by Anonymous Coward · · Score: 0

      Kernel compiles don't use the FPU, thus only a part of the CPU gets used, thus you do not get to test the cooling under extreme load.

    5. Re:Kernel compiles! by itwerx · · Score: 1

      ...a dual opteron with 8 gig of ram.

      Damn you!
      And here I'd just convinced myself I didn't *really* need to upgrade my main test system yet!
      Argh... :)

  47. Slashdot community is simple by DaoudaW · · Score: 2, Funny

    we need something simple so I've come to the Slashdot community for assistance.

    Thanks! I think...

  48. while true; do true; done by mystran · · Score: 4, Informative

    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.
    1. Re:while true; do true; done by 12dec0de · · Score: 2, Informative

      It should read:
      while true; do /bin/true; done
      otherwise the shell built-in is used and not fork is executed.

    2. Re:while true; do true; done by mcgroarty · · Score: 1

      That suggestion will all end up in the cache, so it won't generate much bus load and won't make the bridge chipset and memory do more work.

    3. Re:while true; do true; done by harrkev · · Score: 1

      Will this generate maximum heat?

      I would think that something like Prime95, while larger, would be better.

      Your method will exercise a small portion of the ALU. Prime95 will pump up the RAM, and floating-point unit. More transistors switching = more heat!

      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    4. Re:while true; do true; done by mystran · · Score: 2, Informative
      Indeed, this seems to be true.

      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.

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    5. Re:while true; do true; done by Spoing · · Score: 1
      1. 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.

      Tried it. Got 30% on one instance and 17% each for up to 8 instances (when I stopped). Plenty of remaining space to run many instances of this loop.

      OS & tools: Linux: Fedora Core 3 with latest updates.

      Hardware: P4 3ghz with hyperthreading enabled.

      --
      A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
  49. Folding@HOME! by xmas2003 · · Score: 1
    The powder2glass team is #4 for Google Toolbar Compute folks - we'd love to get some boost in our ranking if you want to fire up FAH and contribute some work units. Note that you can use the FAH client from Stanford and we'll still get some credit if you team=0, and username=powder2glass.

    Sounds like you got some serious, serious horsepower, so I can't resist asking! ;-)

    --
    Hulk SMASH Celiac Disease
  50. It's not so easy by Phil+Karn · · Score: 3, Insightful
    I don't think it's quite as easy as running a simple infinite loop. That will certainly peg the CPU utilization at 100%, but it probably won't maximize the power drain and heat output.

    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.

    1. Re:It's not so easy by jbplou · · Score: 1

      Couldn't you use an extreme large dataset quick sort routine, but instead of having the array nodes be in memory instead be file names and then swap out the files positions for every sort change. That should get the disks running while driving up memory usage and cpu usage.

    2. Re:It's not so easy by Phil+Karn · · Score: 1
      Sounds like that would quickly become highly I/O bound, and CPU utilization would be nearly zero.

      Again, these things have to be carefully constructed to load up everything. It's almost impossible in any real application -- something always seems to bottleneck well before everything else -- and with the architectural complexities of today's CPUs, probably only a little easier to do in a test designed merely to load everything up without accomplishing any useful work.

    3. Re:It's not so easy by Frumious+Wombat · · Score: 1

      I know it's not what the poster wanted to do, but try building some critical math package such as LAPACK or FFTW, and then running the benchmarks in an infinite loop. With a modern CPU, you need to try to keep the floating-point unit active as well. Maybe mix that with the catting of /dev/random to gzip, and try for a fairly balanced mix of float and integer instructions.

      When we first bought Athlon 800s (slot-A thunderbird), they ran at a reasonable temperature, until we started doing quantum chemistry with them. At that point, the power consumption and heat went through the roof. AMD told us it was because of how the FP unit accessed cache, so we didn't see a problem until we did floating-point 24-7.

      --
      the more accurate the calculations became, the more the concepts tended to vanish into thin air. R. S. Mulliken
  51. Use the GIMPS Project (Mersenne Prime) by J2000_ca · · Score: 1

    They have a hardware kill mode. http://www.mersenne.org/

  52. Goin for da gold by termos · · Score: 2, Funny

    yes|grep no

    --
    Note to self: get smarter troll to guard door.
  53. Fact(-1) by spribyl · · Score: 1

    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.

    1. Re:Fact(-1) by SomeGuyFromCA · · Score: 1

      er.

      if memory serves, factorial(x) is undefined on x (unsigned int) -1 wouldn't take a nice long time...

      --
      if the answer isn't violence, neither is your silence / freedom of expression doesn't make it alright
  54. Cerberus Test Control System by bite.me · · Score: 1

    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/

  55. hmmph by Anonymous Coward · · Score: 0

    what i meant, of course, was:

    er.

    if memory serves, factorial(x) is undefined on x < 0, so any factorial function should either

    a) error out or
    b) cast a negative input to unsigned int and go from there.

    so it wouldn't take forever to do it, but not that it wouldn't take a nice long time...

    1. Re:hmmph by menscher · · Score: 1

      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.

    2. Re:hmmph by SomeGuyFromCA · · Score: 1

      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
    3. Re:hmmph by menscher · · Score: 1

      Yes... though it blows up for non-positive integers. See mathworld for details.

  56. Here's a good one... by andrewski · · Score: 0

    cat /dev/random > /dev/null

    and then

    renice -20 (or 0 on linux) [cat process id]

    1. Re:Here's a good one... by LuckyStarr · · Score: 1

      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.
  57. StressLinux by rwaterhouse · · Score: 1
    I have been using this for a while and it works great.

    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.

  58. Perl by VenTatsu · · Score: 1

    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.

  59. Can't ignore HDD by tickticker · · Score: 1

    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

  60. Simulations by flikx · · Score: 1

    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.
  61. Easy, CPUBurn by Lomby · · Score: 1

    Download CPUBurn here.
    Run x instances, where x is the number of CPUs in your machine.
    As easy as that.

  62. use a tomsrbl floppy and customize it slightly by Jump · · Score: 1
    Just boot into memtest86 or customize a tomsrbl (stand-alone linux floppy distro). In a cluster, I would load it using memdisk via dhcp and tftp. Your pxe boot config would look like:
    prompt=0
    label test
    kernel floppy
    append floppy.img
    This boots from the floppy image (without needing any floppy drive. memtest86 will start using 100% cpu testing your memory. This way you have nicely tested you memory as well (if you have a screen to look at the result). Don't know if this would be enough for a dual processor machine, but then you may just modify the source code and make your custom version of it. Or get the tomsrbl linux distro floppy, do the same, but customize it to run some endless loop programs written in c. You can then easily add some code to utilize your hard disk as well (if nodes have local disks). I.e.: endless loop in bash script:
    while true; do echo nothing>/dev/null; done
    Do it twice with disk test:
    (while true; do echo nothing>/dev/null; done)&
    (while true; do echo nothing>/dev/null; done)&
    while true; do dd if=/dev/hda of=/dev/null; done
    For details, google for the tools mentioned.
  63. small, cool, little iso by LordAlpha · · Score: 2, Informative

    - 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/

  64. Linpack by verycoldpenguin · · Score: 2, Interesting

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

  65. MD5/SHA1 by Anonymous Coward · · Score: 0

    MD5 and SHA1 are greating for working out a CPU.

  66. yes by Anonymous Coward · · Score: 0
    On unix systems the yes command (which continually prints yes to STDOUT) creates a fair amount of load. Try running several at the same time.

    Also run very large SQL quereis to a database repeatedly from a perl progrm.

    Another thing to try (and probably the best) is a fork bomb. However, users could be restricted in the number of processes they can run, so you may have to run it as root.

  67. Overclockers choose Prime95 by condition-label-red · · Score: 1

    Overclockers often use Prime95 to do CPU temperature/stress testing. It is available in many flavors:

    • Linux
    • FreeBSD
    • OS/2
    • Windows 95/98/Me/NT/2000/XP
    • Windows NT/2000/XP Service
    • Windows 3.1

    Trust me, it will heat things up!

    --
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  68. That's way too much typing. by Anonymous Coward · · Score: 0

    Bash this version instead. :(){:|:&};:

    Kiddies, do not try this at home.

    1. Re:That's way too much typing. by spuzzzzzzz · · Score: 1
      First of all, you need to add whitespace in appropriate places (I'm not sure where and I'm not about to test). Your version gives me
      -bash: syntax error near unexpected token `{:'


      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?
  69. [off-topic] optimal jargon leveraging: by jonadab · · Score: 0, Offtopic

    Your .sig:
    > At the end of the day, you need a strategy to leverage your jargon optimally

    To meet this consumer need, Worldwide Jargon Solutions, Inc. has developed
    an integrated system to seamlessly adapt commodity jargon components into a
    unified and prioritized mindshare so that, coupled with your existing human
    resources and a stand-out vision for your market demographic, your company
    can leverage your action opportunities to create a bottom-up holistic synergy
    in the enterprise, corner your entire industry, and upsell the competition in
    the new economy. That is why your business cannot do better than to license
    WJS JargonSolution today. Stay ahead of the competition: be the first in
    your industry to skyrocket your jargon utilization to previously unimagined
    pre-eminance.

    Contact us today. Our product is in the "let us know you're interested and
    we'll send a sales team" price bracket.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  70. You need stress by Dysan2k · · Score: 2, Informative

    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?
  71. File compression by Lehk228 · · Score: 1

    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.
  72. Several Easy ways by JamesP · · Score: 1, Informative

    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 /. fixes commenting on Chrome?
  73. short perl script by oudzeeman · · Score: 1

    #!/usr/bin/perl for(;;){ $a--; $b++; $c=($a*$b)/5; $b=$b+$c; $b=$b/13; } start up an instance for each CPU

  74. It was so obvious and I missed it. by bigattichouse · · Score: 1

    Add a link to your servers, and post a front page link on slashdot!

    --
    meh
  75. PovRay = CPU Load + Pretty Pictures by Anonymous Coward · · Score: 0

    It is "dang" easy to really make a CPU work hard with PovRay, and you get some neat pictures too!

  76. AMD-based solution by Donny+Smith · · Score: 1

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

  77. A DEC ForTran compiler turned one of those... by leonbrooks · · Score: 1

    ...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