I have enabled zram on my system.
But I doubt whether I have done it right.
below is my zram-generator.conf content.
zram-size = ram / 2
compression-algorithm = zstd
swap-priority = 100
fs-type = swap
But depending on what kind of guide you follow, different things are suggested.
I want to know if mine looks right.
I’m also confused about what should be on my 99-vm-zram-parameters.conf
arch wiki suggest this:
vm.swappiness = 180
vm.watermark_boost_factor = 0
vm.watermark_scale_factor = 125
vm.page-cluster = 0
The other guide I found suggested this:
I have 16GB ram. Will 4GB zram honor enough?
You could use the following script to configure the parameters:
But do the other things look right enough?
I’m a bit doubtful if 8GB zram is too much when I have 16GB ram. Everything works fine on my computer. The reason I want zram is so my computer can hibernate.
Even though zram is a swap space, it is a
compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression
You cannot hibernate (aka suspend-to-disk) in RAM.
You would need to setup a swapfile or a swap partition for that.
Ok, but my old computer could suspend and hibernate with zram. Maybe I’m wrong, but I’m pretty sure.
I’ll try the swap partition and see how it goes. But at the end of the day I don’t care about suspend or hibernation. What is important to me is that when I log out, my computer must stop using power.
Right now it’s using power and running vidr when I log out.
It is impossible to use zram for hibernation (suspend to disk).
When hibernating, the current state of the system is written to disk (the swap device) and the machine is completely powered off.
However, suspension, that is, suspend to RAM, will power off the system except the RAM which contains the current state of the system.
Please refer to: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate
Ok and thanks.
I’ll read up on the stuff you link to, and convert my zram to a swap partition.
Are this parameters advised by maxperfwiz alright?
To better understand the values you should take a look at the script to see what it actually does, which you should always do before running any script by the way. This particular script explains what the values do.
I’m not sure if looking at the calculations in the script have anything to do with the imho extreme output/advise the script presents.But, I may be wrong:-)
The calculations are exactly that, calculations. They are based on the amount of RAM in your system.