On 2020-03-05 09:37 AM, Peter Suetterlin wrote:
James Knott wrote:
I'm running 15.1 & KDE. One thing I've noticed is swap use increases through time, even though I'm not even using all the real memory. Eventually, it gets to the point where my system bogs down and can become unusable. At the moment, I'm running 13.6 GiB of 15.6 memory and 4.1 of 24 swap. Why should swap be used at all, when there's still a significant amount of free memory? What is actually using all this memory? If it is a *single* process, the issue likely is that parts of KDE/Plasma are swapped out (and rapidly pulled back again).
I have been unable to identify a problem app.
I encountered that with heavy image processing. The machine would be *completely* dead for half an hour or so, and once the processing finished, it was back healthy as before.
So if you really use that much memory regularly (and don't have a memory leak somewhere) then you have two options: - more RAM
I have 16 GB and the memory I need is no longer available.
- limit the amount of physical RAM a *single* program can occupy, to help the DE not being pushed to swap.
I wrote a post here about a year ago describing this second option, using memory cgroups. On my 32G laptop I create a group limited to 30G and add the voracious process to that group. So this will make that process start swapping when it needs more than 30G, leaving 2G RAM for the system to 'survive'. I could easily process 45G data cubes that way, without noticing much reduction in response of the GUI. Quick description (adapt names and sizes):
mkdir /sys/fs/cgroup/memory/30G echo 32212254720 > /sys/fs/cgroup/memory/30G/memory.limit_in_bytes chown root.users /sys/fs/cgroup/memory/30G/cgroup.procs chmod 775 /sys/fs/cgroup/memory/30G/cgroup.procs
Then, to add a process there, echo $PID > /sys/fs/cgroup/memory/30G/cgroup.procs
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org