Navigation


Follow me:

Facebook Twitter

Surf safer for free

Content

Tip: keyboard shortcut Ctrl+F searches in the page contents

Set paging file to a fixed size in Windows

Author: . Last modified: 2012-07-17 22:09:55 EEST

In this tutorial: How to set paging file to a fixed size to avoid its fragmentation in Windows XP, Vista, 7 and 8

There are several essential system files in Windows that are read from and written to very often - system paging file, different Event logs and Security Accounts Manager (SAM) database. By far the most used file of them is system paging file that extends computer's Random Access Memory (RAM). If these files are badly fragmented, the overall performance of Windows gets a big bad hit.

Windows tries to grow paging file dynamically - if computer's RAM is full and running programs still require more memory space, this information gets written to the paging file (aka Pagefile or Virtual Memory) on hard disk. It might seem a very good idea to keep the paging file size at its optimum (or just as much as needed), but in real life the growing and shrinking paging file gets fragmented quickly and starts decreasing overall performance.

To prevent that from happening, set paging file to a fixed size. But please remember, if you upgrade memory (add more) later, you must also reconfigure paging file size accordingly - otherwise you'll get random "your computer is low on memory" errors while running multiple programs at once.

File fragmentation is a big issue on traditional hard drives (SSD-s do not count) that usually does not get much attention. File fragmentation occurs when a hard disk partition contains tens of thousands of files (like it always does) and a file gets updated but there is no room right after it to keep the file written sequentially. So the updated part gets written elsewhere on the hard disk, sometimes in one part, sometimes to several different places on the hard disk. This means that the next time Windows wants to read from or write to the file, the hard disk controller must access several places all over the disk to read or write information - meaning that the file's access time gets higher and you must wait longer for an operation to complete. For one file this might mean only a few milliseconds, but if your hard drive is nearly full and fragmentation level is high, this turns easily into tens and tens of seconds of waiting.

How to configure paging file in Windows

Open System Properties or System Information using keyboard shortcut Windows Key+Pause/Break. Alternatively, right-click Computer icon on Desktop or Start menu and click Properties.
Windows Vista, Desktop. To open Basic System Information, right-click Computer and select Properties.

In Windows XP, System Properties window opens right away. In Windows Vista, 7 and 8, click Advanced system settings on the left.
Windows Vista, Control Panel. To open System Properties, click Advanced system settings.

Open Advanced tab in System Properties window. Click Settings in the Performance section.
Windows 7, System Properties, Advanced tab. In Performance section, click Settings.

Performace Options window opens. Open Advanced tab and click Change in Virtual memory section.
Windows XP, Performance Options, Advanced tab. In Virtual memory section, click Change.

In Virtual Memory window, find the last section, Total paging file size for all drives, and see what's written in the Recommended row. Add about 200 megabytes to this value to get a good paging file size.
In Windows Vista, 7 and 8, clear the Automatically manage paging file size for all drives check box. Windows XP does not have this option.
Next, click to select your system drive (the drive where Windows is installed, most probably C:) in the list of available hard drives. Click Custom size and type the calculated value (Recommended + 200 MB) into Initial size (MB) and Maximum size (MB) fields. Verify you have sufficient amount of free space on the selected drive by looking up the value in Space available row.
Click Set.
Windows XP, Virtual Memory. Click Custom Size. Type equal values into "Initial size" and "Maximum size" fields. Click Set.

In case you have multiple physical hard drives (not partitions or volumes!) in your PC, you can enhance performance even more by putting a larger part of paging file to the secondary drive. Leave about 100-300 megabytes of paging file on system drive and put the rest on the other drive (select the secondary drive in the list, click Custom size, specify values and click Set).

Click OK in the Virtual Memory window to accept changes.
In most cases, a notification stating "The changes you have made require you to restart your computer before they can take effect" appears. Click OK - your PC will not restart yet!
Windows 8, System Properties, The changes you have made require you to restart your computer. Click OK.

Close Performance Options and System Properties windows and restart your computer.

Let me remind you again - please resize paging file if you add more RAM to your computer later. You can verify that virtual memory size is sufficient by looking for Event ID 49 ("Configuring the Page file for crash dump failed. Make sure there is a page file on the boot partition and that is large enough to contain all physical memory") in System Log of Event Viewer.

To defragment Windows paging file, install Defraggler and use boot time defrag.



 Comments? Suggestions? Ideas? Let me know! 
Your name (public):
Your e-mail (will not be displayed):
Title:
Notify me of new comments to this page: (send e-mail to info[at]winhelp.us to stop receiving)
Your comments/suggestions/ideas (no HTML code!)
winhelp.us owners reserve the right to remove or not publish comments that they find unacceptable because of strong language, inappropriate contents, advertising or spamming.
winhelp.us Privacy Policy.
This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

PluginCheck Print this page Search Donate