many small messages over kdbus

Simon McVittie simon.mcvittie at collabora.co.uk
Mon May 12 04:38:11 PDT 2014


On 12/05/14 09:53, Urs Fässler wrote:
> I need an IPC system which supports broadcasts. It would be nice if we
> can send many small messages (~64 bytes every 5 ms to ~12 receiver).

Do your processes fully trust each other? In other words, is it
acceptable if a sender can crash a receiver (SIGSEGV) or perhaps even
cause arbitrary code execution in it, or the other way round?

> 2. Is this a sane usage of kdbus or a kind of stupid idea?
> 3. Is it possible that the receiver provides a buffer for the messages,
>    so that no allocation and zeroing is needed (or is it planned /
>    welcome if someone implements it)?

If your processes trust each other, you probably want some sort of
shared-memory IPC system.

If not, I don't think you're going to get the sort of throughput you
want: traditional D-Bus has significant per-message overhead. kdbus
reduces that overhead, but cannot eliminate it.

In particular, D-Bus and kdbus do not assume that the processes trust
each other, which is why they can't be as fast as shared memory.

    S



More information about the dbus mailing list