Microsoft

Monitor Windows 98/Me's page file usage with System Monitor

Learn to use the System Monitor utility to track page file usage


In the article "Monitor Windows XP's page file with our Page File Data Logger tool," I showed you how to use my WMI-based Page File Data Logger tool to keep track of the page file usage in Windows XP. However, the Page File Data Logger tool won't work correctly in Windows 98/Me. Fortunately, Windows 98/Me comes with a utility called System Monitor, which you can use to keep track of the page file usage.

Installing System Monitor
Although Setup doesn't install System Monitor when you perform a regular Windows installation procedure, you can easily install it. To begin, insert the Windows 98/Me CD into the drive, wait for the CD menu, and then select Add/Remove Programs. Click the Windows Setup tab, double-click on Accessories in the Components list box, and scroll down through the list until you see the System Monitor icon. Select the check box and click OK to close the Accessories dialog box, then close the Add/Remove Programs dialog box. Windows will then install System Monitor.

Launching System Monitor
As soon as you install System Monitor, it's ready for use—you don't have to restart Windows first. To launch System Monitor, select Start | Programs | Accessories | System Tools | System Monitor. When you start the utility for the first time, you'll see that, by default, the System Monitor window is set up to monitor the Kernel: Processor Usage, as shown in Figure A.

Figure A
By default, System Monitor is configured to monitor the Kernel: Processor Usage.


Configuring System Monitor to track your page file usage
To configure and use System Monitor to track your page file usage, you'll first want to remove the Kernel: Processor Usage chart from the window, since it doesn't really apply. Pull down the Edit menu and select the Remove Item command. In the Remove Item dialog box, select Kernel: Processor Usage, as shown in Figure B, and click OK.

Figure B
Start by removing Kernel: Processor Usage from System Monitor's display.


Now, you can begin adding the items, or more precisely, the metrics, that are designed to help you monitor the page file usage. First, pull down the Edit menu and select the Add Item command. When you see the Add Item dialog box, select Memory Manager in the Category column. System Monitor will display all the metrics in the Item list box that are associated with Windows' Memory Manager, as shown in Figure C.

Figure C
System Monitor provides a comprehensive list of metrics you can use to keep tabs on the memory in your system.


As you can see, quite a few metrics are associated with Windows' Memory Manager. However, there are only three metrics you really need to use to monitor your system's page file usage: Swapfile Size, Swapfile In Use, and Unused Physical Memory. Swapfile Size will show you the exact size of the page file in bytes. Swapfile In Use will show you how much of the total page file is in use. And Unused Physical Memory will show you how much of your RAM is currently available.

In a moment, I'll explain how to use this combination of items to monitor your system's page file usage. For now, let's focus on adding these items to the System Monitor window.

Page file vs. swap file
Before I move on, you may be wondering why System Monitor refers to the swap file, while I call it a page file. Of course, they're the same thing.
This memory management system is designed to virtually extend the amount of physical memory in the computer, thus allowing the operating system to run more applications than it actually has enough physical memory to handle. To achieve this, the operating system moves data back and forth between physical memory and the hard disk. The process of moving data is loosely called swapping, hence the term swap file. However, Windows moves data in exact-size blocks, called pages, hence the term page file.


Although you can add all three items at the same time by holding down the [Ctrl] key as you select them, I prefer to add them one at a time. The reason for this seemingly ridiculous procedure is that when you add all three at the same time, System Monitor lists them in alphabetical order. When you add each one individually, you can specify the order in which they appear in the window. This will allow you to organize the graphs presented in the System Monitor window in a manner that makes sense when you're monitoring the page file, as I'll show you in a moment.

With that in mind, add the items in the following order:
  • Swapfile Size
  • Unused Physical Memory
  • Swapfile In Use

Simply select the Swapfile Size item and click OK. Then, open the Add Item dialog box and add the second item. Repeat the process to add the third item.

Choosing the update interval
Once you add the three items to the System Monitor window, you'll need to specify a time interval for System Monitor to check the current values of the items. Pull down the Options menu and select the Chart command to open the dialog box shown in Figure D.

Figure D
You use this slider to set the update interval that System Monitor will use as it gathers data on the page file.


Now, just drag the slider to set the update interval to a value that represents how often you want System Monitor to check the page file usage. As you can see, the slider ranges from Faster to Slower, which is anywhere from 500 milliseconds (ms) to one hour, respectively. I recommend that you set the update interval value to one minute; then click OK to close the Options dialog box.

Reconfiguring the window
As I mentioned earlier, adding the three items individually allows you to organize the graphs so that it's easy to interpret the data at a glance. You can also improve readability by reconfiguring and resizing the System Monitor window.

First, change these settings on the View menu:
  • Select the Numeric Charts setting to enable it.
  • Select the Toolbar setting to disable it.
  • Select the Status Bar setting to disable it.
  • Select the Always On Top setting to enable it.
  • Select the Hide Title Bar setting to enable it.

Now resize the System Monitor window so that you can still see the text labels, as shown in Figure E. When you get used to using the custom System Monitor configuration, you may no longer need the text labels, so you can resize the window even smaller, as shown in Figure F.

Figure E
Resizing the System Monitor window so that it shows the text labels makes it easy to tell at a glance what you're seeing.


Figure F
Once you get used to using the custom System Monitor configuration, you may no longer need the text labels.


After you reconfigure and resize the System Monitor window, go ahead and close it down. System Monitor will record the changes you've made to its window and use them as the defaults.

Setting up automatic monitoring
To use System Monitor effectively, you should place its shortcut in your Startup folder so that it automatically launches each time you turn on your system. That way, you'll be able to keep an eye on your system's page file usage without having to remember to manually launch System Monitor.

To begin, select Settings | Task Bar & Start Menu from the Start menu. In the Taskbar Properties sheet, click on the Start Menu Programs tab and click the Advanced button. Now, open the Programs\Accessories\System Tools folder and copy the System Monitor shortcut into the Programs\StartUp folder.

Monitoring the page file
When you're ready to put System Monitor to work, you must restart your system to reset the page file so you can monitor it from scratch. As soon as your system restarts, System Monitor will launch and appear as you configured it. Position the window on your desktop in a location that will allow you to use your applications while monitoring the page file.

To get started, take note of the value in the Swapfile Size item. This will tell you how large your page file is when you first start your system. Also, note the Unused Physical Memory value, which tells you how much RAM is left over after starting your system.

Now, you can begin using your computer as usual. In other words, just load all the applications you normally use on a regular basis and go to work. As you load applications and documents, keep an eye on the Unused Physical Memory item and watch the value. You'll see it fluctuate as it shrinks and expands. As it does, you'll see activity in the Swapfile In Use item as Windows moves pages of memory from RAM to the page file to make room for other applications in RAM.

The other types of activity you'll see in System Monitor and how you'll interpret the values shown will depend on whether you're using a permanent page file or a dynamic page file. For example, if you're using a dynamic page file, chances are that you'll see the Swapfile Size value expand and contract when you load applications, and the operating system will try to anticipate the amount of space needed for the page file as it moves data back and forth between RAM and the page file. You may notice that Windows actually overcompensates by making the page file much larger than necessary—a typical behavior of the Windows 98/Me dynamic page file technology. A side effect of this behavior is an increase in system overhead, which can eat into performance. You might want to experiment with a permanent page file. (For more details on switching Windows 98/Me from a dynamic to a permanent page file, see "Rid your Windows 98/Me clients of the dynamic swap file.")

If you're using a permanent page file, and you've left the Maximum setting open to allow the page file to grow when necessary, you may see the Swapfile Size value grow. If, over time, you notice that the Swapfile Size value quickly grows larger than the Minimum value on a regular basis, the initial value you chose for the Minimum setting may be insufficient. You'll want to increase the Minimum setting value to adjust for this. On the other hand, if the Swapfile In Use value never comes close to the Swapfile Size value, your Minimum setting may be too large, and you may want to decrease it. If you've specified a Maximum value, and you see the Swapfile In Use value regularly closing in on the Swapfile Size value, your Maximum value setting may be too small, and you may want to increase it.

Gathering page file usage data
Keeping visual tabs on your page file usage with System Monitor graphs is a great way to see what's happening at any one point in time. However, if you'd really like to analyze the data and look for trends, you'll want to enable System Monitor's Logging feature. Just pull down the File menu and select the Start Logging command. You'll be prompted to name and specify the location for the log file.

When you use the Logging feature, System Monitor will add data to the log file at whatever update interval setting you've selected. Since the log file uses a standard comma-separated values (CSV) format, you can easily import the log file into your favorite spreadsheet application and study the results.

Sufficient monitoring
Before you jump in and begin making changes based on what you've witnessed in System Monitor, you should monitor your system for an appropriate period of time to get an accurate reading of your system's page file usage. You may want to monitor a system for at least a day or up to a week before you make changes to the page file's settings. The period of time you choose will depend on how long it takes to give your system a full workout.

The important thing to keep in mind is that you want the page file to perform optimally for the way you use your system. So a full workout would mean that you use all the applications you regularly run at the same time in whatever combination you normally use them. Doing so will provide you with an accurate read on your system's page file usage.

About Greg Shultz

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.

Editor's Picks

Free Newsletters, In your Inbox