Enable ZSwap to increase performance

Yeeeeh! You're right! I forgot to do the thing about the modules. Thank you. Now is ok.

About the performance, yeah I never noticed a difference either, and it in fact made my system perform worse. I am sure in the correct scenario the opposite would be true, but in my particular use case this isn't doing.

I suspect, because I can't be certain, that this solution was doing "something". I think it was achieving a more relaxed system, but I'm not sure. Now, I have changed strategy :smile: I have installed LxQt instead Mate and modified swappines to 25, instead 60.

So far, the system is a bit more fast, but I'm just starting. I have to try more things, more times. We will see...

Is there a way to customize how big in gigs the zram will be?

Yes, look into file /usr/bin/init-zram-swapping (you can search it with listing the package files using dpkg -L zram-config) , this is the script that creates the zram swap devices. In this file there's this line:

mem=$(((totalmem / 2 / ${NRDEVICES}) * 1024))

The part that you can tweak is / 2 . So by default it takes total amount of memory and divides it by 2 and takes that as the total reserved for Zram .

So if you want to make Zram use all the memory just remove that part.
There's this answer on StackExchange that one should set this to 150% of total memory , so * 3 / 2 and then also set vm.swappiness=200 in /etc/sysctl.conf :

Though my experience is that the default value suits me well.
I've also set my disk swap to the same priority 5 that Zram has it set by default, so in /etc/fstab I have pri=5 in the disk/ssd swap device arguments . That way the resource consumption is a bit more balanced between CPU load due to Zram and SSD throughput due to disk swap.