Skipping the session bus hop for RPC

Andrew Sherk ASherk at qnx.com
Mon Feb 9 12:49:52 PST 2009


Hello all, thank you very much for the replies to this post.

> A really good way to reduce context switches is to send 
> messages asynchronously instead of waiting after each one.  
> Then theoretically you only need a few context switches even 
> to process hundreds of messages.
> 
> I've done some pretty high-performance, very large database 
> queries over dbus (yes, yes, I know it's not designed for 
> that, but it works great :)) using this technique, and the 
> dbus-daemon slows things down, but by a much smaller 
> percentage than you'd expect.

It's looking like we'll stick with passing through the message bus (and
dbus daemon) afterall. 

We have done benchmarking, primarily to contrast unix domain sockets on
QNX Neutrino OS with a couple of alternative transports for local IPC,
but with all of these tests sending messages synchronously.

Thank-you for the insight on using asychronous message passing.  I can
see from your comments and some simple tests that sending many more
messages in one go does result in a huge improvement and may end up as
part of our solution. (The other part may involve in-house development
of an alternative to QNX unix domain sockets.)

Many thanks,
Andy


More information about the dbus mailing list