General discussion


How to Optimise the swapfile..

This is a Question and answer for anybody who is interested in getting more performance from their systems. Please feed back on any issues you have with it.

Physical Ram is a relatively limited resource and when it's running low Windows uses the slower hard disk as a virtual memory area called the swapfile. It's set to change size dynamically, which can lead to fragmentation and slowdown. In addition, it normally resides on the system drive, leading to competition for access between the swapfile and system files. To optimize virtual memory in XP, right click on ?My computer > Properties.? Click on the Advanced tab, then the Settings button in the Performance frame. Once the Performance Options window opens, click the Advanced tab and then the Change button under the Virtual Memory area. If you are not moving the swapfile to a new disk, just click on the entry for your system disk, check the Custom size radio button and enter the same number in both the ?Initial Size? and ?Maximum Size? fields. The general rule of thumb is to make the swapfile 1.5 times your physical memory size. You get better performance by moving the whole swapfile to a different physical disk: set the ?C? drive to No Paging File, hit the Set button, click on the drive letter you want to move the file to and follow the same steps. The process is much the same for Vista.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

I agree with most of that.... however...

by CaptBilly1Eye In reply to How to Optimise the swapf ...

It's true the recommendations for setting the Paging File size haven't changed much in the past five or so years (static file equal to 1.5 to 3 X RAM). But, I have to think the need has been diminished with the low cost of RAM these days.

Additionally, if you move the Swapfile to a different physical drive, it may be a good idea to leave a smaller static one on the C drive (eg. 100MB).

Collapse -

May be..

But will it give you the speed you need?.
Anyway doing it this way is a plus and minus. If the computers hdd(s) go then so does the swapfile. Oh well such as life.

Please post back if you have more problems or questions.

Collapse -

It has not ever occurred to me to just move the swap file...

by boxfiddler Moderator In reply to How to Optimise the swapf ...

to a completely different physical location. Do you actually do this on your own systems and does this provide you any gain in performance? I do however maintain a swap file configured in the min/max manner you mention on both hard drives. I rarely, if ever of late, have memory and/or paging file issues. Whether this is due to dual paging files or not it is hard for me to say.

Collapse -

It can be useful

by Kjell_Andorsen In reply to It has not ever occurred ...

It can definitly be useful in some situations, but mostly for servers or systems which have a high rate of I/O activity on the main systems partition. On a typical desktop system you won't really notice that much of a difference.

Collapse -

Speed of the system is related to ...

The hardware, but for speed of access to and from programs (think of many open programs running at the same time) then this swapfile comes into play, a very speedy way of doing things indeed, even for desktops, well mine anyway. Everybody has their own way of doing things faster.

Please post back if you have more problems or questions.

Collapse -

Computer speed depends on lot of factors

by mikenyc08 In reply to Speed of the system is re ...

I think computer speed depends on started programs and memory, I've used myquickpc.com tool and it looks like fixed slooow issue.


Collapse -

My method for 2 HDDs was ...

by OldER Mycroft In reply to How to Optimise the swapf ...

Hopefully having a blank canvas in terms of the second HD create a partition of 3 times the total RAM then within that partition create a pagefile that is 1.5 times total RAM.

This allows for expansion of the pagefile should the total RAM increase.

The theory is that the 'dedicated' partition reduces the seek time to find the pagefile. There is nothing else inside the partition.

It also allows for reformat of the partition instead of defrag of the pagefile.

I don't use the term 'Swapfile' - that tends to refer to a RAMDISK - a whole other can of worms (pun intended). Harking back to my Amiga 4000 days.


Related Discussions

Related Forums