Overclock.net banner
1 - 8 of 8 Posts
The problem with letting Windows manage the pagefile size it that it keeps changing the size and that leads to fragmentation and slower access to the file when it's needed, and it's kind of hard to defragment a pagefile.

I always set it manually to about twice what Windows recommends and to a multiple of 256 bits. I also move it to a drive that doesn't have the Windows folder on it, nor any programs (a storage drive), That way Windows doesn't have to wait for the C:\ drive to become available if it needs to swap.

And as long as you're messing arounf with this kind of nonsense you can do sort of the same kind of thing with the Windows swapfile,. but it's a little tricky because windows won't let you do anything to it. You have to create a "dummy" swapfile on another drive and symbolically link the original to it.

Moving Swapfile.sys to another location/drive
Swapfile.sys does not move along with Pagefile.sys when doing the steps above, so we'll use a workaround. We'll create a symbolic link using the Windows command Mklink (explained in detail here) to point the C:\swapfile.sys to another partition. C:\swapfile.sys will be the symbolic link, small in size, which will point to E:\swapfile.sys, the actual 256 MB swap file. After the link is created, Windows will use the actual file at E:\swapfile.sys as virtual memory.

Go through Steps 1 to 5 from above. Basically, you are setting No paging file to all partitions.

Step 6. Restart. You'll notice both pagefile.sys and swapfile.sys are now gone. If not, you can delete them manually.

Step 7. Open an elevated command prompt by pressing Win+X and choosing Command Prompt (Admin). Click Yes if UAC pops up. (more ways to open an elevated cmd)

Step 8. Type mklink location1\swapfile.sys location2\swapfile.sys, in my case mklink C:\swapfile.sys E:\swapfile.sys. (If you want to see all available parameters for the mklink command, type mklink /?)



You'll get a clear confirmation message: symbolic link created for C:\swapfile.sys <<===>> E:\swapfile.sys.

The target file E:\swapfile.sys does not have to exist when typing the command, it will be created automatically when Windows will look for it on C:\swapfile.sys, where the symbolic link is.

Step 9. Enable pagefile again with step 6 from the first tutorial above, or make any other virtual memory setting you want to do there, as long as you have pagefile active on a drive.

Step 10. Restart. That's it. You'll now have a swapfile.sys (0 bytes) symbolic link at the original location and a 256 MB swapfile.sys at the new location.

To remove the symbolic link, simply delete it and restart in order for the OS to create the swapfile.sys file again.
 
What drive are you using ? if you are using an SSD, its best to just completely disable it.
 
Unless you're running workloads that absolutely use all of your RAM I wouldn't bother increasing it above the default that Windows sets.

The age old recommendation of 1-2x your physical RAM size was relevant when RAM sizes were in the sub-gigabyte range.
Disabling the page file is absolutely not recommended unless you have so much RAM that you never see more than 75% usage. The eventual "risky" load that an SSD sees because of page file is only relevant if the page file is actually being written to in a significant fashion, which it only will if your physical memory usage goes too high.

The biggest reason why you want a page file on Windows is that Windows does not support overcommit.
Shortly explained, all applications request an amount of memory to use, and this is always assigned 100% virtually. So, as an extreme example, if an application requests 4GB of memory but only uses 2GB of them, you'll only see 2GB of physical memory used, but still see 4GB of virtual memory used.
When I say Windows doesn't overcommit it means that the virtual memory size is always equal to physical memory + page file size. Compare to e.g. Linux, which supports overcommit, you can easily request 2TB (and even more if you wanted) of memory from the system even if you don't have it, as long as you don't actually use more than what the system has.

So in the case that you use applications that use a lot of virtual memory (web browsers are the worst offenders), but not so much physical memory, you'll need spare virtual memory, even if this requested memory isn't actually used.

Put shortly, don't adjust it.
If you have to adjust it, 2GB or 10% of your RAM, whichever is highest, is suggested as a minimum.
 
Quote:
Originally Posted by blodflekk View Post

What drive are you using ? if you are using an SSD, its best to just completely disable it.
Nah SSDs can handle it, no worries.
However, if RAM usage never nears 16GB across all your workloads,could disable it, I havent had page file running on one of my systems for a while without issue.
 
Quote:
Originally Posted by spinFX View Post

Nah SSDs can handle it, no worries.
+1, the cost of page files on SSD's are overrated. If you're worried about that, might as well move the entire browser session away from the SSD. If anything, SSD's (or a completely unused HDD) are exactly the media you want to use a page file for to avoid slowdowns if, or when, it becomes necessary to use.
Quote:
Originally Posted by spinFX View Post

However, if RAM usage never nears 16GB across all your workloads,could disable it, I havent had page file running on one of my systems for a while without issue.
I'm having a really hard time justifying disabling page file on Windows simply because the eventual gains there are to be had (less disk use) does not outweigh the issues of applications crashing because you "ran out of memory" at 60% memory usage.

Personally it was terrible for me with 8GB of RAM.
I had my page file disabled because I was greedy with disk space - and if I wanted to play Paragon (graphically impressive MOBA by Epic Games), I had to close my single-tab browsers otherwise either of them would crash during gameplay even though I was only seeing about 80% physical memory usage.
But I was indeed seeing my virtual memory being capped.
After setting my page file back to defaults, everything worked great without noticeable slowdowns, and I didn't see my physical memory usage go above 90% even with the page file enabled.
I did eventually end up getting 16GB of RAM, but I still haven't disabled my page file in fear of running out of memory (while still at 80% physical "usage") at a critical time.
 
I've disabled page file ever since I got my ssd, which is an 840 pro, which I got whenever it was released, which was years ago. My system at the time had 16GB of ram and my current system has 32GB and on both systems I have never seen any negative impact on performance. I mainly game if that makes any different to you.
 
Quote:
Originally Posted by blodflekk View Post

I've disabled page file ever since I got my ssd, which is an 840 pro, which I got whenever it was released, which was years ago. My system at the time had 16GB of ram and my current system has 32GB and on both systems I have never seen any negative impact on performance. I mainly game if that makes any different to you.
It's certainly not a negative performance impact in either way, it's just there to help you out if you do run out of memory.
 
1 - 8 of 8 Posts