<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 26, 2013 at 11:34 AM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</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="im">On 07/25/2013 04:21 PM, Joe Gordon 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">
Hi All,<br>
<br>
We have recently hit some performance issues with nova-network.  It<br>
turns out the root cause of this was we do roughly 20 rootwrapped shell<br>
commands, many inside of global locks.<br>
(<a href="https://bugs.launchpad.net/oslo/+bug/1199433" target="_blank">https://bugs.launchpad.net/<u></u>oslo/+bug/1199433</a>)<br>
<br>
It turns out starting python itself, has a fairly significant overhead<br>
when compared to the run time of many of the binary commands we execute.<br>
<br>
For example:<br>
<br>
$ time python -c "print 'test'"<br>
test<br>
<br>
real0m0.023s<br>
user0m0.016s<br>
sys0m0.004s<br>
<br>
<br>
$ time ip a<br>
<...><br>
<br>
real0m0.003s<br>
user0m0.000s<br>
sys0m0.000s<br>
<br>
<br>
While we have removed the extra overhead of using entry points, we are<br>
now hitting the overhead of just shelling out to python.<br>
</blockquote>
<br></div>
Hey Joe,<br>
<br>
Just ask a question of you personally, off list... I was curious about the above statement about entry points. Could you elaborate a bit there? I thought OpenStack had moved *to* using entry points with stevedore?<br></blockquote>

<div><br></div><div>Turns out this wasn't off the list.  So I will answer on the list.</div><div><br></div><div>I am not sure about how stevadore fits into this, but the issue is related to 'import pkg_resources' and how the binaries are built from the 'cmd' files.   It looks like nova doesn't use stevadore for that (yet?). It turns out pkg_resources scans your entire python environment in part to make it possible to have multiple versions of packages installed, but it looks like pip doesn't support that anyway so it just slows things down and provides us no benefit.<span style="color:rgb(51,51,51);font-family:'Ubuntu Mono',monospace;font-size:12px;line-height:18px"> </span></div>

<div><br></div><div>You can see the issue by going into devstack and running "time python -c 'import pkg_resouces'"</div><div><br></div><div>This thread may shine more light on what we saw: <a href="http://mail.python.org/pipermail/distutils-sig/2013-July/021924.html">http://mail.python.org/pipermail/distutils-sig/2013-July/021924.html</a></div>

<div><br></div><div>Not sure if that helps.</div><div> <br></div><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">


<br>
Did this change recently?<br>
<br>
Best,<br>
-jay<div class=""><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.<u></u>org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>