Hacker News new | ask | show | jobs
by NekkoDroid 329 days ago
> If /tmp/ fills up your RAM

tmpfs by default only uses up to half your available RAM unless specified otherwise. So this isn't really a consideration unless you configure it to be a consideration you need to take into account.

(Systemd also really recently (v258) added quotas to tmpfs and IIRC its set by default to 80% of the tmpfs, so it is even less of a problem)

1 comments

  $ grep tmpfs /proc/mounts
  udev /dev devtmpfs [..]
  tmpfs /run tmpfs [..]
  tmpfs /run/lock tmpfs [..]
  tmpfs /run/shm tmpfs [..]
  tmpfs /tmp tmpfs [..]
  cgroup_root /sys/fs/cgroup tmpfs  [..]
If each of those can take up 50% of ram, this is still a big problem. I don't know what defaults Debian uses nowadays, because I have TMPFS_SIZE=1% in /etc/default/tmpfs so my system is explicitly non-default.
Sure, but counterpoint: if a process is already writing that much in multiple of those directories, who knows what its writing in other directories that aren't backed by RAM.