<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using CGroups with libvirt and LXC/KVM guests in Fedora 12</title>
	<atom:link href="http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/feed/" rel="self" type="application/rss+xml" />
	<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/</link>
	<description>Writing about photography, open source software, virtualization &#38; more</description>
	<lastBuildDate>Sun, 13 May 2012 09:58:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Vineet</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-25272</link>
		<dc:creator>Vineet</dc:creator>
		<pubDate>Tue, 01 May 2012 20:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-25272</guid>
		<description>Hi Daniel,
I&#039;ve use cgroups on CentOS and I&#039;ve noticed the cgroup hierarchy for libvirt that you mentioned. However, when I install all the packages for kubuntu, I noticed that the same structure does not get auto-mounted. I checked libvirtd.conf/qemu.conf and cgconfig.conf, all look same. Is there something i&#039;m missing to get the same hierarchy on kubuntu? Im using kubuntu 12.04 and libvirt 0.9.8..</description>
		<content:encoded><![CDATA[<p>Hi Daniel,<br />
I&#8217;ve use cgroups on CentOS and I&#8217;ve noticed the cgroup hierarchy for libvirt that you mentioned. However, when I install all the packages for kubuntu, I noticed that the same structure does not get auto-mounted. I checked libvirtd.conf/qemu.conf and cgconfig.conf, all look same. Is there something i&#8217;m missing to get the same hierarchy on kubuntu? Im using kubuntu 12.04 and libvirt 0.9.8..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Berrange</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-25179</link>
		<dc:creator>Daniel Berrange</dc:creator>
		<pubDate>Wed, 30 Nov 2011 15:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-25179</guid>
		<description>A task is *always* in exactly one cgroup. Init starts off in the root cgroup. New tasks that are started will be placed in the same cgroup as their parent. It is at administrator/application discretion to move tasks to non-root cgroups.</description>
		<content:encoded><![CDATA[<p>A task is *always* in exactly one cgroup. Init starts off in the root cgroup. New tasks that are started will be placed in the same cgroup as their parent. It is at administrator/application discretion to move tasks to non-root cgroups.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philby</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-25178</link>
		<dc:creator>Philby</dc:creator>
		<pubDate>Wed, 30 Nov 2011 14:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-25178</guid>
		<description>Daniel, excellent article. A general question. With the following 

mount {
        cpu = /cgroup/cgroup0;
        cpuset = /cgroup/cgroup0;
        blkio = /cgroup/cgroup0;
        memory = /cgroup/cgroup0;
}

in cgconfig.conf, when I do a 
#cat cgroup/cgroup0/tasks
3
4
5
371

I can already see tasks in the cgroup even though I did not echo in the pid. How can I prevent tasks being added by default?</description>
		<content:encoded><![CDATA[<p>Daniel, excellent article. A general question. With the following </p>
<p>mount {<br />
        cpu = /cgroup/cgroup0;<br />
        cpuset = /cgroup/cgroup0;<br />
        blkio = /cgroup/cgroup0;<br />
        memory = /cgroup/cgroup0;<br />
}</p>
<p>in cgconfig.conf, when I do a<br />
#cat cgroup/cgroup0/tasks<br />
3<br />
4<br />
5<br />
371</p>
<p>I can already see tasks in the cgroup even though I did not echo in the pid. How can I prevent tasks being added by default?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Berrange</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-20883</link>
		<dc:creator>Daniel Berrange</dc:creator>
		<pubDate>Fri, 15 Jul 2011 11:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-20883</guid>
		<description>I&#039;m not familiar enough with &#039;tc&#039; to know what is going wrong for you there. There is, however, work taking place in libvirt to add in explicit support for integration with &#039;tc&#039; for network I/O controls. We&#039;re not actually planning to use cgroups for this, since network controls really want to be per-VM network interfaces, not QEMU as a whole.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not familiar enough with &#8216;tc&#8217; to know what is going wrong for you there. There is, however, work taking place in libvirt to add in explicit support for integration with &#8216;tc&#8217; for network I/O controls. We&#8217;re not actually planning to use cgroups for this, since network controls really want to be per-VM network interfaces, not QEMU as a whole.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gianluca</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-20252</link>
		<dc:creator>Gianluca</dc:creator>
		<pubDate>Mon, 04 Jul 2011 13:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-20252</guid>
		<description>Question on Network I/O policy on guests
Supose I have a rh el 6.1 or Fedora 15 host.
Can I already use it for capping bandwith on guest?
If so, what would be the device to use for tc comamnds?
In my case I have:
eth2 and eth3 that are part of bond0
vlan on bond0 that originates bond0.66
bridge on bond0.66 called brvlan66
guest that is on brvlan66 and, from a host point of view is using vnet3 device.

Tried this:
tc qdisc add dev vnet3 root handle 1: htb  default 26
tc class add dev vnet3 parent 1: classid 1:11 htb rate 1024kbit
tc class add dev vnet3 parent 1:11 classid 1:20 htb rate 1024kbit ceil 1024kbit prio 0
tc qdisc add dev vnet3 parent 1:20 handle 20: sfq perturb 10

Then if my vm has a pid of 2685
cgcreate -g net_cls:/w7x86lim
cgset -r net_cls.classid=0x10014 w7x86lim
echo 2685 &gt; /cgroup/net_cls/w7x86lim/tasks 

But the network bandwith seems not limited...
Also tried to put the into the same cgroup the &quot;virtual cpu process&quot; (correct?) that ha pid 2700, but no effect...

Any hint of steps above and possible configuration to achieve network bandwith capping on rh el 6.1 and/or Fedora15?</description>
		<content:encoded><![CDATA[<p>Question on Network I/O policy on guests<br />
Supose I have a rh el 6.1 or Fedora 15 host.<br />
Can I already use it for capping bandwith on guest?<br />
If so, what would be the device to use for tc comamnds?<br />
In my case I have:<br />
eth2 and eth3 that are part of bond0<br />
vlan on bond0 that originates bond0.66<br />
bridge on bond0.66 called brvlan66<br />
guest that is on brvlan66 and, from a host point of view is using vnet3 device.</p>
<p>Tried this:<br />
tc qdisc add dev vnet3 root handle 1: htb  default 26<br />
tc class add dev vnet3 parent 1: classid 1:11 htb rate 1024kbit<br />
tc class add dev vnet3 parent 1:11 classid 1:20 htb rate 1024kbit ceil 1024kbit prio 0<br />
tc qdisc add dev vnet3 parent 1:20 handle 20: sfq perturb 10</p>
<p>Then if my vm has a pid of 2685<br />
cgcreate -g net_cls:/w7x86lim<br />
cgset -r net_cls.classid=0&#215;10014 w7x86lim<br />
echo 2685 &gt; /cgroup/net_cls/w7x86lim/tasks </p>
<p>But the network bandwith seems not limited&#8230;<br />
Also tried to put the into the same cgroup the &#8220;virtual cpu process&#8221; (correct?) that ha pid 2700, but no effect&#8230;</p>
<p>Any hint of steps above and possible configuration to achieve network bandwith capping on rh el 6.1 and/or Fedora15?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Berrange</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-10980</link>
		<dc:creator>Daniel Berrange</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-10980</guid>
		<description>cgroups have been around since about 2.6.24 kernel, but not all the functionality was present at that time - stuff is added all the time. There&#039;s no cap or weight parameters to virsh schedinfo for KVM.  There is only the &#039;cpu_shares&#039; parameter, which is a tunable for the native Linux CFS scheduler.  This is basically a relative prioritization metric. So if you have two guests, one with cpu_shares  1024 and the other with cpu_shares 4096, and both are contending for the CPU, one will get x4 the CPU runtime of the other.</description>
		<content:encoded><![CDATA[<p>cgroups have been around since about 2.6.24 kernel, but not all the functionality was present at that time &#8211; stuff is added all the time. There&#8217;s no cap or weight parameters to virsh schedinfo for KVM.  There is only the &#8216;cpu_shares&#8217; parameter, which is a tunable for the native Linux CFS scheduler.  This is basically a relative prioritization metric. So if you have two guests, one with cpu_shares  1024 and the other with cpu_shares 4096, and both are contending for the CPU, one will get x4 the CPU runtime of the other.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Berrange</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-10979</link>
		<dc:creator>Daniel Berrange</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-10979</guid>
		<description>The &quot;API&quot; the kernel exposes for cgroups, is simply a virtual filesystem with a bunch of files you read/write to. There is a more formal userspace API provided by the libcgroup project that takes care of some of the crufty parts for you.</description>
		<content:encoded><![CDATA[<p>The &#8220;API&#8221; the kernel exposes for cgroups, is simply a virtual filesystem with a bunch of files you read/write to. There is a more formal userspace API provided by the libcgroup project that takes care of some of the crufty parts for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zvi dubitzky</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-10561</link>
		<dc:creator>zvi dubitzky</dc:creator>
		<pubDate>Mon, 14 Feb 2011 16:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-10561</guid>
		<description>1. starting at what Linux kernel version does the cgroup work ok ?

2. What is the meaning of the &#039;cap&#039; parameter in the schedinfo virsh command  (what are the units and range of values ) and what is the &#039;weigth&#039; parameter .I did not find any documentation</description>
		<content:encoded><![CDATA[<p>1. starting at what Linux kernel version does the cgroup work ok ?</p>
<p>2. What is the meaning of the &#8216;cap&#8217; parameter in the schedinfo virsh command  (what are the units and range of values ) and what is the &#8216;weigth&#8217; parameter .I did not find any documentation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis A. Silva</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-9336</link>
		<dc:creator>Luis A. Silva</dc:creator>
		<pubDate>Mon, 24 Jan 2011 22:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-9336</guid>
		<description>API to develop an aplication on C/C++ with cgroups

Hi All,

I want to develop an application in C/C++ that allows to make calls directly to cgroups, do you can make Cgroups operations from a program in C/C++?

if possible, there is an API to do this, wich packages i should install? or how i do this? 

or someone who can help me on this issue?

Regards,
Thanks
adansilva05@hotmail.com</description>
		<content:encoded><![CDATA[<p>API to develop an aplication on C/C++ with cgroups</p>
<p>Hi All,</p>
<p>I want to develop an application in C/C++ that allows to make calls directly to cgroups, do you can make Cgroups operations from a program in C/C++?</p>
<p>if possible, there is an API to do this, wich packages i should install? or how i do this? </p>
<p>or someone who can help me on this issue?</p>
<p>Regards,<br />
Thanks<br />
<a href="mailto:adansilva05@hotmail.com">adansilva05@hotmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Berrange</title>
		<link>http://berrange.com/posts/2009/12/03/using-cgroups-with-libvirt-and-lxckvm-guests-in-fedora-12/comment-page-1/#comment-2537</link>
		<dc:creator>Daniel Berrange</dc:creator>
		<pubDate>Wed, 18 Aug 2010 14:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.berrange.com/?p=12#comment-2537</guid>
		<description>There is no configuration required for the devices cgroup. libvirt automatically adds a &#039;deny all&#039; rule for every guest. It then adds individual block devices that are associated with guest disks, along with a couple of common devices (/dev/null, etc)</description>
		<content:encoded><![CDATA[<p>There is no configuration required for the devices cgroup. libvirt automatically adds a &#8216;deny all&#8217; rule for every guest. It then adds individual block devices that are associated with guest disks, along with a couple of common devices (/dev/null, etc)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

