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

39 of 158 comments (clear)

  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.

  2. 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 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;
      }
  3. 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 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. 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).

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

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

    --
    eskwayrd = m^2c^4
  6. You want load? by Myrkur · · Score: 4, Funny

    Post the address on slashdot.

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

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

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

    Finally...a REAL use for Gentoo

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

  13. 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"?
  14. Easy, Fast Way to Generate CPU Load by Anonymous Coward · · Score: 5, Funny
  15. Re:here you go by p2sam · · Score: 2, Funny

    boo!! my infinite loop is far superior!!

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

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

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

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

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

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

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

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

    yes|grep no

    --
    Note to self: get smarter troll to guard door.
  26. 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.

  27. 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
  28. 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/

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

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