0

I'm running Linux Mint 20. I often encounter low memory situations. Today I do not understand why available is so low. As per What is the meaning of `shared` memory in the `free` command? shared is sum of tmpfs systems, but my sum is times less.

free -hw
              total        used        free      shared     buffers       cache   available
Mem:           15Gi       6,2Gi       4,6Gi       3,9Gi        26Mi       4,5Gi       5,0Gi
Swap:            0B          0B          0B


free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       5,9Gi       5,1Gi       3,7Gi       4,4Gi       5,4Gi
Swap:            0B          0B          0B


df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7,7G     0  7,7G   0% /dev
tmpfs           1,6G  1,7M  1,6G   1% /run
tmpfs           7,7G  254M  7,5G   4% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           7,7G     0  7,7G   0% /sys/fs/cgroup
cache           786M  247M  540M  32% /home/alex/.cache
cache           158M     0  158M   0% /home/root/.cache
rd               16G  460M   15G   3% /media/ramdrive
tmpfs           1,6G  176K  1,6G   1% /run/user/1000

rd is tpmfs and cache(s) are also tmpfs for performance/low disk wearout, still it is ~1Gb total in used, not 3.7. Also why cache per free can be so high? (I've just dropped caches).

ADDED: right after I posted the question I decided to add free -hw and shared grew by 0.2Gb while df output stayed the same.

ADDED 2: In https://linoxide.com/command-to-show-shared-memory-settings/ it is shown to use ipcs command to show shared memory. In my case the sum is ~880Mb. How does it correspond to /proc/meminfo Shmem (it is same as free outputs) and info on tmpfs systems? The sum from ipcs does not look like any number produced by those. I was not able to find answer by web search.

Martian2020
  • 1,039
  • 7
  • 20
  • Despite the claim in `man 5 proc`, mot all sources of shared memory appear in tmpfs filesystems. See the comments on https://unix.stackexchange.com/questions/307015/what-is-the-meaning-of-shared-memory-in-the-free-command/417508#417508, especially https://lists.kernelnewbies.org/pipermail/kernelnewbies/2013-July/008628.html – Gilles 'SO- stop being evil' Sep 25 '21 at 08:10
  • @Gilles, I've read links your mentioned, still I do not understand how 3.7Gb are used as ipc take only 0.8Gb and all tmpfs only 1Gb. One remaining hint is some metadata... How can I try to shared and cache w/out full system restart? – Martian2020 Sep 25 '21 at 16:37

0 Answers0