The ultimate CPU test

Discussion in 'Site & Server Administration' started by alokslayer, Dec 19, 2007.

  1. #1
    The kernel compile test is a great way to test for CPU stability, but there's an even more extreme CPU test available that you might want to use. I saved this one for last, because if your CPU is grossly undercooled, this particular test could really overheat it and could theoretically cause permanent damage to your CPU. This test is intended for systems that pass the kernel compile test with no problem -- systems that you want to ensure can handle even the most challenging CPU loads with ease. If your CPU is properly cooled, it will pass this test, and if it doesn't pass, you need more cooling.

    To perform my "ultimate" CPU test, the first thing I do is head over to the lm_sensors page (see Resources) and download the lm_sensors package. This source tarball contains various kernel modules that interface with the health monitoring features that are built in to nearly all modern motherboards. Once this package is properly installed and the proper modules are loaded (use the prog/detect/sensors-detect script to figure out which ones), you'll see some new files and directories appear at /proc/sys/dev/sensors. These files contain handy information like the speed of your CPU fans, CPU and mainboard temperature readings, and motherboard voltage readings, all updated in real time. I recommend you configure this package to compile as modules and use the sensors-detect script to figure out what modules to load at boot time, since I've had better results with this configuration.

    Once you have the lm_sensors modules loaded, I recommend that you install a graphical CPU/sensors monitor, which will allow you to watch your CPU load and temperatures in real time without having to repeatedly cat files in /proc/sys/dev/sensors. For this purpose, I use a great little program called gkrellm (see Resources). Here's a snapshot of my gkrellm app, monitoring my CPU usage, motherboard temperature settings and a bunch of other things:


    Figure 1.1: gkrellm is up and running




    There are other graphical monitoring packages available that are compatible with lm_sensors; you'll find a bunch of them listed over at the lm_sensors home page, under the "links" section.

    The last preparatory step is to download the cpuburn program (see Resources). This handy little program uses hand-crafted combinations of machine instructions to put maximum stress on your particular CPU -- even a little bit more than a repetitive kernel compile. Included in the archive are various little programs customized to set P5- and P6-class processors, as well as a special version for the AMD K6. Once you've unpacked the cpuburn tarball, read the README file; it explains how to compile the included assembly source files. After you've done this, you'll have your own little cpuburn program.

    Now, for the test. I normally fire up my graphical sensors monitor, and then start the cpuburn program as root. Then, I watch the CPU temperature reading rise and stabilize, and then I leave cpuburn running for an hour or so. If you repeat these steps and your CPU temperature continues to rise to an unusually high temperature (160 degrees Farenheit or so would be considered "unusually high"), then your CPU cooling system needs major work. And, if your machine crashes or locks up, or the cpuburn process dies, your CPU cooling needs improvement -- or maybe your particular CPU simply isn't up to "spec". You can use the CPU temperature readings to make that judgment. But if all goes well, then your system should be able to tackle any challenge thrown at it. After an hour or so, you can go ahead and kill the cpuburn program and resume normal operations.
     
    alokslayer, Dec 19, 2007 IP