[systemd-devel] sd-bus vs gdbus on dbus-daemon

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Apr 29 08:34:30 PDT 2015


On 29/04/15 15:08, Umut Tezduyar Lindskog wrote:
> We [1] have noticed that there could be up to %50 performance gain on
> using sd-bus over gdbus on dbus-daemon.
...
> gdbus.c
>   - g_dbus_proxy_new_for_bus_sync()
>   - 50 x g_dbus_proxy_call_sync()
> 
> sdbus.c
>   - sd_bus_open_system()
>   - 50 x sd_bus_get_property()

If you want to "compare apples with apples", I suggest using the
lower-level g_bus_get() and g_dbus_connection_call[_sync]() instead of
GDBusProxy. The design and priorities of sd-bus and GDBus are not really
very similar, but GDBusProxy is certainly not the closest equivalent you
can get.

Also, if your application profile is such that (a) D-Bus is a
significant factor in performance, and (b) sending 50 synchronous D-Bus
messages per connection is anywhere near realistic, then you are
probably not using D-Bus the way it is designed to be used.

See also <http://permalink.gmane.org/gmane.comp.freedesktop.dbus/13663>.

-- 
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>



More information about the systemd-devel mailing list