max_outgoing_bytes: What if a D-Bus peer is too slow to read?
hp at pobox.com
Tue Oct 5 10:31:11 PDT 2010
On Tue, Oct 5, 2010 at 11:56 AM, Alban Crequy
<alban.crequy at collabora.co.uk> wrote:
> In an implementation of the bus in the kernel, the queue in dbus-daemon
> could be just replaced by the socket receiving queue in the kernel. We
> cannot allocate indefinitely there.
> SOCK_DGRAM Unix sockets has a limit of 10 messages by default. This
> limit of 10 messages is really low compared to dbus-daemon's
> max_incoming_bytes 1G. It can be changed
> with /proc/sys/net/unix/max_dgram_qlen. But it cannot be changed on a
> per-socket basis.
Hmm, right. The only solution I see for a kernel implementation would
be to block. libdbus will have to poll for ready to write and avoid
blocking writes if the buffers are full or something.
A low limit (10 or even 100) won't be practical. Basically any limit
that gets hit in practice is not practical.
More information about the dbus