I am pretty sure you have TCP segmentation offload enabled. The TCP/IP stack 
therefore sends bigger-than-allowed TCP segments towards the NIC who in turn 
takes care about the proper segmentation.

You want to check the output of "ethtool -k eth0" and the values of:
tcp-segmentation-offload
generic-segmentation-offload

Cheers

Mathias


-----Ursprüngliche Nachricht-----
Von: Ciprian Dorin Craciun <[email protected]> 
Gesendet: Sonntag, 30. September 2018 08:30
An: [email protected]
Cc: [email protected]
Betreff: Re: Do `tune.rcvbuf.server` and `tune.sndbuf.server` (and their 
`tune.*.client` equivalents) lead to TCP fragmentation?

On Sun, Sep 30, 2018 at 9:08 AM Willy Tarreau <[email protected]> wrote:
> > I've played with `tune.rcvbuf.server`, `tune.sndbuf.server`, 
> > `tune.rcvbuf.client`, and `tune.sndbuf.client` and explicitly set 
> > them to various values ranging from 4k to 256k.  Unfortunately in 
> > all cases it seems that this generates too large TCP packets (larger 
> > than the advertised and agreed MSS in both direction), which in turn 
> > leads to TCP fragmentation and reassembly.  (Both client and server 
> > are Linux
> > >4.10.  The protocol used was HTTP 1.1 over TLS 1.2.)
>
> No no no, I'm sorry but this is not possible at all. You will never 
> find a single TCP stack doing this! I'm pretty sure there is an issue 
> somewhere in your capture or analysis.
>
> [...]
>
> However, if the problem you're experiencing is only with the listening 
> side, there's an "mss" parameter that you can set on your "bind" lines 
> to enforce a lower MSS, it may be a workaround in your case. I'm 
> personally using it at home to reduce the latency over ADSL ;-)


I am also extreemly sckeptical that this is HAProxy's fault, however the only 
change needed to eliminate this issue was commenting-out these tune arguments.  
I have also explicitly set the `mss` parameter to `1400`.

The catpure was taken directly on the server on public interface.

I'll try to make a fresh catpure to see if I can replicate this.


> > The resulting bandwidth was around 10 MB.
>
> Please use correct units when reporting issues, in order to reduce the 
> confusion. "10 MB" is not a bandwidth but a size (10 megabytes). Most 
> likely you want to mean 10 megabytes per second (10 MB/s). But maybe 
> you even mean 10 megabits per second (10 Mb/s or 10 Mbps), which 
> equals
> 1.25 MB/s.

:)  Sorry for that.  (Thats the otucome of writing emails at 3 AM after 4 hours 
of pocking into a production system.)  I completely agree with you about the 
MB/Mb consistency, and I always hate that some providers still use MB to mean 
mega-bits, like it's 2000.  :)

Yes, I meant 10 mega-bytes / second.  Sory again.

Ciprian.

Reply via email to