3

I hope, that this question is not too opinion-based and will try to approach it as neutral as I can. I've read through some sites about this topic, getting a load of contradictory information.


Question 1 (most important):

Is it true that a user-defined size minimizes computation time over "system managed"? (I can hardly find profound data on this.) Is fixed-size (starting=maximum size, no computation needed as it never changes) performing better than a dynamic "starting to maximum size interval"?

It is stated by multiple sources to use custom settings (1, 2 and 3 among others), at least if you are able to predict your need for memory. This blog post states that it is a common practice for system tuning to customize page file settings.

To determine the needed paging file size Mark Russinovich advises to take a look at the "system commit" at maximum load, which can for example be seen with the tool SysInternals Process Explorer. He indirectly advises to user-set custom size. (From this superuser answer, source)

Other system admins on the other hand, prefer to let windows manage this (9 and especially 10 among others)


Questions 2 + 3:

Are there reproducible stability issues with moving the file to another disc? I've read about it somewhere, but it is recommended by official sources here (Section "Page File").

I would also like to minimize the page file on my SSD (keeping in mind fact 5. below) to prevent Windows from writing huge amounts of data on it (see here plus the comments). Because of that and fact 4., I now set up a second drive (HDD) with the system-recommended amount of page file size as fixed.

Is it needed to use a separate partition for the page file as stated by Microsoft here? Heard something like this, but the other server fault users in that question and that message board widely agree on "no".


Facts

I know that this part is not really a question, but I refer to it multiple times, read above. This idea is from here, the research is provided in the links:

  1. It is difficult to formulate right or wrong as the recommended page file size highly depends on the user/system (7, 9, 17)
    1. There are diverse programs that need a page file in Windows to be able to work flawlessly (10, 17, 18, 19)
    2. Therefore, you should not disable the page file completely for the big majority of use-cases (20, 21 and see fact 5. but also *Annotations 1). Hint: eliminating the page file won’t eliminate paging to disk! (Source)
  2. The belief to need 1,5-3 times the amount of available RAM isn't necessarily appropriate more for recent Windows systems (3, see Section 2.3, 9, 17, 23, see also comments here)
  3. The system is sped up by distributing the page file over more than 1 disc (seems obvious to me, recommended here and there but also by Microsoft)
  4. Windows needs a small (min. 400MB) on the system partition (17). Having 800MB for kernel memory dumps is recommended, but the complete memory dump (needs slightly more than the total amount of RAM) is mostly not needed (9). See also this blog post or this answer.

Further reading:

*Annotations:

  1. Microsoft states the following, but for a general use case, it is considered safer to use a page file (See 18 and also here where the already named Mark Russinovich is quoted):

"For example, when a lot of physical memory is installed, a page file might not be required to back the system commit charge during peak usage. The available physical memory alone might be large enough to do this." here

  1. quux tries to explain how to use perfmon (Windows internal tool) in this server fault answer. Unfortunately, even the Web Archive only finds a probably 404 Gangnam Style GIF.
Cadoiz
  • 567

2 Answers2

2

1) I don't think anybody has observed a meaningful, consistent measurable difference in performance between a system managed and user defined page file in Windows in decades. If there was a difference in having a fixed size page file, it would be from avoidance of fragmentation on mechanical disks, something increasingly rare for system drives.

2) There is no stability issue with moving the page file to a different disk.

3) There is no need to use a separate partition, though doing so may also help with fragmentation.

You will likely find that if you start seriously paging onto a HDD everything will grind to a halt anyway.

Personally, I haven't used a page file (or swap on *nix) in at least a decade. IMO, you should buy enough RAM for swapping to never become relevant in the first place. For desktop use, if you badly need swapping, the experience will suck anyway. For server use, I'd rather the machine OOMs and crashes and triggers a failover than for it to grind to a halt by swapping while staying just alive enough to not trigger a failover.

So before you start rearranging the deck chairs on the swapping Titanic, ask yourself whether this is really a worthwhile effort.

1

My short answer would be, "To each his own". There are so many parameters to take into account, in addition to those you've mentioned, that I think each PC user should find his/her own answer to that question.

I too have chosen to do without a pagefile altogether, on all three Windows systems I run at home (at work, it's a different matter, corporate policies being what they are). I have an aging Lenovo laptop dual-booting Windows 10 Pro and Windows Server 2019 (don't ask) on a Samsung EVO 860 500GB SSD with 6GB of RAM, and a budget lappy with a 32-bit Windows running on a puny 32GB SSD with 2GB of RAM.

Last time I had to reinstall due to system instability on one of them was about two years ago, and it probably had more to do with me testing software left and right than with my choice of no pagefile over system-managed vs fixed-sized vs whatever hits your fancy.

Everytime I had to install Windows, on all my PCs, I've disabled the pagefile right when setup was over, and I've installed ImDisk to create a RAM disk, pointing user profiles to it, along with caches for all my browsers and programs when I could.

This suits my needs, because my Lenovo PC is prone to overheating (Pentium P6100 have poor thermal dissipation characteristics to begin with), and I manage to keep heat at a minimum by preventing swapping to disk. The budget laptop I only use when I'm on the road, because it's lightweight, has a nice 1080p display and is fast enough for my needs.

Of all this, you've determined that I'm of the no-pagefile school of thought. I'd like Microsoft to take a different stance on how swap is managed in Windows, and to emulate, if not downright copy, what Apple has done for decades with its own products: let the system dynamically decide how much space should be dedicated to swap, based on how much free space is available at any given moment on your system disk.

I also have a 2006 MacBook Pro that I don't use much anymore. It's forever stuck with Snow Leopard because its CPU is 32-bit only, and I installed a 128GB SanDisk SSD years ago in replacement of the original 80GB HDD. On this machine too, swap is disable, and even with a meager 2GB of RAM (the max it'll accept), I can open up to ten different apps and work if I have to.

If only I could find a replacement battery at a reasonable price, I'd probably work with it right now.

So, those are my two cents. I'm not trying to convince anyone that I'm right, I'm just voicing my opinion. And sharing my experience. FWIW.