Swap SSD?


For a while I’ve installed OpenSUSE in the following configuration:
/boot/efi in SSD1
/ in SSD1
/home in HDD1
/Windows 10 in SSD2
/Windows 10 Users in HDD1
no swap anywhere.

I am realizing that I am pretty much never on Windows 10, and some of the proprietary tools that I am using are eating 16GB/CPU in an octacore desktop with 32GB RAM. I am thinking about adding a SWAP partition somewhere as all of my drives have some overprovisioning then I’m wondering what if I replaced the SSD2 with another SSD and format it as SWAP entirely then mount it.

Is this something that’s been done before?

Um, what’s the point of RAM if it’s not used? If anything tweak the system swappiness (vm.swappiness and vm.vfs_cache_pressure) to ensure it uses RAM before any swap…

I run 16GB of ram, swap on the SSD is 1.3G since I don’t suspend/hibernate this desktop.

Hi malcolmlewis,

What I mean is that my tools are using 100% of my 32GB RAM then freezes. 8 processes in total would occupy ~128GB, so I am thinking about giving it swap SSD to accommodate for it.

Ahh OK, get more RAM :wink: Perhaps look at nice’ing the process or other tweaks to limit it’s RAM/Cores usage?

Sure it’s not the application going crazy, as in runs for awhile and then all of a sudden starts consuming RAM?

You can just create a swap file (rather than a dedicated partition) to use when it’s running, and use swapon to activate on your existing setup? This should help refine the amount of swap you really need, even just plug in a USB device and use that as swap (it might be slow) but it will indicate at least how much swap you might need… I would start with a 16-32GB file/device and see how that goes, then jump on Windows let it do it’s updating, then cleanup the disk, then use the windows tools to reduce the size to your requirements. Then in YaST partitioner create the swap file and should be good to go.

Swap files? I’ve never heard of that but it sounds interesting. I will check it out but my boot drive doesn’t have a lot of free space either, and I don’t wan it to be slowed down too much by using HDD.

The proprietary tools that I’m using does use a lot of RAM, otherwise it would be ridiculously slower. I can force limit the number of cores and therefore memory used but I want to parallelize as much as I can.

At this moment, I think I’ve spent too much to buy more RAM.

I will give that swap file a go

M$ Windows puts swap file at c:\pagefile.sys ("c : ") ordinarily.
You can move it to another location with a Windows system settings.
You need a special tuning to run Windows without swap file.

It is better to use SSD for a swap, Intel Optane is better than ordinary SSD (but more expensive).
You can compress system memory like you do it with files.
AMD X570 chipset supports up to 128 GB, and more with a Threadripper machines.

Give that swap file a go! rotfl!
You can use swap file with Linux without dedicated partition.

I will revisit this again, but for now my work desktop has been upgraded to 64GB RAM and it seems to be sufficient for my work.