dbus performance information
Alban Crequy
alban.crequy at collabora.co.uk
Thu Mar 20 10:30:59 PDT 2014
On Thu, 20 Mar 2014 17:24:22 +0100
VITIELLO Fabien <Fabien.VITIELLO at esg-group.fr> wrote:
> Hi,
>
> Several old benchmark exist over internet. For example, old
> comparison between CORBA implementation and dbus says dbus is 18
> times slower than CORBA. I'm looking for information about dbus
> performance. Do you have more recent information on this topic ? I
> didn't find answers in the documentation site except in the dbus FAQ
> question 7. It says dbus is about 2.5 slower than classic IPC
> mechanism. Is it an up-to-date information ?
> Moreover, I found an interesting topic concerning "FD passing"
> mechanism. Do you know if it is a way to speed dbus inter-process or
> if it's already implemented ? If it is better I was wondering how to
> activate this functionnality and how it works.
FD passing in D-Bus is already implemented. It is the feature to
transfer a file descriptor from one process to another by attaching it
to a D-Bus message. Internally, D-Bus uses the ability of Unix sockets
to transfer a file descriptor in sendmsg(2)/recvmsg(2)'s ancillary data.
This feature is used by Tracker for performance reasons: it creates a
pipe and sends one of the pipe's file descriptor through D-Bus (with
GDBus) and then use the pipe to transfer data rather than D-Bus.
https://git.gnome.org/browse/tracker/tree/src/libtracker-extract/tracker-extract-client.c#n388
https://blogs.gnome.org/abustany/2010/05/20/ipc-performance-the-return-of-the-report/
It could be to transfer a file descriptor of a specialized type. Bluez
uses it to give the AF_BLUETOOTH socket file descriptor to oFono (with
libdbus).
http://git.kernel.org/cgit/bluetooth/bluez.git/tree/profiles/audio/transport.c#n281
http://git.kernel.org/cgit/network/ofono/ofono.git/tree/src/handsfree-audio.c#n99
If you use GDBus, you can check the documentation of *_fd* functions:
https://developer.gnome.org/gio/unstable/GDBusMessage.html#g-dbus-message-get-unix-fd-list
Best regards,
Alban
More information about the dbus
mailing list