Sorry if you’ve seen me here before…

What I’m trying to do, currently: exclude certain processes from swap to test whether they keep the desktop lag-free during high memory pressure.

From /proc/$$/smaps_rollup I identified what processes are using swap and what sounds GUI-related. From those, plasmashell was the largest, with kwin_wayland in second.

I’m creating an override in /etc/systemd/user/<service>.d/ with these contents:

[Service]
MemorySwapMax=0
MemoryZSwapMax=0

This seems to work with plasmashell just fine, with its entire 250M residential set staying on RAM. However, I checked kwin_wayland and it has about 50M in swap – which makes it impossible for me to rule my hypothesis out.

cat /etc/sysctl.conf 
vm.swappiness=10
vm.vfs_cache_pressure=150

OpenSUSE Tumbleweed with ZSwap enabled

Long output:

spoiler

$ systemctl --user show plasma-kwin_wayland.service Id=plasma-kwin_wayland.service Names=plasma-kwin_wayland.service Requires=basic.target session.slice dbus.socket PartOf=graphical-session.target RequiredBy=plasma-workspace-wayland.target BoundBy=plasma-workspace-wayland.target Conflicts=shutdown.target Before=drkonqi-coredump-launcher.socket plasma-workspace-wayland.target shutdown.target plasma-core.target plasma-ksmserver.service plasma-kwallet-pam.service plasma-kded6.service After=basic.target dbus.socket session.slice home.mount -.mount WantsMountsFor=/home/spj Description=KDE Wayland Compositor LoadState=loaded ActiveState=active FreezerState=running SubState=running FragmentPath=/usr/lib/systemd/user/plasma-kwin_wayland.service DropInPaths=/etc/systemd/user/plasma-kwin_wayland.service.d/noswap.conf UnitFileState=static UnitFilePreset=disabled StateChangeTimestamp=Mon 2026-11-16 04:34:07 EST StateChangeTimestampMonotonic=50088438 InactiveExitTimestamp=Mon 2026-11-16 04:34:07 EST InactiveExitTimestampMonotonic=50071047 ActiveEnterTimestamp=Mon 2026-11-16 04:34:07 EST ActiveEnterTimestampMonotonic=50088438 ActiveExitTimestampMonotonic=0 InactiveEnterTimestampMonotonic=0 CanStart=yes CanStop=yes CanReload=no CanIsolate=no CanFreeze=yes CanLiveMount=no StopWhenUnneeded=no RefuseManualStart=no RefuseManualStop=no AllowIsolate=no DefaultDependencies=yes SurviveFinalKillSignal=no OnSuccessJobMode=fail OnFailureJobMode=replace IgnoreOnIsolate=no NeedDaemonReload=no JobTimeoutUSec=infinity JobRunningTimeoutUSec=infinity JobTimeoutAction=none ConditionResult=yes AssertResult=yes ConditionTimestamp=Mon 2026-11-16 04:34:07 EST ConditionTimestampMonotonic=50070246 AssertTimestamp=Mon 2026-11-16 04:34:07 EST AssertTimestampMonotonic=50070269 Transient=no Perpetual=no StartLimitIntervalUSec=10s StartLimitBurst=5 StartLimitAction=none FailureAction=none SuccessAction=none InvocationID=a65c739cb449408da1b812bbc3828796 CollectMode=inactive DebugInvocation=no Type=dbus lines 1-63