cozy / cozy-home-v2

This repository was part of CozyV2 which has been deprecated
https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3
GNU Affero General Public License v3.0
94 stars 53 forks source link

RAM presentation #793

Open Zykino opened 8 years ago

Zykino commented 8 years ago

When I go to "My Apps / State" page I can see the disk usage and the RAM used on the server.

Now I see that my RAM consumption is at 1893/2070 Mo which is high. Then I use htop command on my Server and I see around 800 Mo is used and the rest is Buffer or Cached data. I would prefer to have the second value in the interface since it's a real answer to "Can I Install more app or not ?".

PS: you can see http://www.linuxatemyram.com/ for more details on this subject

Zykino commented 8 years ago

I did some tests with your way of using the commands to have the free RAM and it does not look good on my ArchLinux. Because the output of free isn't the same as in Debian / Ubuntu cozy use node's memory checker (which is really bad if I believe the comments).

[zykino]$ LC_ALL=C free
              total        used        free      shared  buff/cache   available
Mem:        2070948     1102880      308804       36796      659264      667216
Swap:             0           0           0
[zykino]$ LC_ALL=C free | grep /cache
              total        used        free      shared  buff/cache   available
[zykino]$ LC_ALL=C free | grep /cache | cut -d':' -f2 | sed -e 's/^ [0-9] *//'
              total        used        free      shared  buff/cache   available

Maybe the output of cat /proc/meminfo is more homogeneous across linux systems. My output :

MemTotal:        2070948 kB
MemFree:          308816 kB
MemAvailable:     667740 kB
Buffers:           88612 kB
Cached:           486268 kB
SwapCached:            0 kB
Active:          1407052 kB
Inactive:         235820 kB
Active(anon):    1093340 kB
Inactive(anon):    11448 kB
Active(file):     313712 kB
Inactive(file):   224372 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       1310716 kB
HighFree:         118084 kB
LowTotal:         760232 kB
LowFree:          190732 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:       1068024 kB
Mapped:            74632 kB
Shmem:             36796 kB
Slab:              99940 kB
SReclaimable:      84892 kB
SUnreclaim:        15048 kB
KernelStack:        2376 kB
PageTables:         6804 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1035472 kB
Committed_AS:    2520592 kB
VmallocTotal:     245760 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB