Print this page
3660 tcp_slow_start_* tunables should allow increasing the initial congestion window
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Reviewed by: Brendan Gregg <brendan.gregg@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp_impl.h
          +++ new/usr/src/uts/common/inet/tcp_impl.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2011, Joyent Inc. All rights reserved.
       24 + * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  24   25   */
  25   26  
  26   27  #ifndef _INET_TCP_IMPL_H
  27   28  #define _INET_TCP_IMPL_H
  28   29  
  29   30  /*
  30   31   * TCP implementation private declarations.  These interfaces are
  31   32   * used to build the IP module and are not meant to be accessed
  32   33   * by any modules except IP itself.  They are undocumented and are
  33   34   * subject to change without notice.
↓ open down ↓ 158 lines elided ↑ open up ↑
 192  193  #define TSTMP_LT(a, b)  ((int32_t)((a)-(b)) < 0)
 193  194  
 194  195  /*
 195  196   * Initialize cwnd according to RFC 3390.  def_max_init_cwnd is
 196  197   * either tcp_slow_start_initial or tcp_slow_start_after idle
 197  198   * depending on the caller.  If the upper layer has not used the
 198  199   * TCP_INIT_CWND option to change the initial cwnd, tcp_init_cwnd
 199  200   * should be 0 and we use the formula in RFC 3390 to set tcp_cwnd.
 200  201   * If the upper layer has changed set the tcp_init_cwnd, just use
 201  202   * it to calculate the tcp_cwnd.
      203 + *
      204 + * "An Argument for Increasing TCP's Initial Congestion Window"
      205 + * ACM SIGCOMM Computer Communications Review, vol. 40 (2010), pp. 27-33
      206 + *  -- Nandita Dukkipati, Tiziana Refice, Yuchung Cheng,
      207 + *     Hsiao-keng Jerry Chu, Tom Herbert, Amit Agarwal,
      208 + *     Arvind Jain, Natalia Sutin
      209 + *
      210 + *   "Based on the results from our experiments, we believe the
      211 + *    initial congestion window should be at least ten segments
      212 + *    and the same be investigated for standardization by the IETF."
      213 + *
      214 + * As such, the def_max_init_cwnd argument with which this macro is
      215 + * invoked is either the tcps_slow_start_initial or
      216 + * tcps_slow_start_after_idle which both default to 0 and will respect
      217 + * RFC 3390 exactly.  If the tunables are explicitly set by the operator,
      218 + * then the initial congestion window should be set as the operator
      219 + * demands, within reason. We shall arbitrarily define reason as a
      220 + * maximum of 16 (same as used by the TCP_INIT_CWND setsockopt).
 202  221   */
      222 +
      223 +/* Maximum TCP initial cwin (start/restart). */
      224 +#define TCP_MAX_INIT_CWND       16
      225 +
 203  226  #define TCP_SET_INIT_CWND(tcp, mss, def_max_init_cwnd)                  \
 204  227  {                                                                       \
 205  228          if ((tcp)->tcp_init_cwnd == 0) {                                \
 206      -                (tcp)->tcp_cwnd = MIN(def_max_init_cwnd * (mss),        \
 207      -                    MIN(4 * (mss), MAX(2 * (mss), 4380 / (mss) * (mss)))); \
      229 +                if (def_max_init_cwnd == 0) {                           \
      230 +                        (tcp)->tcp_cwnd = MIN(4 * (mss),                \
      231 +                            MAX(2 * (mss), 4380 / (mss) * (mss)));      \
      232 +                } else {                                                \
      233 +                        (tcp)->tcp_cwnd = MIN(TCP_MAX_INIT_CWND * (mss),\
      234 +                            def_max_init_cwnd * (mss));                 \
      235 +                }                                                       \
 208  236          } else {                                                        \
 209  237                  (tcp)->tcp_cwnd = (tcp)->tcp_init_cwnd * (mss);         \
 210  238          }                                                               \
 211  239          tcp->tcp_cwnd_cnt = 0;                                          \
 212  240  }
 213  241  
 214  242  /*
 215  243   * Set ECN capable transport (ECT) code point in IP header.
 216  244   *
 217  245   * Note that there are 2 ECT code points '01' and '10', which are called
↓ open down ↓ 488 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX