On many hosts I’ve a strange problem: RAM usage increase suddenly (for example +20GB), and then stay this high, until I drop cache (echo 3 > /proc/sys/vm/drop_caches , need to do it several times).
I can’t figure out what is using this memory, as it is NOT reported to by used as “cache” in ‘top’.
The top (ordered by ram usage) before drop_cache: https://prnt.sc/lxd45p (29GB used)
The top after dropping cache: https://prnt.sc/lxd64e (dropped to 5GB)
total used free shared buff/cache available
Mem: 64048 35412 25593 28 3043 27911
Swap: 1021 0 1021
35GB used here instead of < 5GB (3GB buuf/cache only).
zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
default 796G 53.6G 742G - 5% 6% 2.12x ONLINE -
On this host there is even no VM yet.
lxc list
±-----±------±-----±-----±-----±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±-----±------±-----±-----±-----±----------+
Only one storage volume:
lxc storage volume list default
±-------±-----------±------------±--------+
| TYPE | NAME | DESCRIPTION | USED BY |
±-------±-----------±------------±--------+
| custom | references | | 0 |
±-------±-----------±------------±--------+
hi,
I updated it to 3.0.3 shorty after your post, but the ram usage increased again.
In the meantime I found out, that if I use slabtop on the hardware it showed 60 GB used, what is shown on the hardware as cache, but inside the container the dentry usage was tagged as used memory, not as cache.
After I did a echo 2 > /proc/sys/vm/drop_caches and waited 15 min to finish, the cache was emptied and the memory inside the container was free too.
Is there a possibility to limit the dentry space, or get lxd to display the dentry space as cache as in the physical host?