Hi Ciprian,

On Sat, Sep 29, 2018 at 09:57:20PM +0300, Ciprian Dorin Craciun wrote:
> Hello all!
> 
> 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.

MSS is the maximum segment size and corresponds to the maximum *payload*
transported over TCP. It doesn't include the IP nor TCP headers. Usually
over Ethernet it's 1460, resulting in 1500 bytes packets. If you're seeing
fragments, it very likely is due to an intermediary router or firewall
which has a shorter MTU at some point, such as an IPSEC VPN, IP tunnel
or ADSL link, and which must fragment to deliver the data. Some such
equipments are capable of interfering with the MSS negociation to reduce
it to fit the MTU reduction, you need to check on the affected equipments.

Also, regarding your initial question, tune.rcvbuf/sndbuf will have no
effect on all this since they only specify the extra buffer size in the
system.

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 ;-)

> 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.

Regards,
Willy

Reply via email to