Quote from
lancem on June 8, 2020, 9:09 am
I'm not sure the limiting works.
I set all of my LXCs to 1 GB RAM and 1 vCPU.
If I check the resources using virsh (using my atlassian antlet as an example):
virsh -c lxc:/// atlassian
It shows 1 CPU and 1 GB RAM.
Within the LXC, the usual commands (top, free) all show info from the antsle itself.
But, if I actually use an application in the LXC (e.g. Confluence), it shows it has 2 GB allocated.
According to this:
https://archives.flockport.com/lxc-advanced-guide/
Resource limits would be enforced by cgroups, but, when you're in an LXC antlet, if you do:
df -h
It shows a filesystem mounted to /sys/fs/cgroup, but, on the antsle, there isn't a cgroup for each lxc antlet under that path.
So I don't think you can actually limit the resources of an LXC antlet.
Although, for me, that's the advantage of an LXC antlet -- It runs with the full capability of the antsle and I let the hypervisor worry about the resource allocations.
If I want to limit the resources, I create a KVM antlet.
I'm not sure the limiting works.
I set all of my LXCs to 1 GB RAM and 1 vCPU.
If I check the resources using virsh (using my atlassian antlet as an example):
virsh -c lxc:/// atlassian
It shows 1 CPU and 1 GB RAM.
Within the LXC, the usual commands (top, free) all show info from the antsle itself.
But, if I actually use an application in the LXC (e.g. Confluence), it shows it has 2 GB allocated.
According to this:
https://archives.flockport.com/lxc-advanced-guide/
Resource limits would be enforced by cgroups, but, when you're in an LXC antlet, if you do:
df -h
It shows a filesystem mounted to /sys/fs/cgroup, but, on the antsle, there isn't a cgroup for each lxc antlet under that path.
So I don't think you can actually limit the resources of an LXC antlet.
Although, for me, that's the advantage of an LXC antlet -- It runs with the full capability of the antsle and I let the hypervisor worry about the resource allocations.
If I want to limit the resources, I create a KVM antlet.