Unfortunately, there is no general answer to say how much of the swap file is going to be used. It depends entirely on the software that you’re running, what your system’s own memory requirements are, and how much software you’re running.
For example, if I’m just running a web browser and a couple of other things on a machine with lots of RAM, my system may not be using the swap file at all. On the other hand, if I’ve got Photoshop, a video editor, and a virtual machine or two running, then the memory requests of the system may be high enough that it’s going to start using the swap file.
So, I can’t answer your question, specifically, but I can review some of the things that factor in.
Become a Patron of Ask Leo! and go ad-free!
How much memory is enough?
These days, 16 GB and 32 GB are a pretty sizable amounts of RAM. Unless you’re doing something extraordinary there’s a good chance that you’re not using the swap file at all.
If that’s the case I actually recommend setting the swap file size to zero. There’s nothing that says you must have a swap file. It’s only a technique that’s used in case you don’t have enough RAM to run all of the software you’re trying to run on your machine.
The only downside is if you actually do run out of memory. That can happen if you’re running a lot of different programs on your system at once, and those programs are attempting to use more RAM than is actually available. In that case your system may slow down, and you’ll get an out-of-memory message from one or more of the programs.
Swap files on an SSD
Now, let’s talk about where the swap files should live. I understand the performance benefits of having your swap file on a solid state drive. SSDs read very quickly. They’re not usually a big improvement in write speed, but they are a serious improvement in read speed.
But SSDs use flash memory, which as we know has a limited life span, depending on how much you write to it. By paging a file onto an SSD, it’s possible that you’re shortening the life of the drive itself. The question is, is the life being shortened by an amount that you’d eventually notice or care about?
SSDs actually use fairly high quality flash memory, so it’s very possible that it would make for a fine swap file location. In your case with the amount of RAM you have, you may not be writing a lot to it anyway.
In my case, I’m running on a machine with an SSD. I put my swap file on one of the actual hard drives in that machine simply because:
- It’s not going to get used very much. I have a fair amount of RAM.
- If it does get used, I don’t want it (especially if used heavily) to shorten the life of my SSD.
That’s the option that I took. I’ll suggest doing the same in your case as well.