Skip to content
  1. May 21, 2018
  2. May 20, 2018
  3. May 19, 2018
  4. May 18, 2018
    • David S. Miller's avatar
      Merge branch 'tcp-implement-SACK-compression' · 2c47a65b
      David S. Miller authored
      
      
      Eric Dumazet says:
      
      ====================
      tcp: implement SACK compression
      
      When TCP receives an out-of-order packet, it immediately sends
      a SACK packet, generating network load but also forcing the
      receiver to send 1-MSS pathological packets, increasing its
      RTX queue length/depth, and thus processing time.
      
      Wifi networks suffer from this aggressive behavior, but generally
      speaking, all these SACK packets add fuel to the fire when networks
      are under congestion.
      
      This patch series adds SACK compression, but the infrastructure
      could be leveraged to also compress ACK in the future.
      
      v2: Addressed Neal feedback.
          Added two sysctls to allow fine tuning, or even disabling the feature.
      
      v3: take rtt = min(srtt, rcv_rtt) as Yuchung suggested, because rcv_rtt
          can be over estimated for RPC (or sender limited)
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c47a65b
    • Eric Dumazet's avatar
      tcp: add tcp_comp_sack_nr sysctl · 9c21d2fc
      Eric Dumazet authored
      
      
      This per netns sysctl allows for TCP SACK compression fine-tuning.
      
      This limits number of SACK that can be compressed.
      Using 0 disables SACK compression.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c21d2fc
    • Eric Dumazet's avatar
      tcp: add tcp_comp_sack_delay_ns sysctl · 6d82aa24
      Eric Dumazet authored
      
      
      This per netns sysctl allows for TCP SACK compression fine-tuning.
      
      Its default value is 1,000,000, or 1 ms to meet TSO autosizing period.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d82aa24
    • Eric Dumazet's avatar
      tcp: add TCPAckCompressed SNMP counter · 200d95f4
      Eric Dumazet authored
      
      
      This counter tracks number of ACK packets that the host has not sent,
      thanks to ACK compression.
      
      Sample output :
      
      $ nstat -n;sleep 1;nstat|egrep "IpInReceives|IpOutRequests|TcpInSegs|TcpOutSegs|TcpExtTCPAckCompressed"
      IpInReceives                    123250             0.0
      IpOutRequests                   3684               0.0
      TcpInSegs                       123251             0.0
      TcpOutSegs                      3684               0.0
      TcpExtTCPAckCompressed          119252             0.0
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      200d95f4
    • Eric Dumazet's avatar
      tcp: add SACK compression · 5d9f4262
      Eric Dumazet authored
      
      
      When TCP receives an out-of-order packet, it immediately sends
      a SACK packet, generating network load but also forcing the
      receiver to send 1-MSS pathological packets, increasing its
      RTX queue length/depth, and thus processing time.
      
      Wifi networks suffer from this aggressive behavior, but generally
      speaking, all these SACK packets add fuel to the fire when networks
      are under congestion.
      
      This patch adds a high resolution timer and tp->compressed_ack counter.
      
      Instead of sending a SACK, we program this timer with a small delay,
      based on RTT and capped to 1 ms :
      
      	delay = min ( 5 % of RTT, 1 ms)
      
      If subsequent SACKs need to be sent while the timer has not yet
      expired, we simply increment tp->compressed_ack.
      
      When timer expires, a SACK is sent with the latest information.
      Whenever an ACK is sent (if data is sent, or if in-order
      data is received) timer is canceled.
      
      Note that tcp_sack_new_ofo_skb() is able to force a SACK to be sent
      if the sack blocks need to be shuffled, even if the timer has not
      expired.
      
      A new SNMP counter is added in the following patch.
      
      Two other patches add sysctls to allow changing the 1,000,000 and 44
      values that this commit hard-coded.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d9f4262