The way virtual memory, or the swap file, operates in Windows 2000 is often misunderstood. Many administrators believe that setting the swap file larger will automatically translate to better performance, since this provides more memory for the system. The truth is more complicated; bigger is not always better.

The Windows 2000 swap file is used for two things: swapping out pages of memory to disk as needed, and temporarily dumping kernels when a crash is logged. (If you have no swap file set up on your boot drive, you may not be able to get a kernel dump when a crash happens.) Memory swapping, which includes paging out the kernel, takes place less on machines that have more physical memory, if only because there is less demand for it. A machine with 128 MB of physical RAM will swap a lot more often than a machine with 512 MB of RAM, simply because a 512-MB machine is able to accommodate more in memory at the same time. This may sound elementary, but many administrators believe that the minimum size of the swap file should be anywhere from the size of the physical memory to as much as two and a half times as large. While this is not flat-out wrong, it may be overkill, and some real-world numbers may illustrate what's needed more clearly.

If you want to verify the amount of swap file usage for yourself during system activity, which can help put to rest any illusions about how big the swap file really needs to be, you can do this fairly easily. Open the Performance Monitor

Requires Free Membership to View

snap-in and add a counter for Pagefile Usage, with intervals of 20 seconds to one minute, and then begin running a set of tasks that reflect the server's normal usage load. From this you can observe the total percentage of the swap file's use.

If you have a lot of space allocated to the swap file (meaning more than the recommended allocation), but your usage does not reflect a sizeable percentage of the existing swap file space, cut it back to the system-recommended minimum if you haven't already. This not only saves disk space, but uses less resources required to maintain a bigger swap file.

Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter. Check out his Windows 2000 blog for his latest advice and musings on the world of Windows network administrators -- please share your thoughts as well!

This was first published in April 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.