You are not logged in.

#1 2018-01-27 22:32:21

tzhuang
Member
Registered: 2017-05-23
Posts: 45

[Solved] RuntimeDirectorySize seems to have no effect

According to the man page to logind.conf, setting the RuntimeDirectorySize option in /etc/systemd/logind.conf should set the limit on  $XDG_RUNTIME_DIR, but seems to be having no effect for me. I have of course tried re-logging and rebooting, both to no avail.

> echo $XDG_RUNTIME_DIR
/run/user/1000

> cat /etc/systemd/logind.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=100%
RuntimeDirectorySize=8G
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

> df -h

Filesystem      Size  Used Avail Use% Mounted on
...
tmpfs           799M  799M     0 100% /run/user/1000

Last edited by tzhuang (2018-01-28 16:11:59)

Offline

#2 2018-01-27 22:34:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] RuntimeDirectorySize seems to have no effect

tmpfs is limited to half of your ram by default. That's totally separate from logind.

Offline

#3 2018-01-27 23:19:01

tzhuang
Member
Registered: 2017-05-23
Posts: 45

Re: [Solved] RuntimeDirectorySize seems to have no effect

Hmm really? Because 799M is exactly 10% of the allocated RAM  (running on Virtualbox), is the default amount set by RuntimeDirectoySize according to https://wiki.archlinux.org/index.php/pr … te_more.3F

Offline

#4 2018-01-28 00:05:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved] RuntimeDirectorySize seems to have no effect

Ah, yeah, tmpfs is half by default, but systemd mounts that one with a specific size.  As far as I can tell, that should work. Hmm...

Offline

#5 2018-01-28 01:23:56

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [Solved] RuntimeDirectorySize seems to have no effect

I can reduce the value with effect, RuntimeDirectorySize=5% works.  Attempting to increase the value RuntimeDirectorySize=20% no effect.
Working now.
Edit:
100% will not work see https://github.com/systemd/systemd/blob … ser.c#L860
Edit2:
Logging the user out or sending SIGHUP to pid 1 does not seem to cause the cached value to be changed only restarting the system appears to.

Last edited by loqs (2018-01-28 01:55:04)

Offline

#6 2018-01-28 16:13:52

tzhuang
Member
Registered: 2017-05-23
Posts: 45

Re: [Solved] RuntimeDirectorySize seems to have no effect

It was an user error on my part. I was under the impression that tmpfs was physical disk space and assigning it values that was more than the amount of RAM i had (100%, 8G, actual value of ram was 799M). Setting it to 20% worked and gave me the space I needed.

Offline

Board footer

Powered by FluxBB