/etc/pve/lxc/107.conf
...
memory: 1024
swap: 0
...
/var/lib/lxc/107/config
...
lxc.cgroup.memory.limit_in_bytes = 1073741824
lxc.cgroup.memory.memsw.limit_in_bytes = 1073741824
...
Мне непонятны данные в /proc/meminfo
# cat /proc/meminfo | egrep "^(Mem|Swap|)(Total|Free|Available|Cached):"
MemTotal: 1048576 kB
MemFree: 19556 kB
MemAvailable: 803108 kB
Cached: 783552 kB
SwapCached: 0 kB
SwapTotal: 1048576 kB
SwapFree: 1042168 kB
- откуда взялись 6MB в swap, почему вообще в /proc/meminfo swaptotal равен
memsw.memory_limit_in_bytes
? - периодически увеличивается
memory.memsw.failcnt
. Почему? Что это значит? Доступной памяти постоянно >500MB.
Из документации непонятно: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/sec-memory
memory.limit_in_bytes
sets the maximum amount of user memory (including file cache). If no units are specified, the value is interpreted as bytes. However, it is possible to use suffixes to represent larger units — k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
memory.memsw.limit_in_bytes
sets the maximum amount for the sum of memory and swap usage. If no units are specified, the value is interpreted as bytes. However, it is possible to use suffixes to represent larger units — k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
memory.memsw.failcnt
reports the number of times that the memory plus swap space limit has reached the value set in memory.memsw.limit_in_bytes