Tracking Windows XP's page file usage is important for optimizing a computer's page file size. You can find a lot of valuable information about the page file's behavior on the Performance tab of the Task Manager. However, the page file usage information reported there isn't as straightforward as it appears due to the fact that these statistics are actually a combination of data gathered from both virtual, as well as physical, memory. As such, it's a bit difficult to decipher what exactly is being reported by these graphs—even for a Windows expert.
Here's what you need to know to glean the information you need from the page file usage data.
In "Monitor Windows XP's page file with our Page File Data Logger tool," I present a WMI script that generates a page file usage history log.
When you launch Task Manager and access the Performance tab, you'll immediately see the PF Usage and the Page File Usage History graphs, as shown in Figure A. When you take a quick glance at these graphs, it's easy to focus in on the PF Usage graph and think that what you're looking at is a report of how big the page file is at that exact moment.
|The Performance tab displays two graphs that pertain to the page file.|
For instance, after looking at Figure A, you might think that the size of the page file is 243 MB. However, if you were to run the Page File Data Logger tool, you'd see that the actual size of the page file is much smaller. For example, after running the Page File Data Logger tool in interactive mode on the same test system, the resulting dialog box reports that the actual size of the page file is 32 MB, as shown in Figure B.
|The actual size of the page file is much smaller than what it appears to be in the PF Usage graph.|
So, the question becomes, what exactly does the Performance tab tell you about the page file? For the answer to that question, you have to look to the data presented in the panels below the PF Usage and the Page File Usage History graphs.
Deciphering the data
When you look at the bottom section of the Performance tab, you'll see four panels titled Totals, Physical Memory, Commit Charge, and Kernel Memory. Each of these panels contains information that is dynamically updated on a regular basis. Let's take a closer look at the information displayed in each of these panels and see how it relates to the page file.
Do the math
Keep in mind that the values expressed in the Physical Memory, Commit Charge, and Kernel Memory panels are in kilobytes. As such, dividing by 1024 reveals the megabyte value. As I describe the information in these panels, I'll use the megabyte values.
The information displayed in the Totals panel really doesn't directly reveal much about the page file. Nonetheless, it's worth closer inspection because it does allow you to see how much data the operating system and CPU are managing at any one point in time, which ultimately affects the page file size.
The Handles value represents the total number of resources that the operating system is working with at any one point in time. These resources can be anything in the operating system, such as a file, directory, event, process, registry key, as well as many other items. The example system is currently managing 7,231 different resources.
The Threads value represents the number of objects within the active processes that are currently executing program instructions. As you would imagine, threads are what allow concurrent operations within a single process.
The Processes value, of course, represents the number of currently running processes. You can see each of the currently running processes by selecting the Processes tab.
In the Physical Memory panel, you'll find statistics concerning the usage of physical memory in the computer.
What you see: The Total value represents the total amount of physical memory installed in the computer. As you can see, the example system contains 511 MB of physical memory.
The Available value represents the amount of physical memory that the operating system is currently making available to running programs before it begins using the page file for virtual memory. In this example, XP is making 208 MB of physical memory available to running programs before it begins using virtual memory.
The System Cache value indicates how much physical memory XP has reserved for keeping track of recently accessed files, including both programs and data. At this point, there is 316 MB reserved for the System Cache.
The analysis: As you can see, XP doesn't make all of the physical memory available to running applications before it turns to the page file. Instead it holds back a good-size chunk of physical memory, 304 MB in this case, for other operating system related tasks. This fact alone reveals why adding more RAM to a system is beneficial.
When looking at the size of the System Cache value, it's important to keep in mind that the operating system will always use as much of the available physical memory as it can for the System Cache, as this will definitely improve performance.
Now, in this particular case, if you add the values for the System Cache and the Available physical memory, it adds up to more physical memory than actually exists in the system. Keep in mind that these values represent the amount that is reserved and not actually in use. The operating system will continually adjust these values based on the computer's current load.
If more physical memory is needed, the operating system will swap out data related to running programs to the page file. If still more physical memory is needed, the operating system will adjust the size of the System Cache by discarding the oldest data in the cache. Both of these operations will slow the overall performance of the system
In the Commit Charge panel, you'll find statistics on the combination of physical memory and the page file. The data reported in the Commit Charge panel reveals the most information about the page file usage.
What you see: The Total value represents a combined total of the available physical memory and virtual memory that is currently being used by the operating system and running programs. In this case, that value is 243 MB.
The Limit value represents the maximum combined total of available physical memory and virtual memory. In this case, that value is 1,247 MB.
The Peak value represents the highest combined total of physical memory and virtual memory that has been used since boot up. In this case, that value is 264 MB.
The analysis: To begin with, you'll notice that the Total value of the Commit Charge is the same value that's indicated in the PF Usage graph. You can see that the graph's new label is a bit of a misnomer, since it actually shows Total value of the Commit Charge. (In Windows NT and Windows 2000, this graph was labeled MEM Usage, which was more appropriate.)
You'll also notice the Total value is listed in the status bar over top of the Limit value. This provides you with a quick analysis of how much of the total amount of combined memory is being used at any one point in time. At this particular point in time, 243 MB out of 1,247 MB is being used.
Because the Limit value represents total amount of available physical memory and the total amount of virtual memory, it is essentially a fixed value. The only two ways to change this value are to install additional RAM or to increase the size of the page file.
Since you know that at this point the operating system is making 208 MB of physical memory available to running programs and that the Total is 243 MB, you can come up with a rough estimate of the actual size of the page file by subtracting the Total Commit Charge from the Available Physical Memory. In this case, you end up with 35 MB. Now, if you look back on Figure B, you'll see that the value reported there was 32 MB. However, keep in mind that since the operating system is constantly adjusting values as it manages the memory load, you can expect there to be some variance here.
If you suspect that your system is suffering a performance degradation and that it might be related to the page file, here are some things to keep an eye on:
- Watch the Peak value to see if it comes close to the Limit value.
- Compare the Commit Charge Total value to see if it comes close to or exceeds the Physical Memory Total value.
- Watch the Commit Charge Peak value to see if it comes close to or exceeds the Physical Memory Total value.
The first two situations indicate an excessive reliance on the page file. The third situation indicates that in addition to an excessive reliance on the page file, the System Cache is not being used. All of these situations are good signs that the system needs more RAM.
In the Kernel Memory panel, you'll find statistics on the memory used by the operating system kernel and device drivers.
What you see: The Total value represents the amount of physical memory that the operating system uses for core operations and for managing device drivers. In the example, that comes out to 58 MB.
The Paged value represents the amount of memory used by core components and device drivers that can be moved from physical memory to the page file if necessary. In this example, that comes out to 39 MB.
The Nonpaged value represents the amount of core components and device drivers that can never be moved from physical memory to the page file. In this example, that comes out to 19 MB.
The analysis: As you can see, more than 50 percent of the core operating system components and device drivers can be swapped out from physical memory to the page file if necessary. As you can imagine, moving such important portions of the operating system to the page file can yield a significant performance hit. This again indicates the advantage of adding more physical memory.
Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.