I have been having problems with the stability of games for some time now. random crashes and sudden fps drops that only go away when I restart the game. Now I stumbled upon that the zram device in the partition manager is shown smaller than zram is allocated in terminal.
kde partitionmanager shows 31,27 GB
terminal zramctl shows 31,3 GB
i don’t know why or if this is normal but i assume that the problems are caused by zram trying to write something where there is no partition. could someone help me fix it? i have really little knowledge of terminal commands and don’t really understand the instructions on the net.
When configuring zram, the size of the zram device controls the maximum uncompressed amount of data it can store, not the maximum compressed size. You can configure the zram’s size to be equal to or even greater than your system’s physical RAM capacity, as long as the compressed size of physical RAM will not exceed your system’s physical RAM capacity. zram - ArchWiki
I’m not sure how your /fstab is laided out, mine total RAM 16Gigs swap is also 16Gigs, and my format is ZFS, it’s not timid gobbling my ram so I’ll use this:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=CE35-7587 /boot/efi vfat defaults,umask=0077 0 2
proc /proc proc defaults,nosuid,nodev,noexec,relatime,hidepid=2 0 0
/dev/zram0 none swap defaults,discard,pri=100 0 0
~
mine is looking very different
but I don’t even see a zram in it
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=322aade1-c262-4af6-9145-fb3101551aab / ext4 defaults,noatime,commit=60 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
❯ df /dev/zram0
Dateisystem 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
dev 16328288 0 16328288 0% /dev
but the difference between partition and zramclt remains
❯ swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 31,3G 768K 100
~
❯ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 zstd 31,3G 256K 33K 688K 16 [SWAP]
i just had a look in btop, even if i don’t know which value it refers to but it shows me 31,2 GB of total memory as the zram partition if the value is not rounded up. unfortunately i didn’t get the idea to check the value before i rebooted