To limit the amount of memory supplied to each container, place something similar to the following in the container configuration file:
lxc.cgroup.memory.limit_in_bytes = 5120M
The lxcfs daemon/service/package should be installed, and should be seen to be mounted on /var/lib/lxcfs
Prior to setting the memory limit, unfettered memory useage can be determined with
cat /sys/fs/cgroup/memory/lxc//memory.max_usage_in_bytes
When inside the container, something like 'free -m' should show the memory available to the container.
# free -m total used free shared buff/cache available Mem: 16029 5121 5890 444 5017 10046 Swap: 9535 0 9535