About a week ago, I did a clean install of Ubuntu 18.04.3 Desktop on my 8GB laptop, exactly as in this other upvoted question. I chose LVM and encryption.
Somehow, Ubuntu decided to create a very small swap partition - only 1GB. This results in frequent freezes as the OS is thrashing the tiny swap partition when more than a few applications are open. (I still don't understand how in almost 2020, Ubuntu still doesn't have any way to warn the user of running out of memory ).
Anyway, I followed the steps to create a swap file. The file is used after swapon
, but not after reboot:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/dm-2 partition 1003516 0 -2
$ ls -al /swapfile
-rw------- 1 root root 17179869184 Dec 3 13:39 /swapfile
$ grep SwapTotal /proc/meminfo
SwapTotal: 1003516 kB
Also, I don't see the swap partition in Gparted after booting from a rescue USB stick:
- What is going on here with the partitions? What are those <1GB partitions, especially the second one, and why are they taking up disk space?
- How can I get rid of the swap partition, wherever it may be?
- How can I force Ubuntu to use the swap file?
Note that I installed Ubuntu 18 last year, and didn't run into this silly situation. This looks like a regression - is there a Launchpad ticket tracking it?
kpvm
to manage logical volumes. – Dan Dascalescu Dec 04 '19 at 02:36