3

I have Windows Vista Business Edition running on my laptop (brand is HCL). I have 4 HDD which are as follows -

C - 29.2 GB (of which only 3.68 GB is free) D - 39 GB (of which 37.8 GB is free) E - 39 GB (of which 37.3 GB is free) F - 41.6 (of which 41.4 GB is free)

However, my page file settings are as below.

Automatically manage paging file for all drives.

Question -

Why should I set one for each drive? Should I set my page file on the OS Root Drive. I happen to talk to a System Administrator in an IT company and he advised that we should never set the page file on the OS drive but on an alternate drive wherever possible.

It would be really helpful, if you can guide me here or at least point me to the right resources so that I can read about paging and best practices of paging.

Cheers,

7 Answers 7

6

Multiple page files are processed paralelly to split IO operations, which noticeably increases the performance.

In our disk queue and total time tests we have recorded up to 3 times better performance using 4 pagefiles on 4 sata HDDs on heavy usage on Windows 7 with 2Gb RAM.

Here is a simple article on the subject:
Learn Best Practices for Optimizing the Virtual Memory Configuration

4

From Mark's post on Pushing the Limits of Windows: Virtual Memory

You’ll notice that the default configuration is for Windows to automatically manage the page file size.

When that option is set on Windows XP and Server 2003, Windows creates a single paging file that’s minimum size is 1.5 times RAM if RAM is less than 1GB, and RAM if it's greater than 1GB, and that has a maximum size that's three times RAM.

On Windows Vista and Server 2008, the minimum is intended to be large enough to hold a kernel-memory crash dump and is RAM plus 300MB or 1GB, whichever is larger. The maximum is either three times the size of RAM or 4GB, whichever is larger. That explains why the peak commit on my 8GB 64-bit system that’s visible in one of the screenshots is 32GB.

From what I remember,

  • the defaults place a single Page file in the boot partition.
  • And, it is counterproductive to have multiple page files.
  • But, it is useful to have the Page file in a different drive
    (not just different partition) from the boot drive.
3

No matter what the initial reason for implementing the pagefile system was, pagefiles are still used, even heavily used by Windows today as nowadays available software has developed as well, not only available RAM, and are much more demanding today than they were back in the days when there's much less RAM available.

Especially on gaming PCs there are programs running which need a lots of your installed RAM to perform properly, but also video post processings, packing/unpacking, streaming and such processes ... at worst all at once, require a place for Windows to swap data which are not urgently needed at the moment but will be needed later again. And that's what the pagefile is for.

Always let Windows manage this file/those files, unless you're absolutely sure what you're doing and know how large it should be (btw, Windows already recommends how large it should be). To prevent unnecessary fragmentation and HDD activity you can set a fixed size by setting the same value for min and max size. This way it won't be shrinked and then increased again depending on the workload. But to set the correct sizes you have to have a proper understanding of what Windows is doing with it and when.

The old 1.5 times your RAM rule still seems to hold true, as this is always Windows' own recommended pagefile size. So, for a 16 GB RAM machine it would be something about 24 GB pagefile size (recommended).

I don't know if it is useful or maybe even bad to have several pagefiles, I for one have a fixed size of 2 GB min/max on my boot drive (HDD) for partition C and a managed one on an SSD. But I was searching for pros and/or cons to have more than one pagefile or not, as I tend to delete the 2 GB on my boot partition. Alas, haven't found any valuable arguments yet, but I assume, just for the crash dump files and stuff, it's useful to allocate some GB for Windows' where the pagefile resides normally by default. Hence I leave it like that. But for the other SSDs where my games are installed I do not have any pagefile. Wouldn't even know which size they should have to make a difference, whereas I also don't want Windows to occupy another up to 24 GB on each SSD (or at least 16+ GB as it uses now for the managed pagefile).

1

You do not need to set a page file on each drive. If all drives are separate, physical drives, then you can get a small performance boost from this, though it would likely be negligible. If all your drives are partitions on one physical hard drive, it will likely cause problems with file access and possibly give you worse performance.

The main reason you would want to have multiple page files on different drives is to be able to have a larger amount of swap space without having too much of your space on one particular drive taken up.

EDIT: I forgot to add, if you have one drive with multiple partitions, you should probably make sure that only one drive has the page file on it, as this will give you better performance (in most cases).

1

moving pagefile.sys to another physical drive only made sense when the drive was connected to a different controller. otherwise absolutely no gain.

another popular option is a very small first partition reserved only for the boot files and pagefiles.sys so they will not become fragmented and reside at the physical start of the drive where the drive performance is significantly better.

3
  • 1
    I'm not sure what you're talking about in regard to the drives having to be on different controllers. If one hard drive is being hit heavily and is having trouble keeping up with IOPS and there is another volume on an idle spindle, there is a big difference in where you'd want your pagefile to exist. This is why in almost every SQL Server guide, they say OS on one set of spindles, Databases on another and transactions logs on a third, even though they all likely go to the same RAID controller. The premise is the same.
    – MDMarra
    Sep 6, 2009 at 23:35
  • 1
    i was referring to the good old days when hard disk drives were connected to some old fashoined IDE controller. in this case you ONLY gained performance if you move the swap file to a drive connected to a different (e.g. secondary) channel. having the OS on, let's say, the primary master and the swapfile on the primary slave drive makes absolutely no sense.
    – Molly7244
    Sep 6, 2009 at 23:59
  • It does, so the heads don't need to shuttle between the other files and the pagefile, which makes the real latency, especially while reading/writing to big files. Jan 17, 2011 at 1:02
0

The only advantage to setting the page file elsewhere is to distribute I/O operations.
This was important in the old days, when memory was costly and small, and so programs competed for memory and swapped each other out of memory to the page file.
Nowadays, when memory is counted in the gigabytes, the usefulness of this file has become rather doubtful. The only advantage to setting the page file elsewhere is to distribute I/O operations.

So, the short answer is : don't worry too much about the page file.
The long answer is that if you do have more than one physical disk (meaning real disks, not partitions of the same disk), it might be worthwhile to allocate the page file on another disk, although for every argument for it I can find one against ...

1
  • 'don't bother, ram is cheap' is a common reply which I find limited to a minimal user's perception. The idea is using any given hardware with optimal performance. The memory requirement depends on the user, and the 'cheap' depends on their budget. One may need an amount of memory which is not possible to install or buy. Jan 17, 2011 at 0:54
0

The page file is still used and will continue to be used regardless of how much RAM you have. Under XP and earlier (and I THINK this holds true in Windows Vista, 7, and 2008) the pagefile allows memory dumps for debugging but must be on the C: drive for them to work. That said, in 15 years, I've never had a need for a full memory dump so I generally recommend moving it OFF the C: drive when space is an issue on workstations.

I've never heard or read anything to suggest multiple page files have any negative effect. I would appreciate anyone with knowledge of this to post a link describing the issue - preferably from Microsoft's web site, but other sites may do.

If you put the page file on multiple physical hard drives, Windows tries to identify the least used drive and use that for paging operations. So if you have multiple physical hard drives - as opposed to one hard drive partitioned - moving it can be a good idea.

Now, that said, I don't know how much improvement you would see with it on multiple physical disks, especially if you kept the need for paging to a minimum by having a good amount of physical RAM.

You must log in to answer this question.