Welcome to Marlon's place!


Message of the day


"There is a brave man waiting, who'll take me back to where I come from"


(The Black Heart Rebellion)

Keeping it cool with CpuIdle

posted: Januari 11, 2009

My main development machine is a P4 3.4GHz, not the most recent of machines but I like it very much and since I don't play a lot of recent games requiring the latest and greatest in performance, it does it's job rather well. I did say rather well, because the machine has developed a big problem over the years: heat.

The first signs of trouble started a few years ago. As soon as I pushed the machine towards it's limits, after half an hour or so the motherboard would start complaining that the processor was overheating, and eventually I was left with the choice of shutting down the process that was doing the damage, or letting the motherbord shut down the machine before any harm could come to it.

Luckily my machine came equipped with enough fans (two case fans, one cpu fan, two psu fans and one for the NVidia 6800GT), so cooling it at that point was no trouble. The noise all those fans made were not pleasant, however.

Step forward to about a month ago, and my cpu would overheat as soon as I tried to do anything a bit cpu-intensive, which is annoying to say the least. Even worse: Speedfan (a utility which can measure the temperature of all things hardware) would indicate that my cpu was running at 70°C at startup!

In the middle of my end-of-the-year holiday, I got the idea to finally swap my Windows 2000 for Windows XP (and only because I was forced to for other projects than my own). Since I was reinstalling the machine anyway, I decided to take some time and open up the case to see what I could do. It was at that moment that I saw that the heat sink on the cpu had gathered a lot of dust, preventing fresh cold air from the cooler to flow to the heart of the heat sink core and perform it's duty. After a few blasts of compressed air, the heat sink(s) and the case were clean again, and I noticed that the temperature on startup dropped with about ten degrees. Ten degrees! Oh goody!!

During one of my frequent voyages on the world-wide-web, I discovered a tool called CpuIdle, which claimed (and still does) to be able to lower the temperature of your cpu, by making it do nothing while it was doing nothing. Being a developer with a sane dose of reality, I immediately called shenanigans on this little utility, and dismissed it's claim without further thought. After the re-installation of my machine, and after having made a ghost image of my new development environment, I decided to go against better judgement and give this little tool of wonder a go.

Boy am I glad I did that!

Not only does it work as promised, it works like a charm! When I first discovered the tool on the internet, I neglected to find out exactly how CpuIdle would be able to do what it promised, but after seeing the results, I had to find out. As it turns out, CpuIdle runs in an idle priority thread, executing a HLT instruction all the time. Whenever a cpu encounters a HLT instruction, the clock is halted and the cpu enters suspend mode until an interrupt, NMI or reset happens. In other words, the cpu doesn't just wait for an instruction, it effectively does nothing while waiting, thus cools down.

Since then, I have been running CpuIdle in the background, keeping my machine running cool and efficient. Instead of the 70°C I'd see at startup, I now see temperatures in the range of 45°C-50°C while working, and sometimes (under full load) the temperature reaches 70°C again. The shutdown limit is still set at 85°C, but I no longer get those annoying messages that my core is about to have a meltdown :)

Even though I don't like to advertise stuff, this truely is a marvelous tool and if you're running into heat problems with whatever computer you have, I really suggest you should give this neat little tool a try.

Previous articles

Recent C++ stuff

Recent Delphi stuff

Recent Java stuff