9

The background is thus: next week our office will have one day with no heating, due to maintenance. Outdoor temperature is expected between 7 and 12 degrees Celcius, so it might become chilly. The portable electric heaters are too few to cater for everyone.

However, I have, in my office of about 6-8 m2, a big honkin' (3 yrs old) workstation (HP xw8600 with 3.0 GHz Quad-core Xeon) that should be able output a couple of hundred Watts of heat. Running Furmark will max out the GPU but I'm not sure how to best work the CPU.

Last time I was in a cold office I either compiled more often or just launched 4-8 DOSBox:es running Norton Commander, but I think one can do better by using SSE1-2-3-4,MMX etc, i.e. stuff that does more work per cycle.

So, what CPU instructions toggle the most transistors each cycle, and thus use cause the CPU to draw most amount of power and thus give off maximum heat?

If I had a power meter available, then I could benchmark myself, but I figure this would be a fun challenge for the SO-crowd. :)

Macke
  • 24,812
  • 7
  • 82
  • 118
  • 4
    You are heating the office with a benchmark? A bit MacGyver-esque, don't you think? ;o) – Kai Mattern Oct 03 '12 at 19:32
  • Cathodique screen may help a bit. – Luc M Oct 03 '12 at 19:35
  • 1
    @KaiMattern: MacGyver was my nickname in school. Go figure. :) – Macke Oct 03 '12 at 19:40
  • 1
    "what CPU instructions" - for modern superscalar OOO procesors you should use mix of different instructions which will load all internal execution ports. Using only SSE4 or AVX will load only 2-3 ports of 6-8. – osgx Dec 11 '12 at 04:50
  • Would this be easier to answer and more illustrative to suggest using an old CPU with more limited instruction set? Is the power just a factor of how many transistors are flipped and the length of all closed circuits? – Steve Clay Jul 23 '14 at 15:34

3 Answers3

7

For your specific goal, if you really want to use your system as a heat generator, you need to first make sure that the cooling system is working really well (throwing the heat out of the box). Processors today are designed to throttle themselves when they reach a critical temperature which happens when a proper heatsink is used and the processor is at TDP (Thermal Design Power is the max power for the processor using normal programs). If you have a better heat sink and good ventilation (box fan?), you can probably get beyond TDP assuming that your power supply can handle it. If you turn the fan off, you basically will hit the thermal limit right away.

To be more explicit, the individual instructions that burn the most are generally load instructions that miss in the caches and go out to memory. To guarantee misses, you'll want to allocate a chunk of memory that's bigger than the last level CPU cache and hop around that memory. The pattern of hopping in the maximum power case is a bit complex because you're trying to get the maximum number of misses outstanding at every level of the cache hierarchy simultaneously. If you have 3 levels of cache, in a given period of time, you can have more misses to the L1 than you can to the L2 than you can to the L3 than you can to the DRAM page. (And the specific design of your processor will have a total limit on misses.) Between misses, the instruction doesn't matter too much, but I'd guess that one of the SSE4 multiplies (PMULUDQ) is probably the best since on a lot of modern processors, they execute in pretty quickly and generally do a whole lot of work (compared to say an add).

The funny thing is, running the GPU may limit the amount of heat that you can generate using misses to the L3 cache since the memory may be bogged down by the GPU. In that case, you should make sure that all accesses to the L3 are hits, but that you're missing in the other levels.

Nathan Binkert
  • 8,744
  • 1
  • 29
  • 37
  • 2
    Being at TDP is probably enough. No need to literally burn the CPU. However, I'd like to see some validation to your claim about cache misses burning power. I'd expect that the CPU would be idle and waiting for memory for 15-200 cycles. @osgx'es comment w.r.t. SIMD above is more to my intuition.... – Macke Dec 12 '12 at 07:15
  • You're right that if all you were doing were cache misses, that wouldn't burn enough power, but as I suggest above, you want to write code that constantly misses in the cache *and* uses the processor as much as possible between instructions. Also, being above TDP doesn't mean that you'll burn the CPU. TDP is just a spec for the cooling system. If you have a better cooling system, it can handle more. – Nathan Binkert Dec 12 '12 at 15:41
  • Could you offer some code piece sample, on how do you manage to achieve cache misses and such execution scheme, as you described? – xakepp35 Jul 14 '18 at 20:25
1

For GeForce graphics, my CudaMFLOPS program (free) is quite handy for obtaining high temperatures on the graphics card. If you have an appropriate card details are in:

http://www.roylongbottom.org.uk/cuda1.htm#anchor8

I find that my tests that execute SSE instructions with data from L1 cache generally produce the highest CPU temperatures.

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

For cpu use Prime95. That is lightweight and will load up all cores nicely. You aren't really going to get much heat out of a 3ghz xeon though. Chips of that age are usually good for over 4ghz with average cooling, and close to 5ghz with high end water loops. With a 6-core chip @ >4ghz with extra voltage added you might be hitting 200w TDP but with that system you will be lucky to get the cpu to 100w.

As for the GPU, the Heaven Benchmark is a good one for quickly getting it up to temperature. Again, unless you have a high end card a couple of hundred watts of heat is unlikely. Another alternative on AMD gpus (maybe nvidia too?) is to use crpto-currency mining software, maybe get a USB stick with a mining linux distribution installed and ready to go. You could also use Prime95 on the same rig as mining software uses very little cpu time.

I actually kept a couple of rooms warm over winter with the heat from a computer, only rarely needing extra heating. This was done with a crypto-currency mining rig, which had 4 gpus running at ~80 degrees C, 24/7, with a box fan to circulate the air round the room. That rig had a 1300W PSU. Might I suggest that instead of trying to use the computer to keep you warm, you wear more clothes?

David
  • 1