About performance of D-Bus

Jerome Philbert jerome.philbert at gmail.com
Tue Oct 21 02:36:26 PDT 2008


Hi,

I've done some D-Bus benchmarks, as done here
http://lists.freedesktop.org/archives/dbus/2007-October/008829.html
I'm also interested in a quick D-Bus for an embedded solution based on
ARM9 at 200MHz.

I use dbus-1.2.3 and built it to be the quickest as below:
 - without paranoid validation (mode =
DBUS_VALIDATION_MODE_WE_TRUST_THIS_DATA_ABSOLUTELY)
 - with these options: ./configure --prefix=/usr --host=arm-linux
--with-xml=expat --without-x --disable-tests --disable-verbose-mode
--disable-asserts --disable-checks

I've written a simple test program where the client calls a synchronous
method (with D-Bus GLib bindings) with 3 integer input arguments and 3
integer output arguments. I measure the method call duration as described
below:

client side:
  gettimeofday()
  dbus_g_proxy_call (proxy, "MyMethod", error, G_TYPE_INT, IN_arg0,
G_TYPE_INT, IN_arg1, G_TYPE_INT, IN_arg2, G_TYPE_INVALID, G_TYPE_INT,
OUT_arg3, G_TYPE_INT, OUT_arg4, G_TYPE_INT, OUT_arg5, G_TYPE_INVALID)

server side:
  gboolean test_object_my_method (TestObject *obj, gint a, gint b, gint c,
gint *r1, gint *r2, gint *r3, GError **error)
  {
    gettimeofday()
  }

Result: the method call duration lasts about 4700us on ARM9 at 200MHz.
This number is an average of 1000 measures and is quite constant.

I have also measured with asynchronous method and I get same numbers.

Are these numbers normal ?
Why is D-Bus so slow ?
Is it possible to improve it ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20081021/c0a28625/attachment.html 


More information about the dbus mailing list