So CPU limit is basically the maximum number of cores a container can utilize.
That can be misleading about the actual power available to the CT.
You can simply use KVM if you want full virtualization. IMHO CPU limit work greats, and there is no real reason to limit the number of visible CPUs for containers.
You can simply use KVM if you want full virtualization. IMHO CPU limit work greats, and there is no real reason to limit the number of visible CPUs for containers.
I disagree Dietmar. When containers are sold as vps, there should be a clear understanding of cpu resources for the customers.
AFAIK when LXD will be stable, it'll, work this way, also with the possibility to limit IOPS (when it's finished). Are there any plans to integrate LXD and with it LXC 2.0 ?
Are there any plans to integrate LXD and with it LXC 2.0 ?
I would accept patches if someone finds a better way to do it.
LXD uses LXC, so if LXD can do it, we can also do it. But so far I have not seen any patches.
Dietmar I'm not sure about LXD, but Ubuntu provides the desired functionality through lxcfs:
We also use the same lxcfs.
LXCFS is a simple userspace filesystem designed to work around some current limitations of the Linux kernel.
Specifically, it's providing two main things
- A cgroupfs-like tree which is container aware and works using CGManager.
- A set of files which can be bind-mounted over their /proc originals
to provide CGroup-aware values.
@gkovacs You can assign single cores to lxc containers with "lxc.cgroup.cpuset.cpus = 2,3" for cores 3 and 4 in /etc/pve/lxc/<ID>.conf and it will correctly display only 2 cpus in /proc/cpuinfo.
I recently stumbled across this issue as facter for puppet reported always all cores of the host system.
Are there any other options to limit the displayed amount of cpus in /proc/cpuinfo? Lxcfs seems only to use cpusets