[openstack-dev] [oslo][messaging] Further improvements and refactoring

Ben Nemec openstack at nemebean.com
Mon Jun 30 21:19:22 UTC 2014


I'm far from an oslo.messaging expert, but a few general thoughts below.

On 06/30/2014 02:34 PM, Alexei Kornienko wrote:
> Hello,
> 
> 
>> My understanding is that your analysis is mostly based on running a
>> profiler against the code. Network operations can be bottlenecked in
>> other places.
>>
>> You compare 'simple script using kombu' with 'script using
>> oslo.messaging'. You don't compare script using oslo.messaging before
>> refactoring and 'after that. The latter would show whether refactoring
>> was worth the effort. Your test shows that oslo.messaging performance
>> sucks, but it's not definite that hotspots you've revealed, once
>> fixed, will show huge boost.
>>
>> My concern is that it may turn out that once all the effort to
>> refactor the code is done, we won't see major difference. So we need
>> base numbers, and performance tests would be a great helper here.
>>
> 
> It's really sad for me to see so little faith in what I'm saying.
> The test I've done using plain kombu driver was needed exactly to check
> that network is not the bottleneck for messaging performance.
> If you don't believe in my performance analysis we could ask someone else
> to do their own research and provide results.

The problem is that extremely simple test cases are often not
representative of overall performance, so comparing a purpose-built test
doing a single thing as fast as possible to a full library that has to
be able to handle all of OpenStack's messaging against every supported
back end isn't sufficient on its own to convince me that there is a
"rewrite all the things" issue here.

> 
> Problem with refactoring that I'm planning is that it's not a minor
> refactoring that can be applied in one patch but it's the whole library
> rewritten from scratch.

Which is exactly why we want to make sure it's something that needs to
be done before heading down that path.  I know I've wasted more time
than I'd like to admit optimizing the wrong code paths, only to find
that my changes made a .1% difference because I was mistaken about what
the bottleneck was.

Add to that the fact that we're _just_ completing the migration to
oslo.messaging in the first place and I hope you can understand why no
one wants to undertake another massive, possibly compatibility breaking,
refactoring unless we're absolutely certain it's the only way to address
the performance limitations of the existing code.

> Existing messaging code was written long long time ago (in a galaxy far far
> away maybe?) and it was copy-pasted directly from nova.
> It was not built as a library and it was never intended to be used outside
> of nova.

This isn't really true anymore.  The oslo.messaging code underwent
significant changes in the move from the incubator rpc module to the
oslo.messaging library.  One of the major points of emphasis in all Oslo
graduations is to make sure the new lib has a proper API and isn't just
a naive copy-paste of the existing code.

> Some parts of it cannot even work normally cause it was not designed to
> work with drivers like zeromq (matchmaker stuff).
> 
> The reason I've raised this question on the mailing list was to get some
> agreement about future plans of oslo.messaging development and start
> working on it in coordination with community.
> For now I don't see any actions plan emerging from it. I would like to see
> us bringing more constructive ideas about what should be done.
> 
> If you think that first action should be profiling lets discuss how it
> should be implemented (cause it works for me just fine on my local PC).
> I guess we'll need to define some basic scenarios that would show us
> overall performance of the library.
> There are a lot of questions that should be answered to implement this:
> Where such tests would run (jenking, local PC, devstack VM)?
> How such scenarios should look like?
> How do we measure performance (cProfile, etc.)?
> How do we collect results?
> How do we analyze results to find bottlenecks?
> etc.
> 
> Another option would be to spend some of my free time implementing
> mentioned refactoring (as I see it) and show you the results of performance
> testing compared with existing code.
> The only problem with such approach is that my code won't be oslo.messaging
> and it won't be accepted by community. It may be drop in base for v2.0 but
> I'm afraid this won't be acceptable either.
> 
> Regards,
> Alexei Kornienko
> 
> 
> 2014-06-30 17:51 GMT+03:00 Gordon Sim <gsim at redhat.com>:
> 
>> On 06/30/2014 12:22 PM, Ihar Hrachyshka wrote:
>>
>>  Alexei Kornienko wrote:
>>>>
>>>>> Some performance tests may be introduced but they would be more
>>>>> like functional tests since they require setup of actual
>>>>> messaging server (rabbit, etc.).
>>>>>
>>>>
>>> Yes. I think we already have some. F.e.
>>> tests/drivers/test_impl_qpid.py attempts to use local Qpid server
>>> (backing up to fake server if it's not available).
>>>
>>
>> I always get failures when there is a real qpidd service listening on the
>> expected port. Does anyone else see this?
>>
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
> 
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 




More information about the OpenStack-dev mailing list