[openstack-dev] [oslo] rpc envelope (was: blueprint amqp-rpc-fast-reply-queue)

Eric Windisch eric at cloudscaling.com
Wed Feb 20 19:55:03 UTC 2013


> > 
> > RPC envelope disabled: 170 RPCs/second
> > RPC envelope enabled: 190 RPCs/second
> > The performance cost of enabling RPC envelopes is about a 10% reduction RPC
> > throughput.
> > 
> > The double serialization that Eric mentions is the reason for the slow
> > down. I think the only reason the double serialization was added was in
> > preparation for signature signing. If Grizzly goes out this way, then we
> > will just have to take the 10% hit to AMQP RPC in Havana, when the envelope
> > will be enabled with no option to disable it. An alternative is to remove
> > the JSON serialization from the current envelope code, but it might be too
> > late for Grizzly.
> 

Actually, yesterday, I had a patch merged that adds a fast-serialization routine for Kombu that mirrors what is now done with ZeroMQ. It reduces the envelope dictionary into a flattened array and joins that array into a null-deliminated string.  This avoids having to perform double JSON serialization. Kombu is apparently smart enough to know that this is a string and doesn't do any additional serialization.

I'd like to see you try these tests again with the code as of G3.

In a vacuum with Python's timeit module, I compared JSON serialization to my dictionary-to-string routines and there was a 10x  performance improvement with my code.

Regards,
Eric Windisch 




More information about the OpenStack-dev mailing list