Excessive Page Faults Generated By Windows Applications May Impact the Performance of Virtual Machines
search cancel

Excessive Page Faults Generated By Windows Applications May Impact the Performance of Virtual Machines

book

Article ID: 326235

calendar_today

Updated On: 10-23-2024

Products

VMware VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

An application within a Windows virtual machine experiences a large number of page faults during normal operation. 

Cause

Page faults are generated when an application tries to use memory that is part of its working set, but can't find it. Page faults can be either hard or soft:

  • Hard page faults occur when the page is found in the page file on the hard disk.
  • Soft page faults happen when the page is found somewhere else in memory.

Hard page faults involve disk I/O and impact performance. Soft page faults also impact performance, but may not result in heavy performance loss in a physical environment. VMware software does not cause the guest operating system running in the virtual machine to see additional page faults, but VMware software must virtualize the page faults that originate from within the virtual machine. Both soft and hard page faults in a virtual machine cause a context switch into the virtualization layer and some additional processing to virtualize memory management data structures. As on native hardware, hard page faults in a virtual machine also require disk I/O to the page file. For best performance, avoid page faults whenever possible.

Resolution

You can investigate if your Windows application is generating page faults by using the Performance Monitor console (perfmon), which shows you the cumulative number of page faults on the system. Generally, if the rate of paging is slow, then the application is generating hard page faults. You can investigate the paging rate by monitoring the "page faults per second" counter. To invoke perfmon in the Windows guest:

  1. From the Start menu, click Run.
  2. Type perfmon in the text box.

When the Performance Monitor console appears:

  1. Click the + (add counter) button.
  2. In the Add Counters dialog box:
    1. Choose Memory from the Performance object drop-down list.
    2. If it is not already selected, click the Select counters from list radio button.
    3. Choose the Page Faults/sec counter from the list box.

The Performance Monitor console now graphs the number of page faults per second for the whole system. The Pages/sec counter is also useful for finding hard page fault issues because it shows the rate at which pages are read from or written to disk. You can also use perfmon to view per-process page faults. In the Add Counters dialog box:

  1. Choose Process from the Performance object drop-down list.
  2. If it is not already selected, click the Select counters from list radio button.
  3. Choose the Page Faults/sec counter from the list box.
  4. Under Select instances from list, choose the processes of interest from the list box.

If you have an application that generates a large number of page faults, a support request can be opened with Broadcom in addition to the OS and software vendor for assistance. Provide complete information about the application and the steps to reproduce the problem.