[pve-devel] Reduce LXC limits: memory and root disk

c.monty at web.de c.monty at web.de
Mon Dec 25 09:44:52 CET 2017


Hello!

I'm running several "mini" services on single LXC installations based on 
Alpine Linux, e.g. HAProxy, Radicale.
The resource requirements are very low with regards to memory and root disk.

Let's take a LXC container running HAProxy (version 1.7.9 2017/08/18) on 
Alpine Linux (3.6.2) with
1GB root disk
32MB Memory
16MB Swap

The avg. memory usage of LXC running HAProxy is 10MB according to WebUI.
Checking the amount of free and used system memory in LXC shows:
vm102-haproxy:~# free
              total       used       free     shared    buffers cached
Mem:      16344092   16109216     234876     243640 981768      10120
-/+ buffers/cache:   15117328    1226764
Swap:      1642492     798284     844208

The allocated disk space is:
vm102-haproxy:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/loop0              975.9M    165.2M    743.5M  18% /
/dev/loop0              975.9M    165.2M    743.5M  18% /
none                    492.0K         0    492.0K   0% /dev
run                       7.8G     60.0K      7.8G   0% /run
shm                       7.8G         0      7.8G   0% /dev/shm
udev                      7.8G         0      7.8G   0% /dev/null
udev                      7.8G         0      7.8G   0% /dev/zero
udev                      7.8G         0      7.8G   0% /dev/full
udev                      7.8G         0      7.8G   0% /dev/urandom
udev                      7.8G         0      7.8G   0% /dev/random
udev                      7.8G         0      7.8G   0% /dev/tty

Questions:
Can you consider to reduce the current limits for root disk (1GB) and 
memory (32MB) when defining a LXC container?
Why is the displayed memory usage in WebUI different to output of /free/?

THX



More information about the pve-devel mailing list