I’m using a MacBook Air M1 8 GB. I noticed that there’s only 7.3 GB of swap, and I often run out of memory even just by watching YouTube. The system would freeze immediately, requiring a reboot by long pressing the power button to get it going again.
This is what the swap partition looks like:
$ swapon --show
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 7.3G 115M 100
Is there a way to grow the size of swap partition?
jakfrost
(Stephen Douglas Snow)
2
If you’re running out of memory then increasing the swap size would make the issue worse. You are likely being hit with an oom condition that causes the freeze. I would switch to swap on disk at least to see if that helps.
marcan
(Hector Martin)
3
There is no swap partition by default. What you are seeing there is compressed RAM as swap, which is still just RAM. You need to create a swap file, instructions here: If I want to add a swapfile on Fedora Workstation with btrfs, where should I put it?
2 Likes
jakfrost
(Stephen Douglas Snow)
4
I know that, it’s why I suggested swap on disk over swap on ram.