<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>Speaking of cgroup behavior, you reminded me, I have an open question that nobody managed to pick up on <span style='font-family:"Courier New"'>unix.stackexchange.com</span> regarding <span style='font-family:"Courier New"'>blkio</span> not working as expected, maybe you can take a stab at it...<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I've got 2 LXC containers with these cgroup settings:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>lxc.cgroup.blkio.weight = 200<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>lxc.cgroup.cpu.shares = 200<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>  and another container with:<o:p></o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>lxc.cgroup.blkio.weight = 800<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>lxc.cgroup.cpu.shares = 800<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I have verified in <span style='font-family:"Courier New"'>/sys/fs/cgroup/blkio/lxc/<container-name>/blkio.weight</span> is indeed set to 200 on the host OS.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I have verified that <span style='font-family:"Courier New"'>cpu.shares</span> are indeed split up, 80% to container 1 and 20% to container 2.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>But when I run this command in both containers:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'># write a 10GB file to disk<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>dd bs=1M count=10000 if=/dev/zero of=1test conv=fdatasync<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I ran a similar test on reads…:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>davidparks21@test-cgroups1:/tmp$ time sh -c "dd if=1test of=/dev/null bs=1M"<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>10000+0 records in<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>10000+0 records out<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>10485760000 bytes (10 GB) copied, 37.9176 s, 277 MB/s<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>real    0m37.939s<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>user    0m0.004s<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>sys     0m24.306s<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>The IO speeds see in iotop on the host OS are virtually the same between the two containers.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I expected to see container 2 command 80% of the IO access in this case.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: Serge Hallyn [mailto:serge.hallyn@ubuntu.com] <br>Sent: Saturday, April 13, 2013 12:22 AM<br>To: David Parks<br>Cc: lxc-users@lists.sourceforge.net<br>Subject: Re: [Lxc-users] Very odd lxc behavior</p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Quoting David Parks (<a href="mailto:davidparks21@yahoo.com"><span style='color:windowtext;text-decoration:none'>davidparks21@yahoo.com</span></a>):<o:p></o:p></p><p class=MsoPlainText>> Vanilla 12.10 Ubuntu server:<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> root@atlas01:~# sudo lxc-version<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> lxc version: 0.8.0-rc1<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> I may very well have accidentally tried to start the same container <o:p></o:p></p><p class=MsoPlainText>> twice, I think I fat-fingered something just before encountering the <o:p></o:p></p><p class=MsoPlainText>> issue, and I've never had it happen on any of our other boxes. Anyway, <o:p></o:p></p><p class=MsoPlainText>> it's of no real consequence to me now as I cleared it easily enough, <o:p></o:p></p><p class=MsoPlainText>> but I thought it worth mentioning.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Thanks.  Yeah 0.8.0 didn't yet have the new cgroup behavior, I don't think.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-serge<o:p></o:p></p></div></body></html>