Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Remove The Disable Swap File Option From The Set-Additional.cmd, #207

Open
KedarWolf opened this issue Jan 24, 2021 · 1 comment

Comments

@KedarWolf
Copy link

Is your feature request related to a problem? Please describe.
Even with an SSD and ample RAM, it is not advisable to remove the Swap File.

Describe the solution you'd like
Remove that code from the Set-Additional.cmd.

Additional context
Quote:

https://www.howtogeek.com/199990/should-i-disable-the-page-file-if-my-computer-has-a-lot-of-ram/

"No matter how much RAM you have, you want the system to be able to use it efficiently. Not having a page file at all forces the operating system to use RAM inefficiently for two reasons:

First, it cannot make pages discardable, even if they have not been accessed or modified in a very long time, which forces the disk cache to be smaller.
Second, it has to reserve physical RAM to back allocations that are very unlikely to ever require it (for example, a private, modifiable file mapping), leading to a case where you can have plenty of free physical RAM and yet allocations are refused to avoid over-committing.
Consider, for example, if a program makes a writable, private memory mapping of a 4 GB file. The operating system has to reserve 4 GB of RAM for this mapping because the program could conceivably modify every byte and there is no place but RAM to store it. So from the start, 4 GB of RAM is basically wasted (it can be used to cache clean disk pages, but that is about it).

You need to have a page file if you want to get the most out of your RAM, even if it is never used. It acts as an insurance policy that allows the operating system to actually use the RAM it has, rather than having to reserve it for possibilities that are extraordinarily unlikely.

The people who designed your operating system’s behavior are not fools. Having a page file gives the operating system more choices, and it will not make bad ones.

There is no point in trying to put a page file in RAM. And if you have lots of RAM, the page file is very unlikely to be used (it just needs to be there), so it does not particularly matter how fast the device it is on is."

@CarlosMerc
Copy link

CarlosMerc commented Jan 29, 2021

The "swapfile" in Set-Additional.ps1 refers to the Modern apps (like store apps), not the "pagefile" that sometimes is called the swapfile.
I ran the script and pagefile.sys (the traditional swap space) is still there. Only the Modern apps swapfile is not there. Unless you have a need for the Modern apps swapfile, just leave it?

Note: By default, both a "swapfile.sys" and "pagefile.sys" are created in the root system dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants