"DBus Embedded" - a clean break

Rob Taylor rob.taylor at codethink.co.uk
Thu Jan 20 00:09:00 PST 2011


On 20/01/11 09:53, Ville M. Vainio wrote:
> Just some subversive thoughts (not a practical development project for now):
> 
> - Dbus is very slow. It's okay on desktop, but on mobile platforms
> it's suboptimal
> 
> - It could be much (10x?) faster - switch to shared memory, posix
> message queues for data transmission (references to relevant shared
> memory blocks), do not do any verification
> 
> - Switch to peer-to-peer communication as soon as possible while doing
> the handshake through daemon (minimize context switches, transmission
> counts).
> 
> - It should be possible to make apps using libdbus to still work with
> this new structure, to retain application compatibility. Obviously
> wire protocol disappears completely.
>

FWIW, completely agree with the above. Did some looking at the shared
memory + posix message queues approach many years ago and concluded its
possible but pretty tricky. I'm afraid I've long lost any write ups I
did though :(

> - Retain the current serialization functionality. However, provide a
> way to skip it (since people say it's one reason why dbus is slow) and
> transmit raw binary data very quickly.

I think the issue is more that libdbus's serialisation is slow rather
than there's a fundamental issue with the serialisation.

Has anyone done benchmarks on GDBus vs libdbus serialisation performance?

NB ORBit serialised, and was much much faster than DBus. [1]

Thanks,

Rob

P.S.  Context for those not involved in embedded systems: consider that
I generally estimate send->receive time of 30ms for a single dbus
message going via the bus on capable ARM systems. That means the time
for 10 IPC calls is a human-visible time.

[1] http://live.gnome.org/GAP/AtSpiDbusInvestigation

> Implementing this might be easier than fixing dbus, and it could get
> rid of thread synchronization problems. It would definitely fix speed.
> Thoughts?
> 


-- 

Rob Taylor, CTO, Codethink Ltd. - http://codethink.co.uk
Twitter: @robtaylor78 - LinkedIn: http://www.linkedin.com/in/robtaylor78
Office: +44 161 236 5575 - Cell: +44 7891 533856


More information about the dbus mailing list