-3

Besides just running an infinite loop, are there any tricks (like maybe cache misses?) to making a CPU as hot as possible?

This could be architecture specific or not.

s g
  • 5,289
  • 10
  • 49
  • 82
  • 1
    Making an app that turns your phone into a pocket warmer is a good way to shorten the life of your device. – ElGavilan Nov 12 '14 at 18:13
  • 3
    Well, you want to make sure all the cores are busy, so spin up one or two threads for each core and make them all `while(1){}`. But you want the GPU generating heat too, so there's probably some openGL thing you can do in your while loop. And you want the other chips in on the action, so make some constant network requests. Specify cellular for some, and wifi for some so everyone is playing. Oh wait, you just made a game. Just make a game. – i_am_jorf Nov 12 '14 at 18:16
  • 1
    @jeffamaphone, a busy wait loop is a pretty bad example, since it hardly activates anything on the CPU. Most modern chips will simply disable whole parts of themselves – Leeor Nov 12 '14 at 23:23

3 Answers3

6

I have produced several reports on stress testing PCs via my [Free] reliability/burn-in tests for Windows and Linux. You can find the reports through Googling for “Roy Longbottom burn-in”.

What you need is a variety of programs that run at high speeds to test CPUs, caches and RAM. They should log and display speeds at reasonably short intervals with temperatures noted or preferably also logged. On running them, you can find which are the most effective. You can run multiple copies concurrently via BAT files for Windows or shell scripts with Linux, rather than relying on more complicated multithreading programs. You also really need programs that check for correct results of calculations. For system testing, one of the programs can use graphics. Here, for nVidia, CUDA programs are useful in producing high temperatures.

Following shows CPU core and case temperatures before and after blowing out the dust from the heatsink.

CPU Core and Case temperatures

Following are results on a laptop, testing with data in L1 cache. These show variations in speed according to temperature. Other CPUs might be more affected by different data/instructions/which cache is used. Overheating Core 2 Duo Laptop 1.83 GHz

 Words      5K              5K
Ops/wd       2              32
          Core  MFLOPS    Core  MFLOPS
Minute      °C      x2      °C      x2

   0.0      65              65
   0.5      96    4716      91   10168
   1.0      98    3362      94    4756
   1.5      91    2076      87    4443
   2.0      87    2054      86    4452
   2.5      85    2054      85    4235
   3.0      84    2036      84    4237
   3.5      82    3098      83    4376
   4.0      89    4773      83    4420

You might also be interested in my Raspberry Pi tests (Cooking The Pi), where the RPI is overheated via a 60W lamp, to crash when overclocked and show speed variations that vary with temperature. Here, the CPU integrated graphics is the most demanding hardware.

http://www.roylongbottom.org.uk/Raspberry%20Pi%20Stress%20Tests.htm#anchor7

Roy Longbottom
  • 1,192
  • 1
  • 6
  • 8
4

Since modern CPUs are usually power aware, they have many builtin mechanisms to power down whole parts (cores on a multicore system, or even internal units within). In order to really stress the CPU, you need to make sure you activate as many units as possible.

This can be most easily achieved through heavyloading your vector execution units if you have some, or floating point ones otherwise. On the memory side, try to constantly consume as much bandwidth as possible in order to stress the memory unit, caches and memory buses. Naturally, run your code on all available cores (if hyperthreading is available it might be a good idea to use that too)

This type of benchmarking is commonly known as a power virus. There are several examples over the web, you can look up cpuburn for e.g. (it has some sub flavors)

Leeor
  • 19,260
  • 5
  • 56
  • 87
  • When you disable frequency scaling (speedstep and turbo) in the BIOS/UEFI does this disable the powering down? I mean can the CPU still scale the frequency down if its too hot even though the frequency is suppose to be locked? For benchmarking it can be a good idea to disable frequency scaling but maybe it's impossible to totally disable frequency scaling? – Z boson Jun 23 '15 at 10:39
1

There are apps, and softwares that run the so called 'Stress Tests'. It'll run tests to stress the CPU and any other hardware in order to see if it gives any errors and etc. They are used for stability purposes, as you can imagine, to make sure the CPU/device/system will be OK under heavy processing.

Just look up for stress test softwares, you'll find a bunch of them.

Kelwen Souza
  • 109
  • 6