Should I increase swap file (ZRAM) and if so, how? #2263
|
I have 32GB RAM. When I created a W11 VM, and assigned 20GB to the VM, Aurora ran to 97% RAM usage and froze. I saw ZRAM is set by default to 8GB and I wonder if I should increase that? (I realize I also should decrease my RAM usage and what I give the VM) I'm a noob, but found in a Kionite forum, the ZRAM generator is here: /usr/lib/systemd/ Before I do something stupid, I thought I ask here :-) Is 8GB swap file size enough? Is there a separate swap file besides what looks like an 8GB ZRAM drive? It seems ZRAM and swap file are terms used interchangeably, but they seem to differ. I keep reading 8GB is enough. I read Linux deals with low RAM less gracefully than Windows (out-of-memory - OOM). I just want to make sure it uses more SSD if needed. And before I forget, thanks so much for creating this OS! This is the best distro out of close to 30 I tested. Everything just works and I have literally nothing to fix or repair or maintain. Really boring (in a good way) |
Replies: 2 comments 1 reply
|
It seems ZRAM isn't; actually SSD swap (it is called " Linuxswap" in the partition manager, though) . It is RAM that stored compressed data from RAM. We basically gain some " virtual" RAM at the expense of CPU power. Swapping from fast un-compressed RAM to still fast compressed RAM. This also explains why it can't be larger. it basically is a first stage of swapping before the SSD is used. With that I need to re-phrase my question: |
The correct way is to override the file with
You can read more about this here: I guess you can try this change here, you need to create
No. You can create one I guess. https://wiki.archlinux.org/title/Btrfs#Swap_file use |
The correct way is to override the file with
sudo systemctl edit systemd-zram-setup@zram0.service. This will create a drop-in override in/etc,/usrdoes not need to be writable for this. This is the best practice on all systems.You can read more about this here:
https://fedor…