A question about memory management
Not trying to start an argument - genuinely curious, and would like to hear from people more knowledgeable than me.
Every discussion about pagefile, swap, virtual memory, ssd wear, having exessive ram, etc, seemingly always boils down to "ssd's are cheap, you'll never run out of writes, please turn pagefile back on and stop worrying about it". I know the truth is somewhere in the middle, (and was not 'worrying' in the first place) so just couldn't go along with it.
(I'll simplify while keeping it truthful) I have 32 gb of ram. Disabled pagefile as an experiment. Allocated a 4gb ramdisk for personal use. Under heavy load, memory hungry apps were indeed occasionally crashing, leaving 'low virtual memory' event log entries. Ram usage never exceeded about 75%. From what i could find, lack of continuous allocation seems to be the culprit. So i added a 2gb pagefile on the same ramdisk. Not a single hiccup since.
I feel like i've been gaslit. Am I missing something? I'm not suggesting everyone to start disabling their pagefile/swap, but surely memory management could be better than what we have now? I've not tested on linux yet but have a feeling will see a similar result. > I know the truth is somewhere in the middle Don't disable the page file, if you have 32GiB RAM, it's usage will generally be low unless you're doing something 'heavy', at which point if you're regularly doing that, add more RAM. Some applications absolutely require a page file and will not function without one (Adobe Photoshop is or was one of them). The truth is not in the "middle". The truth is you should ignore people who peddle uninformed advice on the Internet about how to "optimize" your computer when they themselves don't understand the NTVMM. So in the described scenario, what advantage does an ssd-backed pagefile has over a ramdisk-backed one? Assuming the same sizes. Because the common recommendation is "you need at least a few GB swap". We can change the total ram amount to 64 or 128. A RAMDisk-backed page file removes useful RAM from the system. It's a net-negative. You're using RAM that would otherwise go towards useful things, like programs or file cache. Again, if page file usage is a problem, you need more RAM, not less of it and certainly not allocating it to a RAMDisk. What you're saying should make sense. However: 32gb ram no pagefile: crashes 28gb + 2gb ramdisk pagefile: no crashes at all 32GB RAM + page file on disk also no crashes. Not all applications will function without a page file, as I said. There's zero reason to use a RAMDisk for a page file. Stop listening to idiot gamers. I don't care about ssd lifetime. This is purely an experiment. But you are inadvertently illustrating my point pretty well I think you're under the false assumption that on Windows the page file is always being thrashed. That isn't how the VMM functions. SSD "short" life span even from a bunch of 4KiB reads/writes is vastly overstated. Anyone who discusses the page file in terms of SSD lifetime is again, uninformed. the question seems to be: is better 30gb ram + 2gb ram swap, or 32gb ram + ssd swap?
id say full ram + disk swap cause itll be harder to reach the limit...once it gets to the limit speed is irrelevant and what really matters is that processes don't die No, the question is 30gb + 2gb ram swap vs 30gb + 2gb ssd swap