Hi folks,
I just installed Fedora Workstation 33 afresh last night with an ext4 partitioning scheme and discovered that zram was enabled by default. About 4GB of space was allocated to it, which is half the size of the physical memory my laptop has. I was furthermore surprised when I discovered the following.
Look at the swap bar of htop
. Actually I allocated 1536MB of space for the designated swap partition and while installation, the zram got enabled as a new default and now I see them working together - hence resulting the 5.32GB of space that you see in the screenshot. Now that is definitely not a problem. The problem is even when I have reduced the swappiness value, the OS still finds reasons to make use of the swap space. I have at least half the memory left for use and then I feel the sluggishness in the interaction, so I quickly open up htop
to see an active use of the swap partition.
Beginning to swap pages to back to the secondary memory and forth, even when almost half the physical memory is left unutilized is unsettling. It also messes up the experience as there’s a notable lag in the user interface. I am sure that my hardware is not the type where you would want to use swapping in the first place as I have only one 5600RPM 2.5" hard drive which is not a very fast disk, and the tendency of swapping every now and then bottlenecks the capability of how good the physical memory could have, otherwise, performed. I think that I have detected the symptoms right (Feel free to correct me if I have not).
But how do I reduce the preference of ZRAM usage?