After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749533 - gdbus APIs are underperforming compared to sd-bus
gdbus APIs are underperforming compared to sd-bus
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other other
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-05-18 08:09 UTC by umut
Modified: 2018-05-24 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description umut 2015-05-18 08:09:42 UTC
We have compared the user space library cost of gdbus APIs with sd-bus. We have both synchronously and asynchronously retrieved a property from PID 1 for 1, 10, 100 and 1000 times.

The results can be seen at https://docs.google.com/document/d/1O3FEnpdZ2auisYalKT6qJTiNV9cfDxya_qisbpGj3MQ/edit#. 

According to the results, there could be magnitude difference on the cost of user space.

I am opening this ticket to discuss if there could be anything done to improve the performance of gdbus. Would it be possible to integrate sd-bus with gdbus for A) improve performance, B) make gdbus kdbus ready. 

Umut
Comment 1 Allison Karlitskaya (desrt) 2015-05-19 18:32:30 UTC
There are two big things that slow down GDBus:

 1) additional context switches caused by sending and receiving via the worker thread

 2) remarshalling of all of the data between GVariant and dbus-1 formats


Avoiding the worker thread is not something that we can fix in a compatible way.  We may introduce new bus types to avoid this in the future, or add a new getter that gets a per-thread connection object that can avoid the worker.

The remarshalling situation can never be fixed for as long as we are using standard D-Bus.  kdbus will use GVariant natively, so that will automatically be solved if we go to kdbus.
Comment 2 umut 2015-05-21 13:00:32 UTC
I have noticed even the synchronous calls are using worker thread. Would it add any value avoiding this (at least for the sync calls)?
Comment 3 GNOME Infrastructure Team 2018-05-24 17:50:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1039.