WANG Cheng D
2014-Jan-15 05:49 UTC
[libvirt-users] Does libvirt lxc driver support "cpuset" attribute?
Dear all I allocate only one vcpu for the container by the following statement, that is, I want to pin the vcpu to physical core "2". <vcpu placement='static' cpuset="2" >1</vcpu> My host has 4 physical cores. Before test, all the 4 cores are idle. After I run 4 processes in the container, I found all the 4 cores in the host are 100% used. That is, the container is pinned to all the available physical CPUs. This is not what I want. My libvirt version is 1.0.3. Although "vcpupin" element also can be used to pin vcpu, according to http://libvirt.org/formatdomain.html , "vcpupin" element is not supported by lxc driver. I wonder if it is the older version of libvirt that causes the problem? Thank you in advance. Cheng Wang
Daniel P. Berrange
2014-Jan-15 10:48 UTC
Re: [libvirt-users] Does libvirt lxc driver support "cpuset" attribute?
On Wed, Jan 15, 2014 at 05:49:23AM +0000, WANG Cheng D wrote:> Dear all > > I allocate only one vcpu for the container by the following > statement, that is, I want to pin the vcpu to physical core "2". > <vcpu placement='static' cpuset="2" >1</vcpu> > My host has 4 physical cores. Before test, all the 4 cores are > idle. After I run 4 processes in the container, I found all the > 4 cores in the host are 100% used. That is, the container is > pinned to all the available physical CPUs. This is not what I > want. > My libvirt version is 1.0.3.Support for cpuset with LXC was added in 1.0.4 I'm afraid. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
WANG Cheng D
2014-Jan-16 01:24 UTC
Re: [libvirt-users] Does libvirt lxc driver support "cpuset" attribute?
Dear Daniel, Thank you for the information. :-) Cheng On Wed, Jan 15, 2014 at 05:49:23AM +0000, WANG Cheng D wrote:> Dear all > > I allocate only one vcpu for the container by the following statement, > that is, I want to pin the vcpu to physical core "2". > <vcpu placement='static' cpuset="2" >1</vcpu> My host has 4 physical > cores. Before test, all the 4 cores are idle. After I run 4 processes > in the container, I found all the > 4 cores in the host are 100% used. That is, the container is pinned to > all the available physical CPUs. This is not what I want. > My libvirt version is 1.0.3.Support for cpuset with LXC was added in 1.0.4 I'm afraid. Daniel --