[openstack-dev] Python overhead for rootwrap
joe.gordon0 at gmail.com
Fri Jul 26 20:59:17 UTC 2013
On Fri, Jul 26, 2013 at 11:34 AM, Jay Pipes <jaypipes at gmail.com> wrote:
> On 07/25/2013 04:21 PM, Joe Gordon wrote:
>> Hi All,
>> We have recently hit some performance issues with nova-network. It
>> turns out the root cause of this was we do roughly 20 rootwrapped shell
>> commands, many inside of global locks.
>> It turns out starting python itself, has a fairly significant overhead
>> when compared to the run time of many of the binary commands we execute.
>> For example:
>> $ time python -c "print 'test'"
>> $ time ip a
>> While we have removed the extra overhead of using entry points, we are
>> now hitting the overhead of just shelling out to python.
> Hey Joe,
> 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?
Turns out this wasn't off the list. So I will answer on the list.
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.
You can see the issue by going into devstack and running "time python -c
This thread may shine more light on what we saw:
Not sure if that helps.
> Did this change recently?
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.**org <OpenStack-dev at lists.openstack.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev