#TIL #cgroups' memory.current metric includes any #pagecache entries that a process in the #cgroup caused to be inserted, even if other processes are accessing it too.

This means that anything related to #systemd unit's memory accounting also inherits this property.

If your #emacs systemd unit reports insane memory usage (usually ~10G for me), this is why.
It's actually not emacs' fault for once ;)

#linux #kernel #MemoryAccounting