Home » Tips & Tricks, Troubleshooting

Improve System Performance – Tweak Your Pagefile

20 April 2008 3 Comments

This is not any new ground-breaking information, but when it was mentioned last week in the CAD Manager session at the SWUGN Summit in Nashville, there was quite a stir in the room and several follow-on questions about it.  I have also received a few calls and emails about this since, so I thought that I would write an article about it and maybe help a few others.

(Note that Matt over at SolidWorks Legion has recently published an article dealing with this same issue in his SolidWorks Performance Blitz! series while I was on travel and in the middle of writing this one.)

Windows uses a pagefile, which is just a temporary file that Windows writes information from memory into when it needs more room.  The performance issue is that by default, Windows manages the pagefile by growing or shrinking it as demand comes and goes.  After a while, the pagefile becomes fragmented as it grows due to other data being written on the adjacent tracks of the disk.

To keep the pagefile from becoming fragmented, you should set the pagefile initial and maximum sizes to the same values, so that the pagefile is in one contiguous space on the disk.  I have seen several different rules of thumb for what values to use, from 1.5X to 4X your system memory.  Personally, I use 2X, and that works fine for me, but YMMV.

You can follow the steps below to tweak your pagefile to your liking:

  1. Right-click on "My Computer" and choose "Properties".
  2. Go to the "Advanced" tab and click "Settings" under the "Performance" section.
  3. Go to the "Advanced" tab and click "Change" under the "Virtual memory "section.
  4. Select the radio button for "Custom size" and set both the Initial and Maximum sizes to the same value, as shown in the image below:

Pagefile01

Note that the sizes are in MB, so if you have say, 4GB system RAM, you would enter 8192 MB for 2X system memory (2 X (4 X 1024)).

Another item of note is that if you have 2 or more separate physical disks (ideally on different channels), you can also help increase performance by splitting your pagefile across them.  This enables you to write to each disk channel at once, increasing file-swapping speed.

If you have been running Windows with the "System managed size" option selected, chances are very good that your pagefile is fragmented.  When I perform this tweak on a system that has been up for a while, I will choose the option "No paging file", reboot, defrag, and then set the custom sizes as shown above.  If you have a large enough disk with empty space, this step is probably not needed, but it doesn’t hurt.

I hope this tip helps you tweak your system to improve your SolidWorks experience!

Post to Twitter Post to Facebook Post to LinkedIn Post to Delicious Post to Ping.fm Post to Digg Post to StumbleUpon Post to Technorati Post to Reddit Post to Slashdot


  • Larry Miller

    A static pagefile is not necessary to avoid fragmentation. By default Windows uses a semi-fixed pagefile approximately 1.5 times the size of physical memory. No resizing or fragmentation will occur unless this is exceeded. But the pagefile can still grow to meet unusual demands. After a reboot (or sooner) the pagefile will revert to it’s original non-fragmented size. If you have frequent memory warnings from Windows you should manually set a higher initial size for the pagefile. The upper limit should be at least twice this value.

    If the pagefile is fixed at too small a size you will either have out of memory errors or severe performance degradation. If it is larger than necessary you will be wasting considerable disk space and receive virtually nothing in return.

    The semi-fixed option has all the advantages of a fixed pagefile, yet can still grow to meet unusual demands.

    Larry Miller
    Microsoft MCSA

  • Larry Miller

    A static pagefile is not necessary to avoid fragmentation. By default Windows uses a semi-fixed pagefile approximately 1.5 times the size of physical memory. No resizing or fragmentation will occur unless this is exceeded. But the pagefile can still grow to meet unusual demands. After a reboot (or sooner) the pagefile will revert to it’s original non-fragmented size. If you have frequent memory warnings from Windows you should manually set a higher initial size for the pagefile. The upper limit should be at least twice this value.

    If the pagefile is fixed at too small a size you will either have out of memory errors or severe performance degradation. If it is larger than necessary you will be wasting considerable disk space and receive virtually nothing in return.

    The semi-fixed option has all the advantages of a fixed pagefile, yet can still grow to meet unusual demands.

    Larry Miller
    Microsoft MCSA

  • Rahul Sharma

    Thank you for this wonderful tip. I have got 2 GB RAM on my system. However, when I checked the pagefile size, I found it was 1524 MB, that is even less than 1 X of my RAM. I’ll first raise it 2048 MB and notice the change.

    Thank you once again.