Torture test your CPU with Prime95
Installation And Running Tests
Prime95 is a program which searches for very large prime numbers. It has also gained a reputation for getting errors on computers which are even slightly unstable. If there is any problem with your CPU, your RAM, or the parts of your motherboard which are the interface between your CPU and RAM, then Prime95 has a tendency to fail. This is a very useful characteristic if your computer is flakey and you're not sure which component is causing the problem. If your computer can run Prime95 for 24 hours without any errors, then you can usually assume that your CPU and the parts of the motherboard which interface with the CPU and RAM, are stable and working well. The program is free and you can download it from here.
Prime95 is a distributed program which spreads the work among large numbers of computers. When you run it for the first time, click the "Just Stress Testing" button when asked. But if you would like to contribute some spare CPU cycles to help find prime numbers, by all means press the "Join GIMPS" button.
To test your computer, run Prime95 and click the "Options" menu and then select "Torture Test".
Then select a test and click "OK". In this case it's "In-place large FFTs" which is the best test to run for single core CPUs. Run the test for a few hours. If you want to be thorough then let it run for 24 hours. To stop the test, click the "Test" menu and then click "Stop".
The example above shows a successful run. Prime95 checks its calculations against known results so if something goes wrong it will stop automatically. It's also been known on occasion to crash unstable machines.
If it crashes or finishes with an error as shown above, then you've got a hardware problem to deal with.
Kinds Of Torture Tests
The torture test window presents you with three ready-made tests and an option to create a custom test. So the obvious question is: which test should you run? The answer depends on what you're trying to do. First let's look at the kinds of tests which are available.
In case you're interested, "FFT" stands for fast fourier transform. It's used in Prime95 to quickly calculate the square of very large numbers.
The "Custom" test allows you to create your own test. The "Min FFT size (in K)" and "Max FFT size (in K)" allow you to pick the minimum and maximum size of the FFTs done in the test. The sizes you select are not the amount of memory used by the tests. The size value times 1024 is actually the number of points used in the FFT. Prime95 is not actually capable of doing FFTs of any arbitrary size. It can do only sizes in the following list: 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, and 4096. When testing, Prime95 cycles through the sizes in the list which fall within the min to max range which you've entered. Prime95 (version 23.8.1 and maybe others) has a bug which causes the program to hang if you enter a range which doesn't include any sizes from the list. Make sure that a custom range always includes at least one size from the list.
The "Time to run each FFT size (in minutes)" value controls how much time Prime95 spends running FFT tests of a given size. Once it has tested one size for that long, it moves on to the next size. It cycles continuously through the sizes within the min to max range until it gets an error or you stop the test.
If the "Run FFTs in-place" box is checked, then the results of the FFTs are stored over the FFT points. That basically means that it uses the same RAM area over and over and only uses enough to do the calculations. If the box is unchecked then Prime95 cycles through RAM as it runs through the tests and the total amount of RAM used is the value in "Memory to use (in MB)".
The "Small FFTs" test uses relatively small FFTs which can fit into the CPU cache. As a result, the small FFT test is the one which accesses your main memory the least but it still makes some memory accesses. Prime95 automatically creates a FFT size range which will fit into the L2 cache of your CPU.
The "In-place large FFTs" test uses relatively large FFTs which cannot fit into the CPU cache so this test accesses main memory a lot. It only accesses a relatively small amount of main memory because it runs the FFTs in-place so it accesses the same RAM over and over.
The "Blend" test uses FFTs with sizes which range from very small to very large. The FFTs are not run in-place so the tests cycle through RAM. The blend test automatically picks a "Memory to use" value which uses up all the RAM in the computer. This is the version of the test which is most likely to fail if you have bad RAM. Note that on some computers running some versions of Prime95, the blend test allocates more memory than can fit into the physical RAM in the computer. When that happens, Windows has to use virtual memory and the test ends up accessing the hard disk a lot. That ruins the test because the CPU isn't doing anything while it is waiting for the hard disk to access the data whereas the test is really supposed to be keeping the CPU busy at all times in order to stress it. You can tell that the test isn't working properly if the hard disk activity light is on most of the time. When the blend test is running properly, the hard disk is only accessed occasionally. If you're running Windows 2000 or Windows XP then you can also check whether the CPU is fully utilized in the task manager. If the blend test has allocated too much memory then stop the test and bring up the "Run a Torture Test" window and make sure "Blend" is selected. Then select "Custom", reduce the value in "Memory to use (in MB)" to a somewhat smaller value, and then run the test again. Continue until you find a small enough value which works properly.
Which Torture Test Should You Run?
Prime95 can stress test three parts of your computer: the CPU, the motherboard RAM, and the CPU/RAM interface. On an Athlon 64, the motherboard RAM is connected directly to the CPU. So with an Athlon 64, the CPU/RAM interface is a memory controller built into the CPU. On most other CPUs, the RAM is connected to a northbridge chip on the motherboard which is connected to the CPU through the front side bus. So on those CPUs, the CPU/RAM interface is the front side bus. All kinds of Prime95 torture tests stress the CPU. Both the in-place large FFTs test and the blend test also test the CPU/RAM interface while the CPU is under stress. You shouldn't use Prime95 as a RAM test. It's just not as thorough as something like MemTest86. Real memory testers run carefully selected test patterns to maximize the chances of finding a problem and Prime95 doesn't do that. Prime95 is primarly used to find unstable CPUs and to test your CPU/RAM interface while the CPU is under stress.
The more work your CPU is doing, the hotter it gets. As a silicon chip gets hotter, it slows down. As a result, its maximum stable clock rate decreases as it gets hotter. That's why overclockers spend so much time trying to improve their cooling systems. Cooler is faster. Hotter is slower. A stable computer is one with components which are stable when the machine is under maximum stress. So your goal should be to use the most stressful tests in Prime95.
Test | CPU Temperature |
---|---|
idle (no test running) | 34.3C |
MemTest86 | 47.3C |
Prime95: small FFTs | 48.8C |
Prime95: in-place large FFTs | 49.5C |
Prime95: blend | 49.3C |
The tests above were run on a 3.2GHz Pentium 4. I don't have temperature tests on other CPUs but from what I've seen in posts on the internet, they also have the same relative relationships. The in-place large FFTs test is the hottest of the three ready-made tests just like it says in Prime95's "Run a Torture Test" window. And since it runs large FFTs, it's also doing a lot of memory accesses so it tests your CPU/RAM interface. It runs hotter than the small FFTs test because that test isn't accessing RAM very much so it's not heating up the CPU/RAM interface and that part of the CPU consumes quite a bit of power. The blend test tends to run a bit cooler than the in-place large FFTs test probably because the blend test is sitting and waiting for the memory accesses longer than the in-place large FFT test. So if you just want to run a single test, then run the in-place large FFT. It heats your CPU the most and it also tests your CPU/RAM interface when the CPU is at its hottest. It's not a thorough RAM test but then neither is the blend test and blend doesn't stress the CPU as much as in-place large FFT.
Also note that MemTest86 is not as good a test of your CPU/RAM interface as Prime95 because it doesn't heat the CPU as much. MemTest86 is still heating up the CPU quite a bit, but Prime95 gets it hotter because it's using the floating point units in the CPU very heavily. MemTest86 is better than Prime95 at finding bad RAM but it isn't as good as Prime95 at stressing the CPU/RAM interface. If you want to be thorough in testing the CPU, the RAM, and the CPU/RAM interface then you should really run both Prime95 and MemTest86.
Prime95 Instance #1 | Prime95 Instance #2 | Temperature |
---|---|---|
no test running | no test running | 34.4C |
Small FFTs | no test running | 48.7C |
In-place large FFTs | no test running | 49.5C |
Blend | no test running | 49.4C |
Small FFTs | Small FFTs | 50.6C |
Small FFTs | In-place large FFTs | 50.6C |
Small FFTs | Blend | 50.6C |
In-place large FFTs | In-place large FFTs | 50.4C |
In-place large FFTs | Blend | 50.5C |
Blend | Blend | 49.8C |
These tests were run a 3.2GHz Pentium 4 with hyperthreading enabled on Windows XP. It ran about one degree centrigrade hotter running two copies of Prime95 than when running only one copy. Using hyperthreading increases power consumption in the CPU. It also runs hotter because when one thread is waiting for the RAM to respond, the other thread wakes up and continues to do calculations within the CPU. Hyperthreading is very good at keeping everything in the CPU busy. All the dual instance tests seem to run at about the same temperature (at least within the limits of my low-budget thermocouple to measure) except for the tests where both are doing lots of memory accesses. So if you are running with hyperthreading enabled, the best overall choice is to run one instance of the small FFTs test and another instance of the in-place large FFTs test but you could also run a small FFTs along with a blend if have an urge to cycle through all of your RAM.
If you have a multi-CPU machine then you should run one instance of Prime95 for each CPU. If the cores share one memory controller then you'll probably get maximum stress by running the blend test on one CPU and running a small FFTs test on each of the other cores.
If you run Prime95 and then try to start another copy of Prime95, you only end up with one instance of the program running. In order to run two Prime95 tests at the same time, you need to invoke the program using the "A" command line switch. Make a shortcut to Prime95 and put it on your desktop. Then make a second shortcut to Prime95. You can create a second shortcut by doing a right-click drag and drop of the first shortcut onto the desktop and selecting "Create Shortcut Here". Then right-click the second shortcut, select "Properties", and then select the "Shortcut" tab. Then go to the "Target:" field and add "-A1" to the end. If you want to be able to run more instances then create another shortcut copy with "-A2" and so on. Each shortcut will open up a separate instance of Prime95 so you can run more than one test at a time.
You can check that all of your CPUs are fully loaded in the Windows Task Manager. The Performance tab has a handy CPU Usage History display for each CPU. They are displayed even if you're using hyperthreading rather than full CPU cores. Your goal is to get all of your CPUs running at 100%. If any are less than 100% then you're not doing the torture test at full strength. Running any other programs at the same time will reduce your processor load. It will reduce it even further if a program accesses a disk drive. It's best to run only Prime95 and no other programs if you want to maximize the load on your CPU.
When you run two or more instances of Prime95 on a multi-CPU machine, each instance doesn't really settle down and run only on one CPU. The instances jump around a little between CPUs. You can see that behaviour if you start up just one instance of Prime95. The CPU Usage History window in the Task Manager will show the program running on both CPUs. You don't end up with one CPU at 100% and the other CPUs at 0%. Prime95 contains a facility to force an instance of the program to run on only one CPU. Go to the main Prime95 window and click the Advanced menu and then select Affinity. Then you'll get the dialog window shown above. You can assign that instance of Prime95 to a particular CPU by unchecking the "Let program run on any CPU" box. Then enter the CPU number into the "Specific CPU to run on:" box. The CPU numbers start at 0 and count upwards. Just assign each instance of Prime95 to a separate CPU number and they'll stop jumping between CPUs. If Prime95 is already running then you have to stop it and then start it again before it will restrict itself to the CPU you've assigned. According to Prime95, you'll get better performance by assigning process affinities. That means that the CPUs should run a little hotter which is better for testing. I've tried an Athlon 64 X2 and a Pentium 4 with hyperthreading both with affinities and without them and I couldn't measure any temperature difference on either CPU. It may be that the Windows task switching overhead was a higher percentage of CPU time on older, slower CPUs so it used to make more of a difference. With both of my CPUs it didn't matter whether I used processor affinities or not. But if you feel the urge to get your CPUs running at exactly 100% then you can expend the few seconds it takes to set the processor affinities.
What Do You Do If The Test Fails?
If your machine passes Prime95, you can feel fairly confident that your machine is stable. But if it fails Prime95, it doesn't point straight to the component which is responsible. It's just not that easy to completely isolate the problem which causes Prime95 to fail. It's usually the CPU but sometimes it's something else. The only way to be 100% sure is to swap in replacement components until the problem is fixed. You just have to do as many tests as you can to make your best guess about which component is responsible before deciding which one to replace or adjust.
The vast majority of computers which fail the Prime95 test get the "FATAL ERROR: Rounding" case shown up above. Usually it happens quickly but it can take hours on some computers. But people's machines have also been known to occasionally crash or hang. When Prime95 fails in any way, the very first thing you should do is run a memory test to rule that possibility out. MemTest86 is a very thorough memory testing program (installation instructions here). If your memory passes the tests then you're pretty much down to the CPU and the CPU/RAM interface as the most likely causes although there are some other possibilities.
If you're running a CPU like the Athlon 64 which has its CPU/RAM interface integrated into the CPU, then if your RAM has passed tests you can pretty much blame your CPU. If you have the other kind of CPU which accesses its RAM by communicating with a northbridge chip on the motherboard, then your CPU is probably the problem but the northbridge could also be responsible. The RAM data is passed in both directions between the CPU and northbridge and if the northbridge is a little weak, it may have problems communicating with a hot CPU. If you're not sure what to blame then you can try running only the "small FFTs" test. It does very few RAM accesses while running the test. If it fails, then it's very likely to be the CPU which is at fault. Unfortunately, that's not 100% guaranteed because even the small FFTs test still accesses RAM and does other things like read and write disk files.
CPU overheating is a common cause of Prime95 failures. Prime95 pushes your CPU harder than almost all programs so it's entirely possible that it's much hotter when running Prime95 than any other program you run including games. It's worth opening up your machine and making sure that your CPU heatsink and fan are working properly. I've seen drops of 5 degrees centigrate in Prime95 just by cleaning the dust out of a CPU heatsink. Modern CPUs use lots of power and they can get very hot if anything is wrong with their cooling system. Most computers come with monitoring programs which can display the current voltages and various temperatures in your computer. If you don't have one then you may be able to find a program on the internet which is compatible with your motherboard. A free program which works with most hardware is SpeedFan. Motherboard Monitor is compatible with many older motherboards made in 2005 or earlier. You can use a monitoring program to check that your CPU temperature is reasonable. The temperatures reported by those programs are not all that accurate but it's still worth the trouble of comparing with other peoples' temperatures. You can find them by doing an internet search on the name of your CPU and "peak idle temperatures".
If you've built your own computer and know your way around your motherboard and its BIOS, then you have a few other options in dealing with a troublesome CPU. One of the things you can try is increasing the CPU voltage. That will often stabilize a CPU in Prime95. Unfortunately, it also heats up your CPU and can shorten its lifespan. In fact, if you overvolt your CPU too much, you can easily destroy it. You can also try reducing the speed of the CPU. Front side bus frequencies, CPU multipliers, memory ratios, and that sort of thing are beyond the scope of this page. But if you've been overclocking, you know what to do. Back off a bit on your overclock or (GASP!) underclock and see if that fixes your Prime95 problem. People also occasionally can solve a Prime95 problem by overvolting or slowing down their RAM. That's not very common if the machine can pass MemTest86 but it's been known to happen. If you're running out of ideas then give it a try.
One of the less common reasons that Prime95 fails is an overtaxed power supply. Most programs barely stress a modern CPU. Web browers, word processors, and even most games don't run the CPU at 100%. And when they do, it's intermittently. There just aren't that many programs which push the CPU to 100% utilization and keep it there for long periods. When you do that, the power supply heats up. When some power supplies are pushed too hard, their voltages droop. That usually causes the computer to crash or hang although occasionally it can just cause errors. With any CPU made in the last few years, the CPU power comes from the 12 volt rail of your power supply. If you have a fairly powerful video card made in the last few years, then it also draws most of its power from the 12 volt rail. A powerful video card draws much more power in 3D mode (most games) than when in 2D mode (web browsers and word processors). If your computer can run 3D games on a high-end video card without crashing then you probably don't have a power supply problem with the 12 volt rail and it is unlikely to be causing problems for Prime95. But if you just run plain old non-3D Windows programs or have a very low-end video system, then your 12 volt rail may be under maximum stress when running Prime95. In that case, you can probably check the 12 volt rail of your power supply with a motherboard monitoring program. If you see the 12 volt rail drop when you start Prime95, then that's not a good sign. According to specifications, the 12 volt rail should always be 12 volts plus or minus five percent which means from 11.4 to 12.6 volts. But you really don't want to be on the extremes of that range. Even if the 12 volt rail droops, the power supply is not necessarily responsible for your problems. It's just a possibility and there's no easy way to be sure without replacing it. Weak power supplies are rarely responsible for Prime95 problems, but it happens often enough that you should consider it if you have exhausted all the other possibilities.