[Outdated] VFS cache and Swappiness

Could do that, or create a new file that has just the settings you want in it. If you want it to run after 99-sysctl-garuda.conf then it could be 99-sysctl-my-stuff.conf so it's alphabetically later.

5 Likes

Having applied @jonathon 's suggestion, I checked back in the sysctl.d folder after the most recent large update.

Both files had been deleted, and the directory was empty.

When I ran cat /proc/sys/vm/swappiness the swappiness was set at 133 again. Looks like the swappiness is now being managed elsewhere.

Has /etc/sysctl.d been deprecated?

I'll look into @tbg 's suggestion about writing a pacman hook, and see what that does.

2 Likes

Thanks, @dr460nf1r3 .

I notice also in this changelog that swappiness has been altered to use ZRAM. I assume this explains the default setting of 133. I've got lots of RAM, but also an ingrained horror from the early days of SSDs of seeing unnecessary write actions to disk. This is going to take some getting used to. :open_mouth:

Does this mean I should avoid (or approach differently) some of the other associated tweaks, such as vfs_cache_pressure, etc?

You are right, it does indeed. We no longer ship vfs_cache_pressure, just vm.swappiness (in /usr/lib/sysctl.d/99-sysctl-garuda.conf). If you are concerned about your SWAP partition being used (if I understood correctly) - the ZRAM swap should have a higher priority and should therefore be used prior to utilizing the actual SSD swap space. You can check this with swapon -s.

2 Likes

There’s a possibly interesting interplay here between zram, zswap, and swap.

zswap will compress pages before they hit zram because it sees it as a swap device, then will offload to zram (as it has the higher priority), then to swap.

If you have a swap device (partition or file) then using zswap alone is very likely the better option, though disabling zswap is also a possibility.

https://wiki.archlinux.org/title/Improving_performance#zram_or_zswap

6 Likes

Couldn’t the garuda installer/assistant automaticly set this ? if using zram + no swap device → grub kernel param += zswap.enabled=0 ?

Yup, would "just" need to be implemented. :grin:

3 Likes

Do not use zram and zswap together.
More generally, do not use two (or more) things that could possibly interfere with each other.

We all hate swapping, but I'd like to point out that sometimes a little swapping is actually a positive thing. I do not know how Garuda sets up swapping, but what I can tell from experience is that zram works really fine even on low-end computers.

3 Likes