What are Hard Faults per Second?

Article by Lamar Stonecypher (20,035 pts ) , published Nov 5, 2009

Are high CPU and hard drive utilization slowing your Windows PC to a crawl? You've started up "Resource Monitor" and are surprised at the number of "hard faults/sec" ticking by. Is this the bottleneck? What are hard faults per second anyway, and how many of them is too many?

Sluggish PC performance may have led you to start the Windows Resource Monitor from Task Manager or the Reliability and Performance Monitor from Administrative Tools in Control Panel. There, you observed a high utilization rate in both the CPU and the hard drive, and a section labeled "Memory" is showing dozens (or maybe) hundreds of hard faults per second. What are hard faults? Are they responsible for your PC's slow performance? How many of them are too many, and what can you do about it?

Hard Fault vs. Page Fault

First of all, a "hard fault" was previously called a "page fault" in earlier versions of Windows. Perhaps page faults were more easily understood from the name, too. A hard fault happens when the address in memory of part of a program is no longer in main memory, but has been instead swapped out to the paging file, making the system go looking for it on the hard disk. When this happens a lot, it causes slowdowns and increased hard disk activity. When it happens an awful lot, the possibility of hard disk thrashing arises. That's when a program stops responding, but the hard drive continues to run for an extended period. This has historically been referred to as "getting into the page file."

In this era of relatively large memory, with most PCs having a gigabyte of main memory or more, hard drive thrashing and the problem of getting into the page or swapping file has become rare. However, it's not impossible for a Vista computer with limited resources (too many programs running at a time) to be making a program read data continually to and from the hard disk. Each time this happens, it's a hard fault. A high number per second suggests that something is running very slowly.

Memory Management in Vista

Let's look more closely at how memory management in Vista works. When an application runs, it does not use all of its allocated memory at the same time. Some of the memory pages age. Some of them are modified before they are swapped. The memory manager keeps up with which were modified, which were just swapped because they are unused, and where they are in memory or in the swap file. The objective is to keep memory turning over in order to minimize (much slower) hard drive activity. Thus, using the swap file is just part of normal operations in Vista.

But what if performance really is lousy and the entire system is bogged down? Is it time to worry about too many hard faults? Maybe. A high number of hard faults, accompanied by high disk activity, suggests that one or more programs you're running would benefit from having more RAM installed. You could also try moving your swap file (pagefile.sys) to another internal hard drive (not to another partition on the same hard drive). This may provide a benefit in that Windows can access the page file more quickly if it is not fighting a program trying to continuously read data from the same hard drive.

Also make sure that your page file is large enough. A size a little larger than installed RAM works very well. (Too small a page file can definitely cause a lot of page faults.)

Next: Managing the Page File and More On the Name Change

Showing page 1 of 2
Sponsors
 
Camtasia: record, save, share!
Record onscreen activity, your voice, and webcam video. See how great your presentation videos can look with Camtasia screen recording software!
Subscribe to Windows
RSS
Get free weekly updates, directly to your inbox.
Browse Windows Platform