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 a Cgroup 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/spk
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
ExitType=main
Restart=no
RestartMode=normal
NotifyAccess=none
RestartUSec=100ms
RestartSteps=0
RestartMaxDelayUSec=infinity
RestartUSecNext=100ms
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
TimeoutAbortUSec=1min 30s
TimeoutStartFailureMode=terminate
TimeoutStopFailureMode=terminate
RuntimeMaxUSec=infinity
RuntimeRandomizedExtraUSec=0
WatchdogUSec=0
WatchdogTimestampMonotonic=0
RootDirectoryStartOnly=no
RemainAfterExit=no
GuessMainPID=yes
MainPID=3134
ControlPID=0
BusName=org.kde.KWinWrapper
FileDescriptorStoreMax=0
NFileDescriptorStore=0
FileDescriptorStorePreserve=restart
StatusErrno=0
Result=success
ReloadResult=success
CleanResult=success
LiveMountResult=success
UID=[not set]
GID=[not set]
NRestarts=0
OOMPolicy=stop
ReloadSignal=1
ExecMainStartTimestamp=Mon 2026-11-16 04:34:07 EST
ExecMainStartTimestampMonotonic=50070784
ExecMainExitTimestampMonotonic=0
ExecMainHandoffTimestamp=Mon 2026-11-16 04:34:07 EST
ExecMainHandoffTimestampMonotonic=50074908
ExecMainPID=3134
ExecMainCode=0
ExecMainStatus=0
ExecStart={ path=/usr/bin/kwin_wayland_wrapper ; argv[]=/usr/bin/kwin_wayland_wrapper --xwayland ; ignore_errors=no ; start_time=[Mon 2026-11-16 04:34:07 EST] ; stop_time=[n/a] ; pid=3134 ; code=(null) ; status=0/0 }
ExecStartEx={ path=/usr/bin/kwin_wayland_wrapper ; argv[]=/usr/bin/kwin_wayland_wrapper --xwayland ; flags= ; start_time=[Mon 2026-11-16 04:34:07 EST] ; stop_time=[n/a] ; pid=3134 ; code=(null) ; status=0/0 }
Slice=session.slice
ControlGroup=/user.slice/user-1000.slice/user@1000.service/session.slice/plasma-kwin_wayland.service
ControlGroupId=9462
MemoryCurrent=[not set]
MemoryPeak=[not set]
MemorySwapCurrent=[not set]
MemorySwapPeak=[not set]
MemoryZSwapCurrent=[not set]
MemoryAvailable=16312848384
EffectiveMemoryMax=16312848384
EffectiveMemoryHigh=16312848384
CPUUsageNSec=148705090000
TasksCurrent=44
EffectiveTasksMax=18590
IPIngressBytes=[no data]
IPIngressPackets=[no data]
IPEgressBytes=[no data]
IPEgressPackets=[no data]
IOReadBytes=[not set]
IOReadOperations=[not set]
IOWriteBytes=[not set]
IOWriteOperations=[not set]
OOMKills=0
ManagedOOMKills=0
Delegate=no
CPUWeight=[not set]
StartupCPUWeight=[not set]
CPUQuotaPerSecUSec=infinity
CPUQuotaPeriodUSec=infinity
IOAccounting=no
IOWeight=[not set]
StartupIOWeight=[not set]
MemoryAccounting=yes
MemoryMin=0
MemoryLow=0
StartupMemoryLow=0
MemoryHigh=infinity
StartupMemoryHigh=infinity
MemoryMax=infinity
StartupMemoryMax=infinity
MemorySwapMax=0
StartupMemorySwapMax=infinity
MemoryZSwapMax=0
StartupMemoryZSwapMax=infinity
MemoryZSwapWriteback=yes
DevicePolicy=auto
TasksAccounting=yes
TasksMax=18590
IPAccounting=no
ManagedOOMSwap=auto
ManagedOOMMemoryPressure=auto
ManagedOOMMemoryPressureLimit=0
ManagedOOMMemoryPressureDurationUSec=[not set]
ManagedOOMPreference=none
MemoryPressureWatch=auto
MemoryPressureThresholdUSec=200ms
CPUPressureWatch=auto
CPUPressureThresholdUSec=200ms
IOPressureWatch=auto
IOPressureThresholdUSec=200ms
CoredumpReceive=no
UMask=0022
LimitCPU=infinity
LimitCPUSoft=infinity
LimitFSIZE=infinity
LimitFSIZESoft=infinity
LimitDATA=infinity
LimitDATASoft=infinity
LimitSTACK=infinity
LimitSTACKSoft=8388608
LimitCORE=infinity
LimitCORESoft=infinity
LimitRSS=infinity
LimitRSSSoft=infinity
LimitNOFILE=524288
LimitNOFILESoft=1024
LimitAS=infinity
LimitASSoft=infinity
LimitNPROC=61969
LimitNPROCSoft=61969
LimitMEMLOCK=8388608
LimitMEMLOCKSoft=8388608
LimitLOCKS=infinity
LimitLOCKSSoft=infinity
LimitSIGPENDING=61969
LimitSIGPENDINGSoft=61969
LimitMSGQUEUE=819200
LimitMSGQUEUESoft=819200
LimitNICE=0
LimitNICESoft=0
LimitRTPRIO=0
LimitRTPRIOSoft=0
LimitRTTIME=infinity
LimitRTTIMESoft=infinity
WorkingDirectory=!/home/spk
RootEphemeral=no
OOMScoreAdjust=200
CoredumpFilter=0x33
Nice=0
IOSchedulingClass=2
IOSchedulingPriority=4
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
CPUAffinityFromNUMA=no
NUMAPolicy=n/a
TimerSlackNSec=50000
CPUSchedulingResetOnFork=no
NonBlocking=no
StandardInput=null
StandardOutput=journal
StandardError=inherit
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
SyslogPriority=30
SyslogLevelPrefix=yes
SyslogLevel=6
SyslogFacility=3
LogLevelMax=-1
LogRateLimitIntervalUSec=0
LogRateLimitBurst=0
SecureBits=0
CapabilityBoundingSet=cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner cap_sys_module cap_sys_rawio cap_sys_chroot cap_sys_ptrace cap_sys_pacct cap_sys_admin cap_sys_boot cap_sys_nice cap_sys_resource cap_sys_time cap_sys_tty_config cap_mknod cap_lease cap_audit_write cap_audit_control cap_setfcap cap_mac_override cap_mac_admin cap_syslog cap_wake_alarm cap_block_suspend cap_audit_read cap_perfmon cap_bpf cap_checkpoint_restore
DynamicUser=no
SetLoginEnvironment=no
RemoveIPC=no
PrivateTmp=no
PrivateTmpEx=no
PrivateDevices=no
ProtectClock=no
ProtectKernelTunables=no
ProtectKernelModules=no
ProtectKernelLogs=no
ProtectControlGroups=no
ProtectControlGroupsEx=no
PrivateNetwork=no
PrivateUsers=no
PrivateUsersEx=no
PrivateMounts=no
PrivateIPC=no
PrivatePIDs=no
ProtectHome=no
ProtectSystem=no
SameProcessGroup=no
UtmpMode=init
IgnoreSIGPIPE=yes
NoNewPrivileges=no
SystemCallErrorNumber=2147483646
LockPersonality=no
RuntimeDirectoryPreserve=no
RuntimeDirectoryMode=0755
StateDirectoryMode=0755
StateDirectoryAccounting=no
StateDirectoryQuota=[not set]
CacheDirectoryMode=0755
CacheDirectoryAccounting=no
CacheDirectoryQuota=[not set]
LogsDirectoryMode=0755
LogsDirectoryAccounting=no
LogsDirectoryQuota=[not set]
ConfigurationDirectoryMode=0755
TimeoutCleanUSec=infinity
MemoryDenyWriteExecute=no
RestrictRealtime=no
RestrictSUIDSGID=no
RestrictNamespaces=no
DelegateNamespaces=18446744073709551615
MountAPIVFS=no
BindLogSockets=no
KeyringMode=inherit
ProtectProc=default
ProcSubset=all
ProtectHostname=no
PrivateBPF=no
MemoryKSM=no
MemoryTHP=inherit
RootImagePolicy=root=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:usr=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:home=encrypted+encryptedwithintegrity+unprotected+absent:srv=encrypted+encryptedwithintegrity+unprotected+absent:tmp=encrypted+encryptedwithintegrity+unprotected+absent:var=encrypted+encryptedwithintegrity+unprotected+absent
MountImagePolicy=root=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:usr=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:home=encrypted+encryptedwithintegrity+unprotected+absent:srv=encrypted+encryptedwithintegrity+unprotected+absent:tmp=encrypted+encryptedwithintegrity+unprotected+absent:var=encrypted+encryptedwithintegrity+unprotected+absent
ExtensionImagePolicy=root=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:usr=verity+signed+encrypted+encryptedwithintegrity+unprotected+absent:home=encrypted+encryptedwithintegrity+unprotected+absent:srv=encrypted+encryptedwithintegrity+unprotected+absent:tmp=encrypted+encryptedwithintegrity+unprotected+absent:var=encrypted+encryptedwithintegrity+unprotected+absent
KillMode=control-group
KillSignal=15
RestartKillSignal=15
FinalKillSignal=9
SendSIGKILL=yes
SendSIGHUP=no
WatchdogSignal=6
You must log in or register to comment.

