6

Fresh installation of Ubuntu 16.04.

File /etc/fstab contains no references to /run/user/...

mount prints

...
tmpfs on /run/user/115 type tmpfs (rw,nosuid,nodev,relatime,size=1612068k,mode=700,uid=115,gid=124)
tmpfs on /run/user/1002 type tmpfs (rw,nosuid,nodev,relatime,size=1612068k,mode=700,uid=1002,gid=1002)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1612068k,mode=700,uid=1000,gid=1000)

I need a couple gigabytes more in /run/user/1002.

Where do I tune it?

  • Try to resize /run using the steps described in this answer: askubuntu.com/a/323071/595510. – Mark Yisri Dec 1 '16 at 12:40
  • This answer seems to be outdated. I've got a newer version of OS, no such file. – wl2776 Dec 1 '16 at 12:43
  • Currently I've added a line to /etc/fstab. Will study for manuals to check if it is a correct solution. – wl2776 Dec 1 '16 at 13:33
9

You can increase it by setting RuntimeDirectorySize in /etc/systemd/logind.conf as mentioned here: https://wiki.archlinux.org/index.php/Profile-sync-daemon#I_need_more_memory_to_accommodate_my_profile.2Fprofiles_in_.2Frun.2Fuser.2Fxxxx._How_can_I_allocate_more.3F

The standard way of controlling the size of /run/user is the RuntimeDirectorySize directive in /etc/systemd/logind.conf (see the man page for logind.conf for more). By default, 10% of physical memory is used but one can increase it safely. Remember that tmpfs only consumes what is actually used; the number specified here is just a maximum allowed.

From the logind.conf man page:

RuntimeDirectorySize= Sets the size limit on the $XDG_RUNTIME_DIR runtime directory for each user who logs in. Takes a size in bytes, optionally suffixed with the usual K, G, M, and T suffixes, to the base 1024 (IEC). Alternatively, a numerical percentage suffixed by "%" may be specified, which sets the size limit relative to the amount of physical RAM. Defaults to 10%. Note that this size is a safety limit only. As each runtime directory is a tmpfs file system, it will only consume as much memory as is needed.

You will need to log out and in again for the changes to take effect.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.