kgw
15 February 2024 16:55
1
``
2024-02-15 08:35:12 notebook1 in ~
○ → zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 zstd 4G 1.3M 16.7K 124K 4 /var/compressed
/dev/zram0 zstd 982.9M 4K 59B 20K 4
/dev/zram2 zstd 982.9M 4K 59B 20K 4
/dev/zram3 zstd 982.9M 4K 59B 20K 4
/dev/zram4 zstd 982.9M 4K 59B 20K 4
``
Is this just the default setup for 4 cpu processors?
Zesko
15 February 2024 20:27
2
I guess you mean that 4 x zram devices = 4 x Core of CPU.
That is WRONG, you have 5 x zram devices /dev/ram[0,1,2,3,4]
But they have nothing to do with number of cores. Your Zram setup looks like a mess to me:
kgw:
/var/compressed
This is for your hard drive, but not RAM.
Would you like to swap the cache to the hard drive? → If yes, why not zswap ?
I am pretty sure, zswap is default. You don’t need to set it up manually.
OR
One Zram device is sufficient in most cases
You have to disable zswap manually.
swap cache should be compressed in RAM, not in the hard drive.
You should follow Arch wiki. Do not follow false info in random websites.
Correct.
No one knows what you did to get the result that you saw and posted.
See also the link to the Arch Wiki:
zram - ArchWiki
kgw
17 February 2024 16:46
4
OK! Followed the Arch Wiki…
``
cat /proc/swaps
Filename Type Size Used Priority
/dev/zram0 partition 8052260 0 100
``
Thanks for your encouragement
cscs
17 February 2024 21:29
5
Just to mention. Thats ~8gb. Which is pretty modest. We dont know your physical ram size, but in my case with 16gb of memory (actually 13.5 available) I still need double that in zram in order to successfully compile the largest packages.
While such a big SWAP may not be a requirement for you… I would like to mention at least that zram
is functional, along with compression, up to that size or larger.
For example. If using zram-generator
;
[zram0]
zram-size = ram * 2
compression-algorithm = zstd
swap-priority = 100
fs-type = swap
(note the arithmetic of “ram/2” or “ram*2”, which can be augmented any which way)
1 Like
kgw
18 February 2024 23:49
6
I think I’ve got it:
``
2024-02-18 15:42:17 notebook1 in ~
○ → lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
└─sda2 8:2 0 931.2G 0 part /
zram0 254:0 0 7.5G 0 disk [SWAP]
‘’
Thanks!
system
Closed
27 February 2024 17:25
7
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.