Atomic I/O letters column #83Originally published 2008, in Atomic: Maximum Power Computing Last modified 16-Jan-2015.
I was wondering how important page files are these days when more and more RAM is available. If a Vista system is utilising 4GB of system RAM would the page file be redundant?
Also, if we are required to have a page file, how big should it be, and is it best placed on the OS partition, a separate HDD or a USB high-speed Flash drive as I believe Vista has the ability to do?
The page file does still have a purpose, even in a computer that has enough RAM that it doesn't have to thrash the page file all the time to make up for lacking physical memory.
It's surprising how much data a modern operating system with a few applications running can be juggling at any given time. Applications may automatically reserve a huge slab of memory for themselves when you run them, and never actually use very much of it. If you've got a page file, this isn't a problem; the memory the program's actually using is mapped to physical RAM, and the memory that it asks for just in case but seldom actually does anything with gets paged out to disk.
Usually, this works very well. It'll only create an obvious performance hit in perverse cases. If, for instance, an application writes data to 250Mb of RAM, then does nothing with it for hours on end, that data will be paged out to disk so that other apps can use the physical RAM. If the app then suddenly wants all of that data again, you'll find yourself waiting for disk access. This sort of thing does not happen very often.
If you don't have a swap file, then all of the memory that every application and operating system process ever allocates has to have its own place in the physical RAM, which means you can run out of that physical RAM - and start getting hard memory errors - surprisingly quickly. Modern operating systems are smart enough about their virtual memory management that there's no real performance advantage to disabling the swap file, if it's even possible to do so.
(Vista, by the way, is famous for never having very much RAM free, but that's because it uses as much RAM as it can for caching whenever that RAM isn't needed for anything else. This, in itself, doesn't have much to do with the page file.)
If you've got enough RAM that you can run all the programs you want without swap-file flogging, then the location of the swap file really doesn't matter very much, and you also might as well leave it on the default automatically-adjusted-size setting. Optimally, swap should be on an internal hard drive that isn't used by whatever software uses the most memory, but it really isn't a big deal.
Note that Windows won't let you put swap files on any "removable" device, including USB drives. This is sensible, because Bad Things will happen if you unplug a swap disk. Vista's USB-drive caching system, "ReadyBoost", is unassociated with the swap file, and also well known for not actually making much difference to anything if you've got a reasonable amount of physical RAM.
I was curious one night when I was on my laptop and noticed how much heat was coming out the exhaust vent. I downloaded a CPU temperature monitor. The CPU was running at 71°, which I thought was a little hot. All I was doing was defragmenting the hard drive.
Is that a little hot for an Intel Core 2 Duo T5300 in a laptop?
Yes, 71° is definitely rather warm. The official ceiling temperature for your Merom-2M CPU is 85°C, though, so you should have a fair bit of headroom before any crashes start happening.
There are more factors here than you might at first think, though.
First: The CPU temperature is reported by motherboard hardware that reads a thermal diode near (not actually in) the CPU core, and may not be reading it correctly. It's also barely possible that the monitoring software you're using is mis-displaying the temperature.
I don't actually think this is the case, but you certainly shouldn't assume that there's some sort of NASA-specification super-thermometer in there. The actual core temperature could easily be 65°C, or 75 for that matter.
Second: In desktop PCs with reasonable cooling air flow, the temperature of the computer's components is relatively independent. In a laptop, though, the toasty warm hard drive (heated up by air friction on the platters whenever it spins) can heat up the rest of the computer even if the CPU, RAM and graphics hardware have little to do.
Third: All current PC CPUs, laptop and desktop, have pretty advanced power saving features. Those features can automatically greatly reduce the processor's power consumption when it's not doing anything.
If you've got a Windows PC's Power Scheme set to "Always On", though (or "Home/Office Desktop", if the computer's running from mains power), then the power saving features will never kick in. For more info about the SpeedStep system built into your CPU, see Bay Wolf's SpeedStep FAQ.
Fourth: The simplest explanation for the high temperature is that the little cooling vents in your laptop are clogged with dust. This is pretty normal, but may require you to pull the whole computer apart to clean the dust out.
If you notice a laptop's cooling fans are all running at maximum power when they almost never used to, dust is very likely to be the culprit.
I seem to be experiencing the same kind of problems as in the "Never rule out goblins" letter from ten issues ago. It's summer now in South Africa and a few degrees hotter, and my PC restarted yesterday without any warning while I was playing DiRT.
The whole PC is less than eight months old and still very new (clean). I purchased an 8800 GTX a while back and had to replace two consecutive 500W power supplies (some funny brand) when they couldn't handle the load and blew up. I opted for an Antec 650W, and the system finally worked perfectly.
What worries me however, when I checked under load, my I/O controller temperature registered 91°C, which I think is way too hot and may have caused the restart. The memory controller was 85°C and CPU around 55. I didn't, however, check to see what the GTX was running at.
I've got a 2.13GHz Core 2 Duo, Intel DG33BU motherboard, 2Gb DDR2 667MHz RAM, two 320Gb SATA Seagate Barracuda drives, one Leadtek GeForce 8800 GTX, and WinXP SP2.
I have the Intel "health monitor" installed and by default, no temperatures or any voltages are in the red. The log is clean as well. Could it be my PSU or the I/O controller running at such a high temperature that caused the restart?
Yes, it definitely does sound like a heat problem. When WinXP suddenly reboots, what probably actually happened is a bluescreen error, which by default causes XP to reboot (you can change that behaviour in System Properties -> Advanced -> Startup and Recovery Settings, though being able to read the bluescreen won't necessarily do you any good at all).
The temperatures you're reporting, if they're accurate - and they're probably not very inaccurate - are indeed high enough to cause a hard crash. Yes, it could easily be an overheating motherboard chip that's doing it, if there isn't much air flow over that bit of the board.
It's pretty likely that my usual diagnostic trick for these sorts of problems - take the side off the case and point a desk fan in there - will stop the reboots. If that is indeed the case, then just beefing up the case ventilation ought to be enough to cure the problem for good.
The lazy way of doing that is just leaving the side off the case, but many PC cases these days have one or more fan mount locations with no fan installed in them. Fill all of the fan mounts and you'll probably be OK.
(Neil got back to me; it turned out that "the immense size of the GTX8800 heat sink was covering almost half of the I/O controller's heat sink". He added an old Pentium II CPU fan to the I/O controller heat sink, its temperature dropped 25 degrees, and all was well!)
I have always wondered why CPU (and other) fans aren't powered by the heat from the CPU (or other chip). Considering how much energy they pump out per square centimetre, there must be some way to use it - fans don't use a lot!
I can see possibilities here, but I am not sure if there is a way to effectively harness this power in an efficient way.
If you model your CPU as just being a hundred-watt (say) heater, then yes, you could harvest quite a large slice of that hundred watts from it.
The limitation, though, is that the CPU has a ceiling temperature, 10 or 20°C below the boiling point of water. You have to keep it cooler than that temperature, or it stops working.
This creates a big problem. All heat engines work on the temperature differential between their hot side and their cool side, and a temperature differential of only about 70°C, at best, is not enough for better than miserable efficiency.
If you've got a 100 watt heater with a 90°C temperature limit, and 20° ambient air, you'll have a hard time harvesting more than a few watts from it. Realistically, one watt is likely to be the ceiling. And, of course, the apparatus needed to do that will be a lot more expensive and elaborate than a simple chunk of metal with a fan on it, so your generator won't have come anywhere close to paying for itself before it wears out.
I talked about this in more detail in this column.
(And yes, I do know about that hilarious MSI motherboard with the Stirling-engine northbridge fan. It works only because the northbridge has been given a far larger heat sink than it would need if it were cooled conventionally. A similar contraption could in theory be built for a CPU, but it'd probably end up being the size of a shoebox.)