Martin Pieuchot <[email protected]> wrote:

> On 17/06/19(Mon) 21:43, Claudio Jeker wrote:
> > I noticed that by default the send and recv socket buffers for
> > socketpair(2) is rather low (4k IIRC). The result is a fairly inefficent
> > write/read behaviour on the imsg sockets. Increasing SO_SNDBUF and
> > SO_RCVBUF seems to help increase the data sent and received per syscall.
> > 
> > Another option would be to make the default socketbuffer watermarks for
> > socketpair(2) a bit less limited. Then all imsg users would benefit at the
> > same time.
> 
> What's the downside of making the default socketbuffer watermarks
> bigger?

It is kernel memory.

> Wasting resources?

People in the past did assessments to decide what numbers made
reasonable sense for kernel memory availability at the time.  They did
this to avoid the potential of denial of service due to resource
failure, including the worst case of exhaustion, and failure to recover.

Until someone does a new assessment, those should stand.

The alternative is deadlock, for our most heavy users.

Is it unreasonable to prefer low performance over potential of
deadlock or crashing?

> How did you figure out that the socket buffers were too small?

He profiled.

> Is that something we could apply to other daemons?

See a previous point.


Reply via email to