[SOLVED] Designating the size of the swap file?

2davidc8

Contributor
Joined
Aug 19, 2015
Posts
15
Location
Dublin, CA
Back in the days of Windows 7 (maybe even XP!), if I recall correctly, you could define the size of the swap file on your hard drive. I'm not sure if "swap file" is the correct name, but what I'm referring to is the following: if the OS is running out of RAM memory and needs more, it could use a portion of your hard drive like RAM memory. This "portion" of the hard drive is what I'm calling the swap file. You could go to Settings and define or modify the size of this file.
My question: I don't see an obvious way to do this in Windows 10, so is this even necessary in Win 10, and if so, how do I do it? How about Windows 11?
Thank you for your help.
 
I second what @x BlueRobot has stated. You'll cause problems overall. With Windows 10 and forward, Windows does a superb job of managing the pagefile.

Ram is inexpensive nowadays and is what I recommend looking into.

Crucial has a nice Ram picker that can help you choose.

Crucial Advisor tool

It also helps to know your motherboard manufacturer and its limitations regarding memory.
 
There is absolutely no need to change it from the system defaults which will automatically manage the page file size for you. The same applies to Windows 11.
^^^This^^^

Just leave the defaults alone. For 99.9% of us, Windows knows how to properly and efficiently manage system resources just fine using the default settings.

To answer your other questions, for Windows, the term is Page File. "Swap file" is a term from ancient computer history but still commonly used. And Windows still has uses a swapfile.sys, pagefile.sys and hiberfil.sys files to manage our "virtual memory" (system memory plus temporary disk memory).

One common misconception is that the page file is used as "overflow" space when it runs out of System RAM. That is incorrect. Windows will use the page file even if there is massive amounts of RAM installed. It uses the page file to temporarily store (cache) lower priority data, leaving the high priority data in faster RAM. That's a good thing as it (the lower priority data) is temporarily stored in the page file as "raw", but immediately usable, data - as compared to being a "saved" then "closed" file that then needs to be "read" and "opened" and temporarily stored as raw data again, next time it is needed.

A common problem, even among most enthusiasts who love to "dink" with the page file, is the page file size is NOT a "set and forget" setting. The old and obsolete rule of thumb you might have heard of 1.5 times the amount of system RAM for the page file size is just that, "old and obsolete". The optimal page file size is determined my many factors, including commit rates, RAM/hardware and the software running. These are all variables that... well... vary!

Most users have no clue what commit rates are. And that's okay. Windows does. And since those variables vary, Microsoft made the page file size "dynamic". That is, it will change as needed - AS LONG AS the user does not dink with the default settings! So leave them alone! The default setting allowing Windows to automatically manage virtual memory and the page file size is the ideal setting.

My question: I don't see an obvious way to do this in Windows 10, so is this even necessary in Win 10, and if so, how do I do it? How about Windows 11?
It is not obvious because, sadly, most users, even very experienced users are NOT true experts at memory management. Windows 10 and Windows 11 are NOT XP and should not be treated like XP. Unfortunately, too many times, because "I've always done it that way", users have dinked with the settings and then if (when!) things go wrong, they blame Microsoft. So Microsoft would rather make the settings hard to find, than get blamed for performance problems they did not cause.

So, why do you feel you need to make changes? Are you getting out of memory errors? How much RAM do you have installed? How much "free" disk space do you have on your boot drive? Is your Windows fully updated?
 
I forgot to mention as well, if you disable or change the page file settings, then there is a possibly no dump files will get produced if you ever have a BSOD crash.
 
OK, thank you all for your amazing answers! I learned a lot! I always keep my system updated with the latest updates that I get from Microsoft.
I have plenty of RAM and also a good-sized SSD for storage. Only reason I asked the question is that I like to have multiple browsers with lots of tabs open (often for convenience), and I also have Word, Excel, and PowerPoint open all at the same time, and maybe even a Zoom session. I thought that perhaps things would run faster by having a larger page file, and I remembered doing this in XP.
So, thank you all, I've learned a good lesson!
 
To me, it seems that setting is in the same place in which it was in Windows XP (maybe also Windows 2000).
It pretty much is, but takes a couple extra clicks to get there.
I have plenty of RAM and also a good-sized SSD for storage.
That's good AS LONG AS you still have a nice chunk of free space on that SSD. BTW, SSDs are ideally suited for Page Files. See Support and Q&A for Solid-State Drives and scroll down to, "Frequently Asked Questions, Should the pagefile be placed on SSDs?" While the article is getting old and was written for Windows 7, it applies to W10/11 too. And it applies to SSDs even more so today since the wear problems of early generation SSDs are no longer a problem with newer generations SSDs. :)
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top