On Sun, Sep 30, 2018 at 10:35 AM Willy Tarreau <[email protected]> wrote:
> On Sun, Sep 30, 2018 at 10:20:06AM +0300, Ciprian Dorin Craciun wrote:
> > I was just trying to replicate the issue I've seen yesterday, and for
> > a moment (in initial tests) I was able to.  However on repeated tests
> > it seems that the `tune.rcvbuf.*` (and related) have no impact, as I
> > constantly see TCP fragments (around 2842 bytes Ethernet frames).
>
> Note that these are not fragments but segments. And as Matti suggested,
> it's indeed due to GSO, you're seeing two TCP frames sent at once through
> the stack, and they will be segmented by the NIC.


[Just as info.]

So it seems I was able to reproduce the bandwith issue by only toying
with `tune.sndbuf.client`:
* with no value, downloading an 8 MB file I get decent bandwidth
around 4 MB/s;  (for larger files I even get up to 10 MB/s);  (a
typical Ethernet frame length as reported by `tcpdump` is around 59 KB
towards the end of the transfer;)
* with that tune parameter set to 128 KB, I get around 1 MB/s;  (a
typical Ethernet frame length is around 4 KB;)
* with that tune parameter set to 16 KB, I get around 100 KB/s;  (a
typical Ethernet frame lengh is around 2KB;)


By "typical Ethernet frame length" I meen a packet as reported by
`tcpdump` and viewed in Wrieshark looks like this (for the first one):
~~~~
Frame 1078: 59750 bytes on wire (478000 bits), 59750 bytes captured
(478000 bits)
    Encapsulation type: Ethernet (1)
    Arrival Time: Sep 30, 2018 10:26:58.667739000 EEST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1538292418.667739000 seconds
    [Time delta from previous captured frame: 0.000018000 seconds]
    [Time delta from previous displayed frame: 0.000018000 seconds]
    [Time since reference or first frame: 1.901135000 seconds]
    Frame Number: 1078
    Frame Length: 59750 bytes (478000 bits)
    Capture Length: 59750 bytes (478000 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ethertype:ip:tcp:ssl:ssl]
    [Coloring Rule Name: TCP]
    [Coloring Rule String: tcp]
Ethernet II, Src: f2:3c:91:9f:51:b8 (f2:3c:91:9f:51:b8), Dst:
Cisco_9f:f0:0a (00:00:0c:9f:f0:0a)
    Destination: Cisco_9f:f0:0a (00:00:0c:9f:f0:0a)
    Source: f2:3c:91:9f:51:b8 (f2:3c:91:9f:51:b8)
    Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: XXX.XXX.XXX.XXX, Dst: XXX.XXX.XXX.XXX
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
        0000 00.. = Differentiated Services Codepoint: Default (0)
        .... ..00 = Explicit Congestion Notification: Not ECN-Capable
Transport (0)
    Total Length: 59736
    Identification: 0x8d7a (36218)
    Flags: 0x4000, Don't fragment
        0... .... .... .... = Reserved bit: Not set
        .1.. .... .... .... = Don't fragment: Set
        ..0. .... .... .... = More fragments: Not set
        ...0 0000 0000 0000 = Fragment offset: 0
    Time to live: 64
    Protocol: TCP (6)
    Header checksum: 0x3054 [validation disabled]
    [Header checksum status: Unverified]
    Source: XXX.XXX.XXX.XXX
    Destination: XXX.XXX.XXX.XXX
Transmission Control Protocol, Src Port: 443, Dst Port: 38150, Seq:
8271805, Ack: 471, Len: 59684
    Source Port: 443
    Destination Port: 38150
    [Stream index: 0]
    [TCP Segment Len: 59684]
    Sequence number: 8271805    (relative sequence number)
    [Next sequence number: 8331489    (relative sequence number)]
    Acknowledgment number: 471    (relative ack number)
    1000 .... = Header Length: 32 bytes (8)
    Flags: 0x010 (ACK)
    Window size value: 234
    [Calculated window size: 29952]
    [Window size scaling factor: 128]
    Checksum: 0x7d1c [unverified]
    [Checksum Status: Unverified]
    Urgent pointer: 0
    Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
    [SEQ/ACK analysis]
    [Timestamps]
    TCP payload (59684 bytes)
    TCP segment data (16095 bytes)
    TCP segment data (10779 bytes)
[2 Reassembled TCP Segments (16405 bytes): #1073(310), #1078(16095)]
    [Frame: 1073, payload: 0-309 (310 bytes)]
    [Frame: 1078, payload: 310-16404 (16095 bytes)]
    [Segment count: 2]
    [Reassembled TCP length: 16405]
Secure Sockets Layer
Secure Sockets Layer
~~~~

I'll try to disable offloading and see what happens.

I forgot to say that this is a paravirtualized VM running on Linode in
their Dallas datacenter.

Ciprian.

Reply via email to