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

Umut Tezduyar Lindskog umut at tezduyar.com
Thu Apr 30 02:24:49 PDT 2015


Hi Greg,

On Wed, Apr 29, 2015 at 5:49 PM, Greg KH <gregkh at linuxfoundation.org> wrote:
> On Wed, Apr 29, 2015 at 04:08:50PM +0200, Umut Tezduyar Lindskog wrote:
>> Hi,
>>
>> We [1] have noticed that there could be up to %50 performance gain on
>> using sd-bus over gdbus on dbus-daemon. For this reason, we have high
>> interest in using sd-bus. What are the plans in terms of making sd-bus
>> API public?
>>
>> Details of the test [2]:
>>
>> 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()
>>
>> Two applications are run with "ltrace", "perf stat -e cycles", "time"
>> and the results are compared.
>
> I'll echo Simon's statement here, making a call to
> g_dbus_proxy_call_sync() seems like an odd thing to test.  Is this
> really how your application wants to work?  Is it the normal call path
> that you need optimized?  How many messages do you normally send, or
> want to send, and how big of the data "blob" are you wanting to
> transmit/receive here?

We have variety of dbus clients sending small/big slow/fast sync/async
messages. But we have not focused on dbus's performance in the
experiment. We wanted to see the efficiency of 2 user space libraries
when it comes to a very simple use case (synchronously retrieving a
property).

>
> I ask as I'm trying to find how people would like to use D-Bus, if the
> existing dbus-daemon were sped up in various ways.
>
> Both of these traces show that userspace is sitting around for most of
> the time, I don't see a whole lot of actual CPU usage happening, do you?

Could you please explain how did you come up with that conclusion?
Granted not the top 10 calls are in g... libraries but there are many
entries that program has spent time in g... library. Also the pthread.

Umut

>
> thanks,
>
> greg k-h


More information about the systemd-devel mailing list