Jump to content

where to put swap file ?


grafx1

Recommended Posts


Theres various opinions, some say the middle of the harddisk, as less seek to and from (on average) other data on the drive. Others say the beginning of the drive. I've not done enough testing to say one way or another.

But what I have been doing is putting the swap on my 2nd drive's 1st partition, sized 2.0 gigs

I set the min/max to Ram x1.5/maxDiskspace

The benefit of its own partition, be it at the beginning of a drive, or the middle, is easily defragmenting the swap. Move the swap to another partition. Reboot. Delete the old file. Move it back. Reboot.

Swap is now defragged - in minutes. And your swap isn't getting mixed in with all the other files.

Of course I keep my "Data" on its own partition. Programs on their own. And windows on their own.

Now adays w/ NT5+ systems they don't even need to be annoying drive letters showing up in "My Computer" you can just Mount a Drive to a folder.

The benefits I have found is that fragmentation is much more infrequent. Defrag can be done periodically. And your system (Windows) drive almost never fragments after initial install/defrag.

Link to comment
Share on other sites

i'd read that it's useful to make min and max size of the swap file the same

but had i to put it on another partition (on the same drive) rather than Windows partition ?

thanks.

I'd recommend leaving the pagefile on the Windows partition if you've only got one drive.

If you think about the situation for a second, you'll see what I mean. Lets say you set it up as Crash&Burn suggested. Then, the read/write head of the hard drive has to seek farther each time that you want to access the pagefile, since it is physically located farther away on the disk. Since most access to the page file is done when you open large programs, it means that the read/write head has to move back and forth between the pagefile and the files you need to access to open the program.

As for the size, set it to Automatic and do the following test. Open CacheMan and go to the "Info/Overview" page. Run every single "large" application that you can think of that you'd run at any one time. Exit all the applications and have a look at your Highest Pagefile usage. Set your pagefile to max=min=1.5*MaxValue.

My rule of thumb - If you've got 1 drive, put the pagefile on the system partition. If you've got two drives, put one on the system drive and one on the first partition of the second drive (set the drives to work on separate IDE channels).

Link to comment
Share on other sites

I didn't recommend the "middle", But I have read a lot about swap, and just stated there are varied opinions ;) And I listed what I do, which is the first partition on the second drive.

Also its doubtful if the 2nd swap done your way will ever even get used.

I suggested 1.5x ram, as when I let windows handle it, it sets my SWAP to 1.5 gigs.

SWAP in NT5 tends to be very different from win98, as far as size and usage goes.

Link to comment
Share on other sites

Zxian has a point...

Putting the swap in the middle of the disk (and/or it's own partition) will lead to reduced performance. Since the OS on C:\ tends to put a lot of critical and frequently used files at the beginning, every time swap space is used, the disk will have to access the middle, and then get back to the active partition. If swap is on C:\, the distance is much shorter which ='s less access time.

There have been posted benchmarks for I/O performance and guides for swap, but the general view is that the system really does know what it is doing when it comes to swap. Just let it govern itself. Setting the size too large can set you up for swap fragmentation, setting it too small will lead to out of memory' and heavy I/O activity on disk

Since the swap size needed is based on your activities on the PC, someone who plays games, uses graphic programs, sound/video editing will never have a set swap size that will be perfect as the swap shrinks and grows depending on your use.

If you have 2 disks, setting a smaller swap on C:\ and then let windows determine swap size on the other disk seems to show good performance for multi tasking. Performance-wise the boost is marginal, while a incorrectly configured swap can lead to a serious performance hit.

Windows will always want some swap space on the active partition, so it is best always leave something for it. Never move it entirely.

What has shown good performance, is setting a small swap on C:\ and then put more swap on a RAM disk. The draw back is you need to get more ram for your system and resist the urge to set the RAM disk size too high.

Also, with a RAM based swap, privacy concerns are minimized since it will clear itself upon shutdown.

FYI - Programs like Photoshop would benefit more if you make a Ram disk and instead of letting windows use it for swap, you tell the program in it's options to use the RAM disk as it's temp space

Link to comment
Share on other sites

Yes and its always good to let windows do what it WANTS, because Windows knows best, especially in management of the Registry, Uninstalls, Default Windows installs, hotfixes.

We wouldn't ever want to not let windows do exactly what it WANTS.

Link to comment
Share on other sites

I usually dont bothe much with the swap file. My idea is this as long as you have a lot of memory you are not going to cause the hdd to thrash. So why worry about swapage? Most of the time with a lot of mem you wont access the hdd but in the off chance you do, since Windows itself is managing the page file it should be optimal by default. thats how I see it.

Link to comment
Share on other sites

ok here i found from windows help:

" You can optimize virtual memory use by dividing the space between multiple drives and removing it from slower or heavily accessed drives. To best optimize your virtual memory space, divide it among as many physical hard drives as possible. When selecting drives, keep the following guidelines in mind:

Try to avoid having a pagefile on the same drive as the system files.

Avoid putting a pagefile on a fault-tolerant drive, such as a mirrored volume or a RAID-5 volume. Pagefiles don't need fault-tolerance, and some fault-tolerant systems suffer from slow data writes because they write data to multiple locations.

Don't place multiple pagefiles on different partitions on the same physical disk drive. "

but about the size of it i remember my teacher used to say that its prefered to use half memory size as minimum and 1.5 memory size for maximum.

Link to comment
Share on other sites

Well that IS pretty much what I said, the second drive ~1.5x memory, and not w/ system files. But thankfully some ppl have sense here *grin*

My secondary drive is basically stored multimedia, program downloads & backups. Program files and regular data (users) are on partitions of the first drive.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...