kdbus, bus1 and systemd/non-linux hosts

Thomas Kluyver thomas at kluyver.me.uk
Tue Apr 11 09:21:18 UTC 2023


Hi René,

This seems like a confusing request, at least to me. You start off talking about mechanisms that were meant to be part of the Linux kernel, but then you ask for cross-platform solutions. A messaging system built on sockets, like D-Bus, can be cross-platform much more easily than something built on a Linux-specific kernel feature. And D-Bus does work on Mac and Windows, although some of its features (passing file descriptors) aren't available on Windows.

FWIW, it looks like bus1 got shelved as well, at least adding it to the regular Linux kernel - development and discussion seem to dry up around 2016-17. It sounds like people found it was possible to write a higher-performance D-Bus message bus even without new kernel features, and this is where dbus-broker comes from.

> Part of my interest comes from the fact that I tend to work on old/cheap/underdimensioned systems that I probably ask a bit much of. There are times where a heavy dbus client like kmail becomes very sluggish, waiting for something that probably involves dbus communication while there isn't a clear CPU hogger.

Have you actually figured out that D-Bus itself is causing the slowness, and not whatever KMail is talking D-Bus to? Or is that a guess? It's *really* hard to guess correctly about performance in complex systems, so chasing ways to make D-Bus faster might well be a waste of time.

> I noticed that the dbus-daemon has a single-threaded design and cannot help but wonder if that's still by definition the best approach these days.

Your old/cheap systems probably wouldn't see much, if any, benefit from a multithreaded dbus-daemon. Though that's a guess too. ;-)

Best wishes,
Thomas

On Sun, 9 Apr 2023, at 11:09, René J.V. Bertin wrote:
> Hi,
>
> Here is maybe not the best place to ask, but I've come across the 
> apparently dfunct kdbus project and its supposed successor, bus1. The 
> idea of using a kernel interface instead of a handling everything in 
> userspace makes a lot of sense if you consider the demonstrated 
> performance gains. They are all the more interesting to me as I'm a 
> KMail user, where potentially lots of data gets transported over the 
> d-bus.
>
> I've avoided kdbus for now but its successor (bus1-broker) turns out to 
> depend on systemd which makes it a no-go for me. Are there any similar 
> alternatives that don't have this dependency?
> Also, are you aware of comparable implementations for Mac or MS Win, 
> using the kernel mechanisms that exist there? (A quick glance suggests 
> Apple's XPC architecture might even be rich enough to act as a conduit, 
> possibly combined with GCD?)
>
> Mostly just curious as I have almost no programming experience with 
> either of these technologies.
>
> R.


More information about the dbus mailing list