First, don't place your page file on an SSD. While SSDs have gotten better about wear leveling, the page file is written to frequently and it will degrade your SSD much faster than general use.
What a lot of people don't understand is that windows never really has free memory. There's a few MBs which are kept free for burst demands, but otherwise, the difference between active in-use application memory and the total memory is generally consumed by what is known as "standby" memory.
![System memory](../../I/static/images/00d2b2182bbb33b54aec3c98f0e157c2d2993b7465c08752338cc66fd408af9b.png)
These are memory pages which can be dumped if needed (standby memory is a great, big cache), so from an application standpoint, it's available, but they are not by any means not being used. Usually, they function as disk cache, or a pagefile cache.
Windows' goal is to keep the data most likely to be used in this standby cache, based on usage patterns. To use a contrived example, let's compare the relative value of the private memory of a program like Windows Update (usually configured to run once a week), over the caching the contents of your desktop in this standby memory:
For a good majority of the time, Windows Update is sleeping. It's holding up memory and for the most part, doing absolutely nothing of value with it while it's waiting for the schedule to come around. The contents of your desktop folder on the other hand, might be queried constantly, especially if you like to save files to it.
In this case, what Windows will do is page out the memory allocated to Windows Update (even though memory isn't "full", and use the space made available in RAM to cache the contents of your desktop. This results in better performance for you.
Windows is making thousands of these decisions and managing a disk cache for hundreds of files being constantly written to by background services while trying to balance this with memory demands of active applications. Sometimes it gets it wrong for a moment, and we might have to wait for it to page data back into memory when we switch to an application that's been sleeping in the background for a while. But what you have to think about is if it had kept that application completely in memory, how many other applications would in turn be bogged down waiting for disk writes and reads to complete, or themselves be forced to page out? What if those were applications you were using in the meantime?
Applications frequently allocate memory pages which are used very rarely, such as start-up code (used once and then not needed), shut-down code (used once and then not needed), or update code. It's not practical to keep all this in memory when there are much more important uses, so once Windows identifies sections of code that haven't been needed for the current operation of an application, it happily pages out those sections to the pagefile, even if it technically could retain them in memory.
(And actually, depending on the applications, systems might frequently allocate more memory than they actually have, expecting most of it to wind up paged out. If you're looking at a detailed memory breakdown, the "Commit" or "Commit" charge is how much memory Windows has allocated to various applications. The pagefile is used to provide guarantees for this memory, even if it doesn't have enough physical RAM to cover it.)
I just noticed you did make a distinction between available and free memory in your question; My apologies if you feel lectured and already knew the difference. Ideally, free memory is always 0. However, while standby memory is memory that can be released, it's not always memory that can be released quickly. If I try to write a 1GB file to disk, windows is going to stick it in a disk cache in memory if it can, and then slowly write it out to the harddrive in the background. If an application needs to request 50MB of additional memory, but none is available because this huge disk cache is still being flushed out, then the application will hang until it's available. Keeping a small buffer on hand allows the system to resolve this issue with minimal lag from the user's standpoint. You might also wind up with larger-than-normal buffers if Windows just emptied part of the standby cache or released a lot of in-use memory, but hasn't filled it with new cache data yet.
1Please don't put your page file on a RAMdisk. That will only make the system incur more page faults. Yes, if they're to the pagefile-on-RAMdisk they will be resolved more quickly than if it had gone to a real disk, but not having them at all is still far faster; also, many of the increased page faults will be to mapped files, and those will not be helped by the RAMdisk at all. – Jamie Hanrahan – 2014-07-30T08:54:26.660
This reminds me of "LinuxAteMyRam" >> https://www.linuxatemyram.com/ , Similar Concept AKA > Its the OS doing what its designed to do to make the most of its resources.
– FreeSoftwareServers – 2018-03-23T06:09:20.6931
Just because it is writing/reading to the page file does not mean it us using it, it may just be updating it so it can dump the memory quicker if there is a sudden demand. I recommend running performance monitor or do a deep diagnostic and seeing what is causing the sluggishness.
– Scott Chamberlain – 2012-08-03T17:49:07.227Having more than 8GB of RAM will not increase performance in 99.(9)% of cases. Have you stuffed your mobo full of cheap low frequency/high latency RAM chips? Replacing them would be a better idea than adding more. – kotekzot – 2012-08-03T18:41:28.777
3@kotekzot That depends. I've generally found RAM latency to be somewhat negligible in most bottlenecks. If he has enough memory that he's not having to wait for applications to be paged in when he alt-tabs through all of them, then the next biggest bottleneck by several orders of magnitude is almost always the harddrive, and an SSD will fix that right up. – Darth Android – 2012-08-03T18:46:00.473
@if I have more ram, I can put the page file in a ramdisk which is much faster than HD access. It's a Dell laptop workstation level so I am sure the components are not cheap. I am aware that laptops have slower hard drives and IO subsystsem than desktops. – Tony_Henrich – 2012-08-03T23:06:29.403