Swap used when plenty of physical memory is available - slows system.

Since upgrading to 42.1, I’ve noticed that OpenSUSE tends to use a fair amount of memory - particularly baloo and the plasma shell. After a long up time, I notice up to 6 to 8 gigs of memory indicated as used by free. However, my system has 16 gig installed and free will show 8 or 9 gigs of available memory. Still, the system insists on using swap space despite the copious availability of free memory - at the moment 1.4 gigs worth. This noticeably slows the system when opening programs or changing windows. Why does this happen and is there a way to stop it?

Thanks for your help.

Hi
I use the following in /etc/sysctl.conf;


# Disable swap
vm.swappiness = 1
vm.vfs_cache_pressure = 50

Mainly for SSD’s, which are all in my primary systems.
https://en.opensuse.org/SDB:SSD_performance

Thanks. This helps.

I have 8G of memory. At present, there’s a little under 2G free, with no swap being used.

The main times that I see swap used are when I download an iso, and when I write that iso to a USB. There’s usually still some free memory – more than the amount of swap used.

My guess (a totally uninformed guess), is that this is a priority kind of thing. What’s going into swap appears to be low priority stuff.

There are now sever directories using tmpfs which may spill over into swap. The max amount of memory is fixed at mount I think and may be 1 gig for all tmpfs mounts no matter the actual memory installed. Maybe increasing the tmpfs memory might mitigate the problem