<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 21, 2014 at 2:01 PM, Thierry Carrez <span dir="ltr"><<a href="mailto:thierry@openstack.org" target="_blank">thierry@openstack.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">Yuriy Taraday wrote:<br>
> Benchmark included showed on my machine these numbers (average over 100<br>
> iterations):<br>
><br>
> Running 'ip a':<br>
> ip a : 4.565ms<br>
> sudo ip a : 13.744ms<br>
> sudo rootwrap conf ip a : 102.571ms<br>
> daemon.run('ip a') : 8.973ms<br>
> Running 'ip netns exec bench_ns ip a':<br>
> sudo ip netns exec bench_ns ip a : 162.098ms<br>
> sudo rootwrap conf ip netns exec bench_ns ip a : 268.115ms<br>
> daemon.run('ip netns exec bench_ns ip a') : 129.876ms<br>
><br>
> So it looks like running daemon is actually faster than running "sudo".<br>
<br>
</div>That's pretty good! However I fear that the extremely simplistic filter<br>
rule file you fed on the benchmark is affecting numbers. Could you post<br>
results from a realistic setup (like same command, but with all the<br>
filter files normally found on a devstack host ?)<br></blockquote><div><br></div><div>I don't have a devstack host at hands but I gathered all filters from Nova, Cinder and Neutron and got this:</div><div><font face="courier new, monospace"> method : min avg max dev </font></div>
<div><font face="courier new, monospace"> ip a : 3.741ms 4.443ms 7.356ms 500.660us</font></div><div><font face="courier new, monospace"> sudo ip a : 11.165ms 13.739ms 32.326ms 2.643ms</font></div>
<div><font face="courier new, monospace">sudo rootwrap conf ip a : 100.814ms 125.701ms 169.048ms 16.265ms</font></div><div><font face="courier new, monospace"> daemon.run('ip a') : 6.032ms 8.895ms 172.287ms 16.521ms</font></div>
<div><br></div><div>Then I switched back to one file and got:<br><font face="courier new, monospace"> method : min avg max dev </font></div><div><font face="courier new, monospace"> ip a : 4.176ms 4.976ms 22.910ms 1.821ms</font></div>
<div><font face="courier new, monospace"> sudo ip a : 13.240ms 14.730ms 21.793ms 1.382ms</font></div><div><font face="courier new, monospace">sudo rootwrap conf ip a : 79.834ms 104.586ms 145.070ms 15.063ms</font></div>
<div><font face="courier new, monospace"> daemon.run('ip a') : 5.062ms 8.427ms 160.799ms 15.493ms</font></div><div><br></div></div>There is a difference but it looks like it's because of config files parsing, not applying filters themselves.<br clear="all">
<div><br></div>-- <br><br><div>Kind regards, Yuriy.</div>
</div></div>