On Sun, Sep 30, 2018 at 11:41 AM Ciprian Dorin Craciun
<[email protected]> wrote:
> > - tune.sndbuf.client 16384 allows you to have 16384 bytes "on-the-fly", 
> > meaning unacknowlegded. 16384 / 0.16 sec = roughly 128 KB/s....
> > - do the math with your value of 131072 and you will have get your ~800 
> > KB/s.


However, something bothers me...  Setting `tune.sndbuf.client`, is
used only to call `setsockopt (SO_SNDBUF)`, right?  It is not used by
HAProxy for any internal buffer size?

If so then by not setting it the kernel should choose the default
value, which according to:
~~~~
> sysctl net.ipv4.tcp_wmem
net.ipv4.tcp_wmem = 4096        16384   4194304
~~~~
, should be 16384.

Looking with `netstat` at the `Recv-Q` column, it seems that with no
`tune` setting the value even goes up to 5 MB.
However setting the `tune` parameter it always goes up to around 20 KB.




Anyway, why am I trying to configure the sending buffer size:  if I
have large downloads and I have (some) slow clients, and as a
consequence HAProxy times out waiting for the kernel buffer to clear.
However if I configure the buffer size small enough it seems HAProxy
is "kept bussy" and nothing breaks.

Thus, is there a way to have both OK bandwidth for normal clients, and
not timeout for slow clients?

Thanks,
Ciprian.

Reply via email to