I want to add swap space on my machine running Fedora. Searching on this raised questions:
I found this 2016 post showing a method to do it, but a comment says changing the swap could result in boot issues. Is it safe to follow that method ?
Fedora's doc says it replaced swap with "an emulated drive that uses RAM for its storage". This got me very confused because I thought the whole point of swap was to use the disk memory when the RAM is full.
Anyway, here is my use case: I have a fairly recent laptop with 24GB RAM, and a 1TB SSD which is 5% full. I want to try running some of the new LLaMA-based LLMs, but they need easily tens of GBs of RAM to load the models. Since I have plenty of free space in my SSD I want to turn ~200GB of it into swap space and be able to load the models.
Here is the result of running lsblk (I removed 30 or so lines of snaps):
loop0 7:0 0 104M 1 loop /var/lib/snapd/snap/authy/18
loop1 7:1 0 4K 1 loop /var/lib/snapd/snap/bare/5
...
loop34 7:34 0 320.4M 1 loop /var/lib/snapd/snap/vlc/3078
zram0 252:0 0 8G 0 disk [SWAP]
nvme0n1
259:0 0 953.9G 0 disk
├─nvme0n1p1
│ 259:1 0 260M 0 part /boot/efi
├─nvme0n1p2
│ 259:2 0 16M 0 part
├─nvme0n1p3
│ 259:3 0 269.1G 0 part
├─nvme0n1p4
│ 259:4 0 959M 0 part
├─nvme0n1p5
│ 259:5 0 1G 0 part /boot
└─nvme0n1p6
259:6 0 634.8G 0 part /home
/