top/free: Include `tmpfs` mount points disk space use in the `Used RAM` report/value
A recurring issue for lots of Linux users nowadays is that they run out of RAM without understanding where the RAM has gone.
It's due to modern Linux distros (at the very least Fedora and Arch) mounting tmpfs
to /tmp
/run
and /dev/shm
. Other distros are also slowly moving in this direction.
Please include all the tmpfs
mount points usage into the Used RAM
report/value.
For free
:
free
total used free shared buff/cache available
Mem: 16305812 4899648 3786972 2694168 7619192 8371016
Swap: 0 0 0
It could be changed to:
free
total used free shared buff/cache tmpfs available
Mem: 16305812 5899648 3786972 2694168 7619192 1000000 7371016
Swap: 0 0 0
For top
(MiB units):
MiB Mem : 15923.6 total, 3644.7 free, 4836.8 used, 7442.1 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 8121.8 avail Mem
It could be changed to:
MiB Mem : 15923.6 total, 2644.7 free, 5836.8 used, 7442.1 buff/cache 1000.0 tmpfs
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 7121.8 avail Mem
A much bigger issue is that the Linux kernel doesn't treat tmpfs
as used RAM and Linux kernel developers seemingly don't care: https://bugzilla.kernel.org/show_bug.cgi?id=201675
Edited by Artem S. Tashkinov