Internet Engineering Task Force (IETF)                    B. Constantine
Request for Comments: 6349                                          JDSU
Category: Informational                                        G. Forget
ISSN: 2070-1721                            Bell Canada (Ext. Consultant)
                                                                 R. Geib
                                                        Deutsche Telekom
                                                              R. Schrage
                                                      Schrage Consulting
                                                             August 2011
        
Internet Engineering Task Force (IETF)                    B. Constantine
Request for Comments: 6349                                          JDSU
Category: Informational                                        G. Forget
ISSN: 2070-1721                            Bell Canada (Ext. Consultant)
                                                                 R. Geib
                                                        Deutsche Telekom
                                                              R. Schrage
                                                      Schrage Consulting
                                                             August 2011
        

Framework for TCP Throughput Testing

TCP吞吐量测试框架

Abstract

摘要

This framework describes a practical methodology for measuring end-to-end TCP Throughput in a managed IP network. The goal is to provide a better indication in regard to user experience. In this framework, TCP and IP parameters are specified to optimize TCP Throughput.

该框架描述了一种测量托管IP网络中端到端TCP吞吐量的实用方法。目标是提供关于用户体验的更好指示。在此框架中,指定TCP和IP参数以优化TCP吞吐量。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for informational purposes.

本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6349.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc6349.

Copyright Notice

版权公告

Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2011 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................3
      1.1. Requirements Language ......................................4
      1.2. Terminology ................................................5
      1.3. TCP Equilibrium ............................................6
   2. Scope and Goals .................................................7
   3. Methodology .....................................................8
      3.1. Path MTU ..................................................10
      3.2. Round-Trip Time (RTT) and Bottleneck Bandwidth (BB) .......11
           3.2.1. Measuring RTT ......................................11
           3.2.2. Measuring BB .......................................12
      3.3. Measuring TCP Throughput ..................................12
           3.3.1. Minimum TCP RWND ...................................13
   4. TCP Metrics ....................................................16
      4.1. Transfer Time Ratio .......................................16
           4.1.1. Maximum Achievable TCP Throughput Calculation ......17
           4.1.2. TCP Transfer Time and Transfer Time Ratio
                  Calculation ........................................19
      4.2. TCP Efficiency ............................................20
           4.2.1. TCP Efficiency Percentage Calculation ..............20
      4.3. Buffer Delay ..............................................20
           4.3.1. Buffer Delay Percentage Calculation ................21
   5. Conducting TCP Throughput Tests ................................21
      5.1. Single versus Multiple TCP Connections ....................21
      5.2. Results Interpretation ....................................22
   6. Security Considerations ........................................25
      6.1. Denial-of-Service Attacks .................................25
      6.2. User Data Confidentiality .................................25
      6.3. Interference with Metrics .................................25
   7. Acknowledgments ................................................26
   8. Normative References ...........................................26
        
   1. Introduction ....................................................3
      1.1. Requirements Language ......................................4
      1.2. Terminology ................................................5
      1.3. TCP Equilibrium ............................................6
   2. Scope and Goals .................................................7
   3. Methodology .....................................................8
      3.1. Path MTU ..................................................10
      3.2. Round-Trip Time (RTT) and Bottleneck Bandwidth (BB) .......11
           3.2.1. Measuring RTT ......................................11
           3.2.2. Measuring BB .......................................12
      3.3. Measuring TCP Throughput ..................................12
           3.3.1. Minimum TCP RWND ...................................13
   4. TCP Metrics ....................................................16
      4.1. Transfer Time Ratio .......................................16
           4.1.1. Maximum Achievable TCP Throughput Calculation ......17
           4.1.2. TCP Transfer Time and Transfer Time Ratio
                  Calculation ........................................19
      4.2. TCP Efficiency ............................................20
           4.2.1. TCP Efficiency Percentage Calculation ..............20
      4.3. Buffer Delay ..............................................20
           4.3.1. Buffer Delay Percentage Calculation ................21
   5. Conducting TCP Throughput Tests ................................21
      5.1. Single versus Multiple TCP Connections ....................21
      5.2. Results Interpretation ....................................22
   6. Security Considerations ........................................25
      6.1. Denial-of-Service Attacks .................................25
      6.2. User Data Confidentiality .................................25
      6.3. Interference with Metrics .................................25
   7. Acknowledgments ................................................26
   8. Normative References ...........................................26
        
1. Introduction
1. 介绍

In the network industry, the SLA (Service Level Agreement) provided to business-class customers is generally based upon Layer 2/3 criteria such as bandwidth, latency, packet loss, and delay variations (jitter). Network providers are coming to the realization that Layer 2/3 testing is not enough to adequately ensure end-users' satisfaction. In addition to Layer 2/3 testing, this framework recommends a methodology for measuring TCP Throughput in order to provide meaningful results with respect to user experience.

在网络行业中,提供给商务级客户的SLA(服务级别协议)通常基于第2/3层标准,如带宽、延迟、数据包丢失和延迟变化(抖动)。网络供应商逐渐意识到,2/3层测试不足以充分确保最终用户的满意度。除了2/3层测试之外,该框架还推荐了一种测量TCP吞吐量的方法,以便提供与用户体验相关的有意义的结果。

Additionally, business-class customers seek to conduct repeatable TCP Throughput tests between locations. Since these organizations rely on the networks of the providers, a common test methodology with predefined metrics would benefit both parties.

此外,商务级客户寻求在不同地点之间进行可重复的TCP吞吐量测试。由于这些组织依赖于提供商的网络,因此具有预定义度量的通用测试方法将使双方受益。

Note that the primary focus of this methodology is managed business-class IP networks, e.g., those Ethernet-terminated services for which organizations are provided an SLA from the network provider. Because of the SLA, the expectation is that the TCP Throughput should achieve the guaranteed bandwidth. End-users with "best effort" access could use this methodology, but this framework and its metrics are intended to be used in a predictable managed IP network. No end-to-end performance can be guaranteed when only the access portion is being provisioned to a specific bandwidth capacity.

请注意,此方法的主要重点是受管理的业务级IP网络,例如,网络提供商向组织提供SLA的那些以以太网为终端的服务。由于SLA,TCP吞吐量应该达到保证的带宽。具有“尽力而为”访问权限的最终用户可以使用此方法,但此框架及其指标旨在用于可预测的托管IP网络。当仅将接入部分提供给特定带宽容量时,无法保证端到端性能。

The intent behind this document is to define a methodology for testing sustained TCP Layer performance. In this document, the achievable TCP Throughput is that amount of data per unit of time that TCP transports when in the TCP Equilibrium state. (See Section 1.3 for the TCP Equilibrium definition). Throughout this document, "maximum achievable throughput" refers to the theoretical achievable throughput when TCP is in the Equilibrium state.

本文档的目的是定义一种测试持续TCP层性能的方法。在本文中,可实现的TCP吞吐量是指TCP处于TCP平衡状态时每单位时间传输的数据量。(TCP平衡定义见第1.3节)。在本文档中,“最大可实现吞吐量”指TCP处于平衡状态时的理论可实现吞吐量。

TCP is connection oriented, and at the transmitting side, it uses a congestion window (TCP CWND). At the receiving end, TCP uses a receive window (TCP RWND) to inform the transmitting end on how many Bytes it is capable of accepting at a given time.

TCP是面向连接的,在传输端,它使用拥塞窗口(TCP CWND)。在接收端,TCP使用接收窗口(TCP RWND)通知发送端在给定时间能够接收多少字节。

Derived from Round-Trip Time (RTT) and network Bottleneck Bandwidth (BB), the Bandwidth-Delay Product (BDP) determines the Send and Received Socket buffer sizes required to achieve the maximum TCP Throughput. Then, with the help of slow start and congestion avoidance algorithms, a TCP CWND is calculated based on the IP network path loss rate. Finally, the minimum value between the calculated TCP CWND and the TCP RWND advertised by the opposite end will determine how many Bytes can actually be sent by the transmitting side at a given time.

带宽延迟积(BDP)源自往返时间(RTT)和网络瓶颈带宽(BB),它决定了实现最大TCP吞吐量所需的发送和接收套接字缓冲区大小。然后,借助慢启动和拥塞避免算法,基于IP网络路径丢失率计算TCP CWND。最后,计算出的TCP CWND和另一端播发的TCP RWND之间的最小值将确定在给定时间传输端实际可以发送多少字节。

Both TCP Window sizes (RWND and CWND) may vary during any given TCP session, although up to bandwidth limits, larger RWND and larger CWND will achieve higher throughputs by permitting more in-flight Bytes.

在任何给定的TCP会话期间,TCP窗口大小(RWND和CWND)都可能不同,尽管在带宽限制范围内,较大的RWND和CWND将通过允许更多的飞行字节来实现更高的吞吐量。

At both ends of the TCP connection and for each socket, there are default buffer sizes. There are also kernel-enforced maximum buffer sizes. These buffer sizes can be adjusted at both ends (transmitting and receiving). Some TCP/IP stack implementations use Receive Window Auto-Tuning, although, in order to obtain the maximum throughput, it is critical to use large enough TCP Send and Receive Socket Buffer sizes. In fact, they SHOULD be equal to or greater than BDP.

TCP连接的两端和每个套接字都有默认的缓冲区大小。还有内核强制的最大缓冲区大小。这些缓冲区大小可以在两端(发送和接收)进行调整。一些TCP/IP堆栈实现使用接收窗口自动调整,尽管为了获得最大吞吐量,使用足够大的TCP发送和接收套接字缓冲区是至关重要的。事实上,它们应该等于或大于BDP。

Many variables are involved in TCP Throughput performance, but this methodology focuses on the following:

TCP吞吐量性能涉及许多变量,但该方法主要关注以下方面:

- BB (Bottleneck Bandwidth)

- BB(瓶颈带宽)

- RTT (Round-Trip Time)

- RTT(往返时间)

- Send and Receive Socket Buffers

- 发送和接收套接字缓冲区

- Minimum TCP RWND

- 最小TCP RWND

- Path MTU (Maximum Transmission Unit)

- 路径MTU(最大传输单位)

This methodology proposes TCP testing that SHOULD be performed in addition to traditional tests of the Layer 2/3 type. In fact, Layer 2/3 tests are REQUIRED to verify the integrity of the network before conducting TCP tests. Examples include "iperf" (UDP mode) and manual packet-layer test techniques where packet throughput, loss, and delay measurements are conducted. When available, standardized testing similar to [RFC2544], but adapted for use in operational networks, MAY be used.

该方法提出了除了传统的2/3层测试之外,还应执行TCP测试。事实上,在进行TCP测试之前,需要进行第2/3层测试来验证网络的完整性。示例包括“iperf”(UDP模式)和手动数据包层测试技术,其中进行数据包吞吐量、丢失和延迟测量。如果可用,可使用类似于[RFC2544]的标准化测试,但适用于操作网络。

Note: [RFC2544] was never meant to be used outside a lab environment.

注:[RFC2544]从未打算在实验室环境之外使用。

Sections 2 and 3 of this document provide a general overview of the proposed methodology. Section 4 defines the metrics, while Section 5 explains how to conduct the tests and interpret the results.

本文件第2节和第3节概述了拟议的方法。第4节定义了指标,而第5节解释了如何进行测试和解释结果。

1.1. Requirements Language
1.1. 需求语言

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。

1.2. Terminology
1.2. 术语

The common definitions used in this methodology are as follows:

本方法中使用的常用定义如下:

- TCP Throughput Test Device (TCP TTD) refers to a compliant TCP host that generates traffic and measures metrics as defined in this methodology, i.e., a dedicated communications test instrument.

- TCP吞吐量测试设备(TCP TTD)是指一个兼容的TCP主机,它生成流量并测量本方法中定义的指标,即专用通信测试仪器。

- Customer Provided Equipment (CPE) refers to customer-owned equipment (routers, switches, computers, etc.).

- 客户提供设备(CPE)是指客户拥有的设备(路由器、交换机、计算机等)。

- Customer Edge (CE) refers to a provider-owned demarcation device.

- 客户边缘(CE)是指供应商拥有的标定设备。

- Provider Edge (PE) refers to a provider's distribution equipment.

- 提供商边缘(PE)是指提供商的分发设备。

- Bottleneck Bandwidth (BB) refers to the lowest bandwidth along the complete path. "Bottleneck Bandwidth" and "Bandwidth" are used synonymously in this document. Most of the time, the Bottleneck Bandwidth is in the access portion of the wide-area network (CE - PE).

- 瓶颈带宽(BB)是指沿完整路径的最低带宽。“瓶颈带宽”和“带宽”在本文档中同义使用。大多数情况下,瓶颈带宽位于广域网(CE-PE)的接入部分。

- Provider (P) refers to provider core network equipment.

- 提供商(P)指提供商核心网络设备。

- Network Under Test (NUT) refers to the tested IP network path.

- 被测网络(NUT)指被测IP网络路径。

- Round-Trip Time (RTT) is the elapsed time between the clocking in of the first bit of a TCP segment sent and the receipt of the last bit of the corresponding TCP Acknowledgment.

- 往返时间(RTT)是从发送的TCP段的第一位开始计时到收到相应TCP确认的最后一位之间经过的时间。

- Bandwidth-Delay Product (BDP) refers to the product of a data link's capacity (in bits per second) and its end-to-end delay (in seconds).

- 带宽延迟乘积(BDP)是指数据链路容量(以比特/秒为单位)与其端到端延迟(以秒为单位)的乘积。

   +---+ +----+ +----+  +----+ +---+  +---+ +----+  +----+ +----+ +---+
   |TCP|-| CPE|-| CE |--| PE |-| P |--| P |-| PE |--| CE |-| CPE|-|TCP|
   |TTD| |    | |    |BB|    | |   |  |   | |    |BB|    | |    | |TTD|
   +---+ +----+ +----+  +----+ +---+  +---+ +----+  +----+ +----+ +---+
         <------------------------ NUT ------------------------->
     R >-----------------------------------------------------------|
     T                                                             |
     T <-----------------------------------------------------------|
        
   +---+ +----+ +----+  +----+ +---+  +---+ +----+  +----+ +----+ +---+
   |TCP|-| CPE|-| CE |--| PE |-| P |--| P |-| PE |--| CE |-| CPE|-|TCP|
   |TTD| |    | |    |BB|    | |   |  |   | |    |BB|    | |    | |TTD|
   +---+ +----+ +----+  +----+ +---+  +---+ +----+  +----+ +----+ +---+
         <------------------------ NUT ------------------------->
     R >-----------------------------------------------------------|
     T                                                             |
     T <-----------------------------------------------------------|
        

Figure 1.2. Devices, Links, and Paths

图1.2。设备、链接和路径

Note that the NUT may be built with a variety of devices including, but not limited to, load balancers, proxy servers, or WAN acceleration appliances. The detailed topology of the NUT SHOULD be well-known when conducting the TCP Throughput tests, although this methodology makes no attempt to characterize specific network architectures.

请注意,NUT可以与各种设备一起构建,包括但不限于负载平衡器、代理服务器或WAN加速设备。在进行TCP吞吐量测试时,应熟知NUT的详细拓扑结构,尽管该方法不试图描述特定的网络架构。

1.3. TCP Equilibrium
1.3. TCP平衡

TCP connections have three (3) fundamental congestion window phases, which are depicted in Figure 1.3.

TCP连接有三(3)个基本拥塞窗口阶段,如图1.3所示。

1. The Slow Start phase, which occurs at the beginning of a TCP transmission or after a retransmission Time-Out.

1. 慢启动阶段,发生在TCP传输开始时或重传超时后。

2. The Congestion Avoidance phase, during which TCP ramps up to establish the maximum achievable throughput. It is important to note that retransmissions are a natural by-product of the TCP congestion avoidance algorithm as it seeks to achieve maximum throughput.

2. 拥塞避免阶段,在此期间,TCP会逐渐增加以建立最大可实现吞吐量。需要注意的是,重传是TCP拥塞避免算法的自然副产品,因为它寻求实现最大吞吐量。

3. The Loss Recovery phase, which could include Fast Retransmit (Tahoe) or Fast Recovery (Reno and New Reno). When packet loss occurs, the Congestion Avoidance phase transitions either to Fast Retransmission or Fast Recovery, depending upon the TCP implementation. If a Time-Out occurs, TCP transitions back to the Slow Start phase.

3. 丢失恢复阶段,可能包括快速重传(Tahoe)或快速恢复(Reno和New Reno)。当发生数据包丢失时,拥塞避免阶段转换为快速重传或快速恢复,具体取决于TCP实现。如果发生超时,TCP将转换回慢速启动阶段。

    /\  |
    /\  |High ssthresh  TCP CWND                         TCP
    /\  |Loss Event *   halving    3-Loss Recovery       Equilibrium
     T  |          * \  upon loss
     h  |          *  \    /  \        Time-Out            Adjusted
     r  |          *   \  /    \      +--------+         * ssthresh
   T o  |          *    \/      \    / Multiple|        *
   C u  |          * 2-Congestion\  /  Loss    |        *
   P g  |         *    Avoidance  \/   Event   |       *
     h  |        *              Half           |     *
     p  |      *                TCP CWND       | * 1-Slow Start
     u  | * 1-Slow Start                      Min TCP CWND after T-O
     t  +-----------------------------------------------------------
          Time > > > > > > > > > > > > > > > > > > > > > > > > > >
        
    /\  |
    /\  |High ssthresh  TCP CWND                         TCP
    /\  |Loss Event *   halving    3-Loss Recovery       Equilibrium
     T  |          * \  upon loss
     h  |          *  \    /  \        Time-Out            Adjusted
     r  |          *   \  /    \      +--------+         * ssthresh
   T o  |          *    \/      \    / Multiple|        *
   C u  |          * 2-Congestion\  /  Loss    |        *
   P g  |         *    Avoidance  \/   Event   |       *
     h  |        *              Half           |     *
     p  |      *                TCP CWND       | * 1-Slow Start
     u  | * 1-Slow Start                      Min TCP CWND after T-O
     t  +-----------------------------------------------------------
          Time > > > > > > > > > > > > > > > > > > > > > > > > > >
        

Note: ssthresh = Slow Start threshold.

注意:ssthresh=慢速启动阈值。

Figure 1.3. TCP CWND Phases

图1.3。TCP CWND阶段

A well-tuned and well-managed IP network with appropriate TCP adjustments in the IP hosts and applications should perform very close to the BB when TCP is in the Equilibrium state.

当TCP处于平衡状态时,在IP主机和应用程序中进行适当TCP调整的经过良好调优和良好管理的IP网络的性能应非常接近BB。

This TCP methodology provides guidelines to measure the maximum achievable TCP Throughput when TCP is in the Equilibrium state. All maximum achievable TCP Throughputs specified in Section 3.3 are with respect to this condition.

此TCP方法提供了在TCP处于平衡状态时测量最大可实现TCP吞吐量的指南。第3.3节中规定的所有最大可实现TCP吞吐量均与此条件有关。

It is important to clarify the interaction between the sender's Send Socket Buffer and the receiver's advertised TCP RWND size. TCP test programs such as "iperf", "ttcp", etc. allow the sender to control the quantity of TCP Bytes transmitted and unacknowledged (in-flight), commonly referred to as the Send Socket Buffer. This is done independently of the TCP RWND size advertised by the receiver.

澄清发送方的发送套接字缓冲区和接收方公布的TCP RWND大小之间的交互非常重要。TCP测试程序,如“iperf”、“ttcp”等,允许发送方控制传输和未确认的TCP字节数(在传输中),通常称为发送套接字缓冲区。这是独立于接收方公布的TCP RWND大小来完成的。

2. Scope and Goals
2. 范围和目标

Before defining the goals, it is important to clearly define the areas that are out of scope.

在定义目标之前,明确定义超出范围的领域是很重要的。

- This methodology is not intended to predict the TCP Throughput during the transient stages of a TCP connection, such as during the Slow Start phase.

- 此方法不用于在TCP连接的瞬态阶段(如慢启动阶段)预测TCP吞吐量。

- This methodology is not intended to definitively benchmark TCP implementations of one OS to another, although some users may find value in conducting qualitative experiments.

- 这种方法并不是为了确定一个操作系统到另一个操作系统的TCP实现的基准,尽管一些用户可能会发现进行定性实验的价值。

- This methodology is not intended to provide detailed diagnosis of problems within endpoints or within the network itself as related to non-optimal TCP performance, although results interpretation for each test step may provide insights to potential issues.

- 虽然每个测试步骤的结果解释可能会提供潜在问题的见解,但该方法并不旨在提供端点内或网络本身内与非最佳TCP性能相关的问题的详细诊断。

- This methodology does not propose to operate permanently with high measurement loads. TCP performance and optimization within operational networks MAY be captured and evaluated by using data from the "TCP Extended Statistics MIB" [RFC4898].

- 该方法不建议在高测量负载下永久运行。可通过使用“TCP扩展统计MIB”[RFC4898]中的数据来捕获和评估操作网络中的TCP性能和优化。

In contrast to the above exclusions, the primary goal is to define a method to conduct a practical end-to-end assessment of sustained TCP performance within a managed business-class IP network. Another key goal is to establish a set of "best practices" that a non-TCP expert SHOULD apply when validating the ability of a managed IP network to carry end-user TCP applications.

与上述排除情况相反,主要目标是定义一种方法,以便在托管业务级IP网络中对TCP的持续性能进行实际的端到端评估。另一个关键目标是建立一套非TCP专家在验证托管IP网络承载最终用户TCP应用程序的能力时应采用的“最佳实践”。

Specific goals are to:

具体目标是:

- Provide a practical test approach that specifies tunable parameters (such as MTU (Maximum Transmission Unit) and Socket Buffer sizes) and how these affect the outcome of TCP performance over an IP network.

- 提供一种实用的测试方法,指定可调参数(如MTU(最大传输单元)和套接字缓冲区大小),以及这些参数如何影响IP网络上TCP性能的结果。

- Provide specific test conditions such as link speed, RTT, MTU, Socket Buffer sizes, and achievable TCP Throughput when TCP is in the Equilibrium state. For guideline purposes, provide examples of test conditions and their maximum achievable TCP Throughput. Section 1.3 provides specific details concerning the definition of TCP Equilibrium within this methodology, while Section 3 provides specific test conditions with examples.

- 提供特定的测试条件,如链路速度、RTT、MTU、套接字缓冲区大小,以及TCP处于平衡状态时可实现的TCP吞吐量。出于指导目的,请提供测试条件及其最大可实现TCP吞吐量的示例。第1.3节提供了关于本方法中TCP平衡定义的具体细节,而第3节提供了带有示例的具体测试条件。

- Define three (3) basic metrics to compare the performance of TCP connections under various network conditions. See Section 4.

- 定义三(3)个基本指标来比较不同网络条件下TCP连接的性能。见第4节。

- Provide some areas within the end host or the network that SHOULD be considered for investigation in test situations where the recommended procedure does not yield the maximum achievable TCP Throughput. However, this methodology is not intended to provide detailed diagnosis on these issues. See Section 5.2.

- 在终端主机或网络中提供一些区域,在推荐程序不能产生最大可实现TCP吞吐量的测试情况下,应考虑对这些区域进行调查。然而,这种方法并不是为了对这些问题提供详细的诊断。见第5.2节。

3. Methodology
3. 方法论

This methodology is intended for operational and managed IP networks. A multitude of network architectures and topologies can be tested. The diagram in Figure 1.2 is very general and is only provided to illustrate typical segmentation within end-user and network provider domains.

此方法适用于操作和管理的IP网络。可以测试多种网络架构和拓扑。图1.2中的图表非常一般,仅用于说明最终用户和网络提供商域中的典型细分。

Also, as stated in Section 1, it is considered best practice to verify the integrity of the network by conducting Layer 2/3 tests such as [RFC2544] or other methods of network stress tests; although it is important to mention here that [RFC2544] was never meant to be used outside a lab environment.

此外,如第1节所述,通过进行第2/3层测试(如[RFC2544]或其他网络压力测试方法)验证网络完整性被视为最佳实践;尽管这里必须指出,[RFC2544]从未打算在实验室环境之外使用。

It is not possible to make an accurate TCP Throughput measurement when the network is dysfunctional. In particular, if the network is exhibiting high packet loss and/or high jitter, then TCP Layer Throughput testing will not be meaningful. As a guideline, 5% packet loss and/or 150 ms of jitter may be considered too high for an accurate measurement.

当网络功能失调时,不可能进行准确的TCP吞吐量测量。特别是,如果网络表现出高分组丢失和/或高抖动,那么TCP层吞吐量测试将没有意义。作为指导原则,5%的数据包丢失和/或150毫秒的抖动可能被认为对于准确的测量来说过高。

TCP Throughput testing may require cooperation between the end-user customer and the network provider. As an example, in an MPLS (Multiprotocol Label Switching) network architecture, the testing SHOULD be conducted either on the CPE or on the CE device and not on the PE (Provider Edge) router.

TCP吞吐量测试可能需要最终用户客户和网络提供商之间的合作。例如,在MPLS(多协议标签交换)网络体系结构中,测试应在CPE或CE设备上进行,而不是在PE(提供商边缘)路由器上进行。

The following represents the sequential order of steps for this testing methodology:

以下为本测试方法步骤的顺序:

1. Identify the Path MTU. Packetization Layer Path MTU Discovery (PLPMTUD) [RFC4821] SHOULD be conducted. It is important to identify the path MTU so that the TCP TTD is configured properly to avoid fragmentation.

1. 识别路径MTU。应执行打包层路径MTU发现(PLPMTUD)[RFC4821]。重要的是要识别路径MTU,以便正确配置TCP TTD以避免碎片。

2. Baseline Round-Trip Time and Bandwidth. This step establishes the inherent, non-congested Round-Trip Time (RTT) and the Bottleneck Bandwidth (BB) of the end-to-end network path. These measurements are used to provide estimates of the TCP RWND and Send Socket Buffer sizes that SHOULD be used during subsequent test steps.

2. 基线往返时间和带宽。该步骤确定端到端网络路径的固有、非拥塞往返时间(RTT)和瓶颈带宽(BB)。这些测量值用于提供在后续测试步骤中应使用的TCP RWND和发送套接字缓冲区大小的估计值。

3. TCP Connection Throughput Tests. With baseline measurements of Round-Trip Time and Bottleneck Bandwidth, single- and multiple-TCP-connection throughput tests SHOULD be conducted to baseline network performance.

3. TCP连接吞吐量测试。通过对往返时间和瓶颈带宽的基线测量,应进行单个和多个TCP连接吞吐量测试,以确定网络性能的基线。

These three (3) steps are detailed in Sections 3.1 to 3.3.

这三(3)个步骤详见第3.1至3.3节。

Important to note are some of the key characteristics and considerations for the TCP test instrument. The test host MAY be a standard computer or a dedicated communications test instrument. In both cases, it MUST be capable of emulating both a client and a server.

值得注意的是TCP测试仪器的一些关键特性和注意事项。测试主机可以是标准计算机或专用通信测试仪器。在这两种情况下,它必须能够同时模拟客户端和服务器。

The following criteria SHOULD be considered when selecting whether the TCP test host can be a standard computer or has to be a dedicated communications test instrument:

选择TCP测试主机是标准计算机还是专用通信测试仪器时,应考虑以下标准:

- TCP implementation used by the test host, OS version (e.g., LINUX OS kernel using TCP New Reno), TCP options supported, etc. will obviously be more important when using dedicated communications test instruments where the TCP implementation may be customized or tuned to run in higher-performance hardware. When a compliant TCP TTD is used, the TCP implementation SHOULD be identified in the test results. The compliant TCP TTD SHOULD be usable for complete end-to-end testing through network security elements and SHOULD also be usable for testing network sections.

- 当使用专用通信测试仪器时,测试主机使用的TCP实现、操作系统版本(例如,使用TCP New Reno的LINUX操作系统内核)、支持的TCP选项等显然更为重要,在专用通信测试仪器中,TCP实现可以定制或调整以在更高性能的硬件中运行。当使用兼容的TCP TTD时,应在测试结果中确定TCP实现。兼容的TCP TTD应可用于通过网络安全元素进行完整的端到端测试,还应可用于测试网络部分。

- More importantly, the TCP test host MUST be capable of generating and receiving stateful TCP test traffic at the full BB of the NUT. Stateful TCP test traffic means that the test host MUST fully implement a TCP/IP stack; this is generally a comment aimed at dedicated communications test equipment that sometimes "blasts" packets with TCP headers. At the time of this publication, testing TCP Throughput at rates greater than 100 Mbps may require high-performance server hardware or dedicated hardware-based test tools.

- 更重要的是,TCP测试主机必须能够在NUT的完整BB上生成和接收有状态的TCP测试流量。有状态TCP测试流量意味着测试主机必须完全实现TCP/IP堆栈;这通常是针对专用通信测试设备的评论,这些设备有时会使用TCP头“爆炸”数据包。在本出版物发布时,以大于100 Mbps的速率测试TCP吞吐量可能需要高性能服务器硬件或专用的基于硬件的测试工具。

- A compliant TCP Throughput Test Device MUST allow adjusting both Send and Receive Socket Buffer sizes. The Socket Buffers MUST be large enough to fill the BDP.

- 兼容的TCP吞吐量测试设备必须允许调整发送和接收套接字缓冲区大小。套接字缓冲区必须足够大以填充BDP。

- Measuring RTT and retransmissions per connection will generally require a dedicated communications test instrument. In the absence of dedicated hardware-based test tools, these measurements may need to be conducted with packet capture tools, i.e., conduct TCP Throughput tests and analyze RTT and retransmissions in packet captures. Another option MAY be to use the "TCP Extended Statistics MIB" [RFC4898].

- 测量每个连接的RTT和重传通常需要专用的通信测试仪器。在没有专用的基于硬件的测试工具的情况下,这些测量可能需要使用数据包捕获工具进行,即进行TCP吞吐量测试,并分析数据包捕获中的RTT和重传。另一个选项可能是使用“TCP扩展统计信息管理库”[RFC4898]。

- The [RFC4821] PLPMTUD test SHOULD be conducted with a dedicated tester that exposes the ability to run the PLPMTUD algorithm independently from the OS stack.

- [RFC4821]PLPMTUD测试应使用专用测试仪进行,该测试仪能够独立于操作系统堆栈运行PLPMTUD算法。

3.1. Path MTU
3.1. 路径MTU

TCP implementations should use Path MTU Discovery techniques (PMTUD). PMTUD relies on ICMP 'need to frag' messages to learn the path MTU. When a device has a packet to send that has the Don't Fragment (DF) bit in the IP header set and the packet is larger than the MTU of the next hop, the packet is dropped, and the device sends an ICMP 'need to frag' message back to the host that originated the packet. The ICMP 'need to frag' message includes the next-hop MTU, which PMTUD uses to adjust itself. Unfortunately, because many network managers completely disable ICMP, this technique does not always prove reliable.

TCP实现应该使用路径MTU发现技术(PMTUD)。PMTUD依赖ICMP“需要碎片”消息来了解MTU路径。当设备要发送的数据包在IP报头中设置了不分段(DF)位,且该数据包大于下一跳的MTU时,该数据包将被丢弃,并且该设备将ICMP“需要分段”消息发送回发起该数据包的主机。ICMP“需要frag”消息包括下一跳MTU,PMTUD使用该MTU进行自我调整。不幸的是,由于许多网络管理器完全禁用ICMP,这种技术并不总是可靠的。

Packetization Layer Path MTU Discovery (PLPMTUD) [RFC4821] MUST then be conducted to verify the network path MTU. PLPMTUD can be used with or without ICMP. [RFC4821] specifies search_high and search_low parameters for the MTU, and we recommend using those parameters. The goal is to avoid fragmentation during all subsequent tests.

然后必须执行打包层路径MTU发现(PLPMTUD)[RFC4821]以验证网络路径MTU。PLPMTUD可以与ICMP一起使用,也可以不与ICMP一起使用。[RFC4821]为MTU指定搜索高和搜索低参数,我们建议使用这些参数。目标是避免在所有后续测试中出现碎片。

3.2. Round-Trip Time (RTT) and Bottleneck Bandwidth (BB)
3.2. 往返时间(RTT)和瓶颈带宽(BB)

Before stateful TCP testing can begin, it is important to determine the baseline RTT (i.e., non-congested inherent delay) and BB of the end-to-end network to be tested. These measurements are used to calculate the BDP and to provide estimates of the TCP RWND and Send Socket Buffer sizes that SHOULD be used in subsequent test steps.

在有状态TCP测试开始之前,确定要测试的端到端网络的基线RTT(即非拥塞固有延迟)和BB非常重要。这些测量值用于计算BDP,并提供在后续测试步骤中应使用的TCP RWND和发送套接字缓冲区大小的估计值。

3.2.1. Measuring RTT
3.2.1. 测量RTT

As previously defined in Section 1.2, RTT is the elapsed time between the clocking in of the first bit of a TCP segment sent and the receipt of the last bit of the corresponding TCP Acknowledgment.

正如前面在第1.2节中定义的,RTT是发送的TCP段的第一位打卡到接收相应TCP确认的最后一位之间经过的时间。

The RTT SHOULD be baselined during off-peak hours in order to obtain a reliable figure of the inherent network latency. Otherwise, additional delay caused by network buffering can occur. Also, when sampling RTT values over a given test interval, the minimum measured value SHOULD be used as the baseline RTT. This will most closely estimate the real inherent RTT. This value is also used to determine the Buffer Delay Percentage metric defined in Section 4.3.

RTT应在非高峰时段基线化,以便获得固有网络延迟的可靠数字。否则,可能会出现由网络缓冲引起的额外延迟。此外,当在给定试验间隔内对RTT值进行取样时,应将最小测量值用作基线RTT。这将最接近地估计实际固有RTT。该值还用于确定第4.3节中定义的缓冲区延迟百分比指标。

The following list is not meant to be exhaustive, although it summarizes some of the most common ways to determine Round-Trip Time. The desired measurement precision (i.e., ms versus us) may dictate whether the RTT measurement can be achieved with ICMP pings or by a dedicated communications test instrument with precision timers. The objective of this section is to list several techniques in order of decreasing accuracy.

下面的列表并非详尽无遗,尽管它总结了一些确定往返时间的最常用方法。所需的测量精度(即ms与us)可能决定RTT测量是否可以通过ICMP ping或带有精密定时器的专用通信测试仪器实现。本节的目的是列出几种降低精度的方法。

- Use test equipment on each end of the network, "looping" the far-end tester so that a packet stream can be measured back and forth from end to end. This RTT measurement may be compatible with delay measurement protocols specified in [RFC5357].

- 在网络的每一端使用测试设备,“循环”远端测试仪,以便可以从端到端来回测量数据包流。该RTT测量可能与[RFC5357]中规定的延迟测量协议兼容。

- Conduct packet captures of TCP test sessions using "iperf" or FTP, or other TCP test applications. By running multiple experiments, packet captures can then be analyzed to estimate RTT. It is important to note that results based upon the SYN -> SYN-ACK at the beginning of TCP sessions SHOULD be avoided, since Firewalls might slow down 3-way handshakes. Also, at the sender's side, Ostermann's LINUX TCPTRACE utility with -l -r arguments can be used to extract the RTT results directly from the packet captures.

- 使用“iperf”或FTP或其他TCP测试应用程序执行TCP测试会话的数据包捕获。通过运行多个实验,可以分析数据包捕获以估计RTT。重要的是要注意,应避免在TCP会话开始时基于SYN->SYN-ACK的结果,因为防火墙可能会减慢三方握手。另外,在发送方方面,可以使用Ostermann的LinuxTcpTrace实用程序和-l-r参数直接从数据包捕获中提取RTT结果。

- Obtain RTT statistics available from MIBs defined in [RFC4898].

- 从[RFC4898]中定义的MIB获取RTT统计信息。

- ICMP pings may also be adequate to provide Round-Trip Time estimates, provided that the packet size is factored into the estimates (i.e., pings with different packet sizes might be required). Some limitations with ICMP ping may include ms resolution and whether or not the network elements are responding to pings. Also, ICMP is often rate-limited or segregated into different buffer queues. ICMP might not work if QoS (Quality of Service) reclassification is done at any hop. ICMP is not as reliable and accurate as in-band measurements.

- ICMP ping也足以提供往返时间估计,前提是在估计中考虑了数据包大小(即,可能需要具有不同数据包大小的ping)。ICMP ping的一些限制可能包括ms分辨率以及网元是否响应ping。此外,ICMP通常受速率限制,或被隔离到不同的缓冲队列中。如果在任何跃点进行QoS(服务质量)重新分类,ICMP可能无法工作。ICMP不像带内测量那样可靠和准确。

3.2.2. Measuring BB
3.2.2. 测量BB

Before any TCP Throughput test can be conducted, bandwidth measurement tests SHOULD be run with stateless IP streams (i.e., not stateful TCP) in order to determine the BB of the NUT. These measurements SHOULD be conducted in both directions, especially in asymmetrical access networks (e.g., Asymmetric Bit-Rate DSL (ADSL) access). These tests SHOULD be performed at various intervals throughout a business day or even across a week.

在进行任何TCP吞吐量测试之前,应使用无状态IP流(即非有状态TCP)运行带宽测量测试,以确定NUT的BB。这些测量应在两个方向上进行,特别是在非对称接入网络中(例如,非对称比特率DSL(ADSL)接入)。这些测试应在一个工作日甚至一周内以不同的间隔进行。

Testing at various time intervals would provide a better characterization of TCP Throughput and better diagnosis insight (for cases where there are TCP performance issues). The bandwidth tests SHOULD produce logged outputs of the achieved bandwidths across the complete test duration.

在不同的时间间隔进行测试可以更好地描述TCP吞吐量和更好的诊断洞察力(对于存在TCP性能问题的情况)。带宽测试应在整个测试期间产生已实现带宽的记录输出。

There are many well-established techniques available to provide estimated measures of bandwidth over a network. It is a common practice for network providers to conduct Layer 2/3 bandwidth capacity tests using [RFC2544], although it is understood that [RFC2544] was never meant to be used outside a lab environment. These bandwidth measurements SHOULD use network capacity techniques as defined in [RFC5136].

有许多成熟的技术可用于提供网络带宽的估计度量。网络提供商使用[RFC2544]进行第2/3层带宽容量测试是一种常见做法,但据了解,[RFC2544]从未打算在实验室环境之外使用。这些带宽测量应使用[RFC5136]中定义的网络容量技术。

3.3. Measuring TCP Throughput
3.3. 测量TCP吞吐量

This methodology specifically defines TCP Throughput measurement techniques to verify maximum achievable TCP performance in a managed business-class IP network.

此方法专门定义TCP吞吐量测量技术,以验证托管业务级IP网络中可实现的最大TCP性能。

With baseline measurements of RTT and BB from Section 3.2, a series of single- and/or multiple-TCP-connection throughput tests SHOULD be conducted.

根据第3.2节中RTT和BB的基线测量,应进行一系列单个和/或多个TCP连接吞吐量测试。

The number of trials and the choice between single or multiple TCP connections will be based on the intention of the test. A single-TCP-connection test might be enough to measure the achievable throughput of Metro Ethernet connectivity. However, it is important

试验次数以及单个或多个TCP连接之间的选择将取决于测试的意图。单个TCP连接测试可能足以测量城域以太网连接的可实现吞吐量。然而,这很重要

to note that various traffic management techniques can be used in an IP network and that some of those techniques can only be tested with multiple connections. As an example, multiple TCP sessions might be required to detect traffic shaping versus policing. Multiple sessions might also be needed to measure Active Queue Management performance. However, traffic management testing is not within the scope of this test methodology.

请注意,IP网络中可以使用各种流量管理技术,其中一些技术只能通过多个连接进行测试。例如,可能需要多个TCP会话来检测流量整形与监控。还可能需要多个会话来度量活动队列管理性能。但是,流量管理测试不在本测试方法的范围内。

In all circumstances, it is RECOMMENDED to run the tests in each direction independently first and then to run them in both directions simultaneously. It is also RECOMMENDED to run the tests at different times of the day.

在所有情况下,建议先在每个方向独立运行测试,然后在两个方向同时运行测试。还建议在一天中的不同时间运行测试。

In each case, the TCP Transfer Time Ratio, the TCP Efficiency Percentage, and the Buffer Delay Percentage MUST be measured in each direction. These 3 metrics are defined in Section 4.

在每种情况下,必须在每个方向上测量TCP传输时间比率、TCP效率百分比和缓冲区延迟百分比。第4节定义了这3个指标。

3.3.1. Minimum TCP RWND
3.3.1. 最小TCP RWND

The TCP TTD MUST allow the Send Socket Buffer and Receive Window sizes to be set higher than the BDP; otherwise, TCP performance will be limited. In the business customer environment, these settings are not generally adjustable by the average user. These settings are either hard-coded in the application or configured within the OS as part of a corporate image. In many cases, the user's host Send Socket Buffer and Receive Window size settings are not optimal.

TCP TTD必须允许发送套接字缓冲区和接收窗口大小设置为高于BDP;否则,TCP性能将受到限制。在业务客户环境中,这些设置通常不可由普通用户调整。这些设置要么在应用程序中硬编码,要么作为公司映像的一部分在操作系统中配置。在许多情况下,用户的主机发送套接字缓冲区和接收窗口大小设置不是最佳的。

This section provides derivations of BDPs under various network conditions. It also provides examples of achievable TCP Throughput with various TCP RWND sizes. This provides important guidelines showing what can be achieved with settings higher than the BDP, versus what would be achieved in a variety of real-world conditions.

本节提供各种网络条件下BDP的推导。它还提供了各种TCP RWND大小的可实现TCP吞吐量示例。这提供了重要的指导原则,显示了在高于BDP的设置下可以实现什么,以及在各种实际条件下可以实现什么。

The minimum required TCP RWND size can be calculated from the Bandwidth-Delay Product (BDP), which is as follows:

所需的最小TCP RWND大小可通过带宽延迟乘积(BDP)计算得出,如下所示:

BDP (bits) = RTT (sec) X BB (bps)

BDP(比特)=RTT(秒)X BB(bps)

Note that the RTT is being used as the "Delay" variable for the BDP. Then, by dividing the BDP by 8, we obtain the minimum required TCP RWND size in Bytes. For optimal results, the Send Socket Buffer MUST be adjusted to the same value at each end of the network.

注意,RTT被用作BDP的“延迟”变量。然后,通过将BDP除以8,我们获得所需的最小TCP RWND大小(以字节为单位)。为了获得最佳结果,必须在网络的每一端将发送套接字缓冲区调整为相同的值。

Minimum required TCP RWND = BDP / 8

所需的最低TCP RWND=BDP/8

As an example, on a T3 link with 25-ms RTT, the BDP would equal ~1,105,000 bits, and the minimum required TCP RWND would be ~138 KB.

例如,在具有25 ms RTT的T3链路上,BDP将等于约1105000位,并且所需的最小TCP RWND将为约138 KB。

Note that separate calculations are REQUIRED on asymmetrical paths. An asymmetrical-path example would be a 90-ms RTT ADSL line with 5 Mbps downstream and 640 Kbps upstream. The downstream BDP would equal ~450,000 bits, while the upstream one would be only ~57,600 bits.

请注意,不对称路径上需要单独计算。一个不对称路径示例是下行速度为5 Mbps、上行速度为640 Kbps的90 ms RTT ADSL线路。下游BDP将等于约450000位,而上游BDP仅为约57600位。

The following table provides some representative network link speeds, RTT, BDP, and their associated minimum required TCP RWND sizes.

下表提供了一些具有代表性的网络链路速度、RTT、BDP及其相关的最低要求TCP RWND大小。

       Link                                        Minimum Required
       Speed*        RTT              BDP             TCP RWND
       (Mbps)        (ms)            (bits)           (KBytes)
   --------------------------------------------------------------------
        1.536        20.00           30,720              3.84
        1.536        50.00           76,800              9.60
        1.536       100.00          153,600             19.20
       44.210        10.00          442,100             55.26
       44.210        15.00          663,150             82.89
       44.210        25.00        1,105,250            138.16
      100.000         1.00          100,000             12.50
      100.000         2.00          200,000             25.00
      100.000         5.00          500,000             62.50
    1,000.000         0.10          100,000             12.50
    1,000.000         0.50          500,000             62.50
    1,000.000         1.00        1,000,000            125.00
   10,000.000         0.05          500,000             62.50
   10,000.000         0.30        3,000,000            375.00
        
       Link                                        Minimum Required
       Speed*        RTT              BDP             TCP RWND
       (Mbps)        (ms)            (bits)           (KBytes)
   --------------------------------------------------------------------
        1.536        20.00           30,720              3.84
        1.536        50.00           76,800              9.60
        1.536       100.00          153,600             19.20
       44.210        10.00          442,100             55.26
       44.210        15.00          663,150             82.89
       44.210        25.00        1,105,250            138.16
      100.000         1.00          100,000             12.50
      100.000         2.00          200,000             25.00
      100.000         5.00          500,000             62.50
    1,000.000         0.10          100,000             12.50
    1,000.000         0.50          500,000             62.50
    1,000.000         1.00        1,000,000            125.00
   10,000.000         0.05          500,000             62.50
   10,000.000         0.30        3,000,000            375.00
        

* Note that link speed is the BB for the NUT

* 注意,连杆速度是螺母的BB

Table 3.3.1. Link Speed, RTT, Calculated BDP, and Minimum TCP RWND

表3.3.1。链路速度、RTT、计算的BDP和最小TCP RWND

In the above table, the following serial link speeds are used:

在上表中,使用了以下串行链路速度:

- T1 = 1.536 Mbps (for a B8ZS line encoding facility) - T3 = 44.21 Mbps (for a C-Bit framing facility)

- T1=1.536 Mbps(对于B8ZS线路编码设备)-T3=44.21 Mbps(对于C位成帧设备)

The previous table illustrates the minimum required TCP RWND. If a smaller TCP RWND size is used, then the TCP Throughput cannot be optimal. To calculate the TCP Throughput, the following formula is used:

上表说明了所需的最小TCP RWND。如果使用较小的TCP RWND大小,则TCP吞吐量无法达到最佳。要计算TCP吞吐量,使用以下公式:

TCP Throughput = TCP RWND X 8 / RTT

TCP吞吐量=TCP RWND X 8/RTT

An example could be a 100-Mbps IP path with 5-ms RTT and a TCP RWND of 16 KB; then:

例如,具有5-ms RTT和16 KB TCP RWND的100 Mbps IP路径;然后:

      TCP Throughput = 16 KBytes X 8 bits / 5 ms
      TCP Throughput = 128,000 bits / 0.005 sec
      TCP Throughput = 25.6 Mbps
        
      TCP Throughput = 16 KBytes X 8 bits / 5 ms
      TCP Throughput = 128,000 bits / 0.005 sec
      TCP Throughput = 25.6 Mbps
        

Another example, for a T3 using the same calculation formula, is illustrated in Figure 3.3.1a:

使用相同计算公式的T3的另一个示例如图3.3.1a所示:

      TCP Throughput = 16 KBytes X 8 bits / 10 ms
      TCP Throughput = 128,000 bits / 0.01 sec
      TCP Throughput = 12.8 Mbps*
        
      TCP Throughput = 16 KBytes X 8 bits / 10 ms
      TCP Throughput = 128,000 bits / 0.01 sec
      TCP Throughput = 12.8 Mbps*
        

When the TCP RWND size exceeds the BDP (T3 link and 64-KByte TCP RWND on a 10-ms RTT path), the maximum Frames Per Second (FPS) limit of 3664 is reached, and then the formula is:

当TCP RWND大小超过BDP(10 ms RTT路径上的T3链路和64 KByte TCP RWND)时,达到每秒最大帧数(FPS)限制3664,则公式为:

      TCP Throughput = max FPS X (MTU - 40) X 8
      TCP Throughput = 3664 FPS X 1460 Bytes X 8 bits
      TCP Throughput = 42.8 Mbps**
        
      TCP Throughput = max FPS X (MTU - 40) X 8
      TCP Throughput = 3664 FPS X 1460 Bytes X 8 bits
      TCP Throughput = 42.8 Mbps**
        

The following diagram compares achievable TCP Throughputs on a T3 with Send Socket Buffer and TCP RWND sizes of 16 KB versus 64 KB.

下图比较了发送套接字缓冲区和TCP RWND大小分别为16 KB和64 KB的T3上可实现的TCP吞吐量。

             45|
               |           _______**42.8
             40|           |64KB |
    TCP        |           |     |
   Through-  35|           |     |
    put        |           |     |          +-----+34.1
   (Mbps)    30|           |     |          |64KB |
               |           |     |          |     |
             25|           |     |          |     |
               |           |     |          |     |
             20|           |     |          |     |          _______20.5
               |           |     |          |     |          |64KB |
             15|           |     |          |     |          |     |
               |*12.8+-----|     |          |     |          |     |
             10|     |16KB |     |          |     |          |     |
               |     |     |     |8.5 +-----|     |          |     |
              5|     |     |     |    |16KB |     |5.1 +-----|     |
               |_____|_____|_____|____|_____|_____|____|16KB |_____|____
                          10               15               25
                                  RTT (milliseconds)
        
             45|
               |           _______**42.8
             40|           |64KB |
    TCP        |           |     |
   Through-  35|           |     |
    put        |           |     |          +-----+34.1
   (Mbps)    30|           |     |          |64KB |
               |           |     |          |     |
             25|           |     |          |     |
               |           |     |          |     |
             20|           |     |          |     |          _______20.5
               |           |     |          |     |          |64KB |
             15|           |     |          |     |          |     |
               |*12.8+-----|     |          |     |          |     |
             10|     |16KB |     |          |     |          |     |
               |     |     |     |8.5 +-----|     |          |     |
              5|     |     |     |    |16KB |     |5.1 +-----|     |
               |_____|_____|_____|____|_____|_____|____|16KB |_____|____
                          10               15               25
                                  RTT (milliseconds)
        

Figure 3.3.1a. TCP Throughputs on a T3 at Different RTTs

图3.3.1a。不同RTT下T3上的TCP吞吐量

The following diagram shows the achievable TCP Throughput on a 25-ms T3 when Send Socket Buffer and TCP RWND sizes are increased.

下图显示了当发送套接字缓冲区和TCP RWND大小增加时,25 ms T3上可实现的TCP吞吐量。

             45|
               |
             40|                                            +-----+40.9
    TCP        |                                            |     |
   Through-  35|                                            |     |
    put        |                                            |     |
   (Mbps)    30|                                            |     |
               |                                            |     |
             25|                                            |     |
               |                                            |     |
             20|                               +-----+20.5  |     |
               |                               |     |      |     |
             15|                               |     |      |     |
               |                               |     |      |     |
             10|                  +-----+10.2  |     |      |     |
               |                  |     |      |     |      |     |
              5|     +-----+5.1   |     |      |     |      |     |
               |_____|_____|______|_____|______|_____|______|_____|_____
                       16           32           64            128*
                            TCP RWND Size (KBytes)
        
             45|
               |
             40|                                            +-----+40.9
    TCP        |                                            |     |
   Through-  35|                                            |     |
    put        |                                            |     |
   (Mbps)    30|                                            |     |
               |                                            |     |
             25|                                            |     |
               |                                            |     |
             20|                               +-----+20.5  |     |
               |                               |     |      |     |
             15|                               |     |      |     |
               |                               |     |      |     |
             10|                  +-----+10.2  |     |      |     |
               |                  |     |      |     |      |     |
              5|     +-----+5.1   |     |      |     |      |     |
               |_____|_____|______|_____|______|_____|______|_____|_____
                       16           32           64            128*
                            TCP RWND Size (KBytes)
        

* Note that 128 KB requires the [RFC1323] TCP Window Scale option.

* 请注意,128 KB需要[RFC1323]TCP窗口缩放选项。

Figure 3.3.1b. TCP Throughputs on a T3 with Different TCP RWND

图3.3.1b。具有不同TCP RWND的T3上的TCP吞吐量

4. TCP Metrics
4. TCP度量

This methodology focuses on a TCP Throughput and provides 3 basic metrics that can be used for better understanding of the results. It is recognized that the complexity and unpredictability of TCP makes it very difficult to develop a complete set of metrics that accounts for the myriad of variables (i.e., RTT variations, loss conditions, TCP implementations, etc.). However, these 3 metrics facilitate TCP Throughput comparisons under varying network conditions and host buffer size/RWND settings.

该方法侧重于TCP吞吐量,并提供了3个基本指标,可用于更好地理解结果。人们认识到,TCP的复杂性和不可预测性使得很难制定一套完整的指标来解释无数的变量(即RTT变化、丢失情况、TCP实现等)。但是,这3个指标有助于在不同的网络条件和主机缓冲区大小/RWND设置下比较TCP吞吐量。

4.1. Transfer Time Ratio
4.1. 传输时间比

The first metric is the TCP Transfer Time Ratio, which is simply the ratio between the Actual TCP Transfer Time versus the Ideal TCP Transfer Time.

第一个指标是TCP传输时间比率,它只是实际TCP传输时间与理想TCP传输时间之间的比率。

The Actual TCP Transfer Time is simply the time it takes to transfer a block of data across TCP connection(s).

实际TCP传输时间只是通过TCP连接传输数据块所需的时间。

The Ideal TCP Transfer Time is the predicted time for which a block of data SHOULD transfer across TCP connection(s), considering the BB of the NUT.

理想的TCP传输时间是一个数据块应在TCP连接上传输的预测时间,考虑到螺母的BB。

                                 Actual TCP Transfer Time
      TCP Transfer Time Ratio =  -------------------------
                                 Ideal TCP Transfer Time
        
                                 Actual TCP Transfer Time
      TCP Transfer Time Ratio =  -------------------------
                                 Ideal TCP Transfer Time
        

The Ideal TCP Transfer Time is derived from the Maximum Achievable TCP Throughput, which is related to the BB and Layer 1/2/3/4 overheads associated with the network path. The following sections provide derivations for the Maximum Achievable TCP Throughput and example calculations for the TCP Transfer Time Ratio.

理想的TCP传输时间来自可达到的最大TCP吞吐量,该吞吐量与BB和与网络路径相关的第1/2/3/4层开销有关。以下各节提供了最大可实现TCP吞吐量的推导以及TCP传输时间比的示例计算。

4.1.1. Maximum Achievable TCP Throughput Calculation
4.1.1. 最大可达TCP吞吐量计算

This section provides formulas to calculate the Maximum Achievable TCP Throughput, with examples for T3 (44.21 Mbps) and Ethernet.

本节提供了计算最大可实现TCP吞吐量的公式,并以T3(44.21 Mbps)和以太网为例。

All calculations are based on IP version 4 with TCP/IP headers of 20 Bytes each (20 for TCP + 20 for IP) within an MTU of 1500 Bytes.

所有计算均基于IP版本4,在1500字节的MTU内,每个TCP/IP头为20字节(TCP为20+IP为20)。

First, the maximum achievable Layer 2 throughput of a T3 interface is limited by the maximum quantity of Frames Per Second (FPS) permitted by the actual physical layer (Layer 1) speed.

首先,T3接口的最大可实现的第2层吞吐量受到实际物理层(第1层)速度允许的最大每秒帧数(FPS)的限制。

The calculation formula is:

计算公式为:

      FPS = T3 Physical Speed / ((MTU + PPP + Flags + CRC16) X 8)
        
      FPS = T3 Physical Speed / ((MTU + PPP + Flags + CRC16) X 8)
        
      FPS = (44.21 Mbps /
                 ((1500 Bytes + 4 Bytes + 2 Bytes + 2 Bytes) X 8 )))
      FPS = (44.21 Mbps / (1508 Bytes X 8))
      FPS = 44.21 Mbps / 12064 bits
      FPS = 3664
        
      FPS = (44.21 Mbps /
                 ((1500 Bytes + 4 Bytes + 2 Bytes + 2 Bytes) X 8 )))
      FPS = (44.21 Mbps / (1508 Bytes X 8))
      FPS = 44.21 Mbps / 12064 bits
      FPS = 3664
        

Then, to obtain the Maximum Achievable TCP Throughput (Layer 4), we simply use:

然后,为了获得最大可实现的TCP吞吐量(第4层),我们只需使用:

(MTU - 40) in Bytes X 8 bits X max FPS

(MTU-40)字节X 8位X最大FPS

For a T3, the maximum TCP Throughput =

对于T3,最大TCP吞吐量=

1460 Bytes X 8 bits X 3664 FPS

1460字节X 8位X 3664 FPS

Maximum TCP Throughput = 11680 bits X 3664 FPS Maximum TCP Throughput = 42.8 Mbps

最大TCP吞吐量=11680位X 3664 FPS最大TCP吞吐量=42.8 Mbps

On Ethernet, the maximum achievable Layer 2 throughput is limited by the maximum Frames Per Second permitted by the IEEE802.3 standard.

在以太网上,可实现的最大第2层吞吐量受到IEEE802.3标准允许的最大每秒帧数的限制。

The maximum FPS for 100-Mbps Ethernet is 8127, and the calculation formula is:

100Mbps以太网的最大FPS为8127,计算公式为:

      FPS = (100 Mbps / (1538 Bytes X 8 bits))
        
      FPS = (100 Mbps / (1538 Bytes X 8 bits))
        

The maximum FPS for GigE is 81274, and the calculation formula is:

GigE的最大FPS为81274,计算公式为:

      FPS = (1 Gbps / (1538 Bytes X 8 bits))
        
      FPS = (1 Gbps / (1538 Bytes X 8 bits))
        

The maximum FPS for 10GigE is 812743, and the calculation formula is:

10GigE的最大FPS为812743,计算公式为:

      FPS = (10 Gbps / (1538 Bytes X 8 bits))
        
      FPS = (10 Gbps / (1538 Bytes X 8 bits))
        

The 1538 Bytes equates to:

1538字节等于:

      MTU + Ethernet + CRC32 + IFG + Preamble + SFD
           (IFG = Inter-Frame Gap and SFD = Start of Frame Delimiter)
        
      MTU + Ethernet + CRC32 + IFG + Preamble + SFD
           (IFG = Inter-Frame Gap and SFD = Start of Frame Delimiter)
        

where MTU is 1500 Bytes, Ethernet is 14 Bytes, CRC32 is 4 Bytes, IFG is 12 Bytes, Preamble is 7 Bytes, and SFD is 1 Byte.

其中MTU为1500字节,以太网为14字节,CRC32为4字节,IFG为12字节,前导码为7字节,SFD为1字节。

Then, to obtain the Maximum Achievable TCP Throughput (Layer 4), we simply use:

然后,为了获得最大可实现的TCP吞吐量(第4层),我们只需使用:

(MTU - 40) in Bytes X 8 bits X max FPS

(MTU-40)字节X 8位X最大FPS

For 100-Mbps Ethernet, the maximum TCP Throughput =

对于100 Mbps以太网,最大TCP吞吐量=

1460 Bytes X 8 bits X 8127 FPS

1460字节X 8位X 8127 FPS

Maximum TCP Throughput = 11680 bits X 8127 FPS Maximum TCP Throughput = 94.9 Mbps

最大TCP吞吐量=11680位X 8127 FPS最大TCP吞吐量=94.9 Mbps

It is important to note that better results could be obtained with jumbo frames on Gigabit and 10-Gigabit Ethernet interfaces.

值得注意的是,在千兆和万兆以太网接口上使用巨型帧可以获得更好的结果。

4.1.2. TCP Transfer Time and Transfer Time Ratio Calculation
4.1.2. TCP传输时间和传输时间比率计算

The following table illustrates the Ideal TCP Transfer Time of a single TCP connection when its TCP RWND and Send Socket Buffer sizes equal or exceed the BDP.

下表说明了当单个TCP连接的TCP RWND和发送套接字缓冲区大小等于或超过BDP时,理想的TCP传输时间。

       Link                             Maximum            Ideal TCP
       Speed                   BDP      Achievable TCP     Transfer Time
       (Mbps)     RTT (ms)   (KBytes)   Throughput(Mbps)   (seconds)*
   --------------------------------------------------------------------
         1.536    50.00         9.6            1.4             571.0
        44.210    25.00       138.2           42.8              18.0
       100.000     2.00        25.0           94.9               9.0
     1,000.000     1.00       125.0          949.2               1.0
    10,000.000     0.05        62.5        9,492.0               0.1
        
       Link                             Maximum            Ideal TCP
       Speed                   BDP      Achievable TCP     Transfer Time
       (Mbps)     RTT (ms)   (KBytes)   Throughput(Mbps)   (seconds)*
   --------------------------------------------------------------------
         1.536    50.00         9.6            1.4             571.0
        44.210    25.00       138.2           42.8              18.0
       100.000     2.00        25.0           94.9               9.0
     1,000.000     1.00       125.0          949.2               1.0
    10,000.000     0.05        62.5        9,492.0               0.1
        

* Transfer times are rounded for simplicity.

* 为了简单起见,传输时间是四舍五入的。

Table 4.1.2. Link Speed, RTT, BDP, TCP Throughput, and Ideal TCP Transfer Time for a 100-MB File

表4.1.2。100-MB文件的链路速度、RTT、BDP、TCP吞吐量和理想TCP传输时间

For a 100-MB file (100 X 8 = 800 Mbits), the Ideal TCP Transfer Time is derived as follows:

对于100-MB文件(100 X 8=800 Mbits),理想的TCP传输时间如下所示:

                                          800 Mbits
      Ideal TCP Transfer Time = -----------------------------------
                                 Maximum Achievable TCP Throughput
        
                                          800 Mbits
      Ideal TCP Transfer Time = -----------------------------------
                                 Maximum Achievable TCP Throughput
        

To illustrate the TCP Transfer Time Ratio, an example would be the bulk transfer of 100 MB over 5 simultaneous TCP connections (each connection transferring 100 MB). In this example, the Ethernet service provides a Committed Access Rate (CAR) of 500 Mbps. Each connection may achieve different throughputs during a test, and the overall throughput rate is not always easy to determine (especially as the number of connections increases).

为了说明TCP传输时间比率,一个示例是通过5个同步TCP连接(每个连接传输100 MB)进行100 MB的大容量传输。在此示例中,以太网服务提供500 Mbps的承诺访问速率(CAR)。在测试期间,每个连接可能实现不同的吞吐量,并且总吞吐量并不总是容易确定(特别是当连接数增加时)。

The Ideal TCP Transfer Time would be ~8 seconds, but in this example, the Actual TCP Transfer Time was 12 seconds. The TCP Transfer Time Ratio would then be 12/8 = 1.5, which indicates that the transfer across all connections took 1.5 times longer than the ideal.

理想的TCP传输时间约为8秒,但在本例中,实际的TCP传输时间为12秒。TCP传输时间比率将为12/8=1.5,这表明所有连接之间的传输时间比理想情况长1.5倍。

4.2. TCP Efficiency
4.2. TCP效率

The second metric represents the percentage of Bytes that were not retransmitted.

第二个指标表示未重新传输的字节百分比。

                          Transmitted Bytes - Retransmitted Bytes
      TCP Efficiency % =  ---------------------------------------  X 100
                                   Transmitted Bytes
        
                          Transmitted Bytes - Retransmitted Bytes
      TCP Efficiency % =  ---------------------------------------  X 100
                                   Transmitted Bytes
        

Transmitted Bytes are the total number of TCP Bytes to be transmitted, including the original and the retransmitted Bytes.

Transmited Bytes是要传输的TCP字节总数,包括原始字节和重新传输的字节。

4.2.1. TCP Efficiency Percentage Calculation
4.2.1. TCP效率百分比计算

As an example, if 100,000 Bytes were sent and 2,000 had to be retransmitted, the TCP Efficiency Percentage would be calculated as:

例如,如果发送了100000个字节,并且必须重新传输2000个字节,则TCP效率百分比将计算为:

                           102,000 - 2,000
      TCP Efficiency % =  -----------------  X 100 = 98.03%
                             102,000
        
                           102,000 - 2,000
      TCP Efficiency % =  -----------------  X 100 = 98.03%
                             102,000
        

Note that the Retransmitted Bytes may have occurred more than once; if so, then these multiple retransmissions are added to the Retransmitted Bytes and to the Transmitted Bytes counts.

注意,重传的字节可能已经发生了不止一次;如果是这样,则将这些多次重传添加到重传字节和传输字节计数中。

4.3. Buffer Delay
4.3. 缓冲区延迟

The third metric is the Buffer Delay Percentage, which represents the increase in RTT during a TCP Throughput test versus the inherent or baseline RTT. The baseline RTT is the Round-Trip Time inherent to the network path under non-congested conditions as defined in Section 3.2.1. The average RTT is derived from the total of all measured RTTs during the actual test at every second divided by the test duration in seconds.

第三个指标是缓冲区延迟百分比,它表示TCP吞吐量测试期间RTT相对于固有或基线RTT的增加。基线RTT是第3.2.1节定义的非拥挤条件下网络路径固有的往返时间。平均RTT由实际测试期间每秒所有测量RTT的总和除以测试持续时间(以秒为单位)得出。

                                      Total RTTs during transfer
      Average RTT during transfer = -----------------------------
                                     Transfer duration in seconds
        
                                      Total RTTs during transfer
      Average RTT during transfer = -----------------------------
                                     Transfer duration in seconds
        
                       Average RTT during transfer - Baseline RTT
      Buffer Delay % = ------------------------------------------ X 100
                                   Baseline RTT
        
                       Average RTT during transfer - Baseline RTT
      Buffer Delay % = ------------------------------------------ X 100
                                   Baseline RTT
        
4.3.1. Buffer Delay Percentage Calculation
4.3.1. 缓冲区延迟百分比计算

As an example, consider a network path with a baseline RTT of 25 ms. During the course of a TCP transfer, the average RTT across the entire transfer increases to 32 ms. Then, the Buffer Delay Percentage would be calculated as:

作为一个例子,考虑具有25毫秒的基线RTT的网络路径。在TCP传输过程中,整个传输的平均RTT增加到32毫秒。然后,将Buffer Delay Percentage计算为:

                       32 - 25
      Buffer Delay % = ------- X 100 = 28%
                         25
        
                       32 - 25
      Buffer Delay % = ------- X 100 = 28%
                         25
        

Note that the TCP Transfer Time Ratio, TCP Efficiency Percentage, and the Buffer Delay Percentage MUST all be measured during each throughput test. A poor TCP Transfer Time Ratio (i.e., Actual TCP Transfer Time greater than the Ideal TCP Transfer Time) may be diagnosed by correlating with sub-optimal TCP Efficiency Percentage and/or Buffer Delay Percentage metrics.

请注意,TCP传输时间比率、TCP效率百分比和缓冲区延迟百分比都必须在每个吞吐量测试期间测量。通过关联次优TCP效率百分比和/或缓冲区延迟百分比指标,可以诊断较差的TCP传输时间比(即,实际TCP传输时间大于理想TCP传输时间)。

5. Conducting TCP Throughput Tests
5. 进行TCP吞吐量测试

Several TCP tools are currently used in the network world, and one of the most common is "iperf". With this tool, hosts are installed at each end of the network path; one acts as a client and the other as a server. The Send Socket Buffer and the TCP RWND sizes of both client and server can be manually set. The achieved throughput can then be measured, either uni-directionally or bi-directionally. For higher-BDP situations in lossy networks (Long Fat Networks (LFNs) or satellite links, etc.), TCP options such as Selective Acknowledgment SHOULD become part of the window size/throughput characterization.

目前在网络世界中使用了几种TCP工具,其中最常见的是“iperf”。使用此工具,主机安装在网络路径的每一端;一个充当客户机,另一个充当服务器。可以手动设置客户端和服务器的发送套接字缓冲区和TCP RWND大小。然后可以单方向或双向地测量所实现的吞吐量。对于有损网络(长Fat网络(LFN)或卫星链路等)中BDP较高的情况,TCP选项(如选择性确认)应成为窗口大小/吞吐量特征的一部分。

Host hardware performance must be well understood before conducting the tests described in the following sections. A dedicated communications test instrument will generally be REQUIRED, especially for line rates of GigE and 10 GigE. A compliant TCP TTD SHOULD provide a warning message when the expected test throughput will exceed the subscribed customer SLA. If the throughput test is expected to exceed the subscribed customer SLA, then the test SHOULD be coordinated with the network provider.

在执行以下部分中描述的测试之前,必须充分了解主机硬件性能。通常需要专用的通信测试仪器,特别是对于GigE和10 GigE的线路速率。当预期测试吞吐量将超过订阅的客户SLA时,符合要求的TCP TTD应提供警告消息。如果吞吐量测试预计将超过订阅的客户SLA,则应与网络提供商协调测试。

The TCP Throughput test SHOULD be run over a long enough duration to properly exercise network buffers (i.e., greater than 30 seconds) and SHOULD also characterize performance at different times of the day.

TCP吞吐量测试应在足够长的时间内运行,以正确使用网络缓冲区(即大于30秒),并且还应描述一天中不同时间的性能。

5.1. Single versus Multiple TCP Connections
5.1. 单TCP连接与多TCP连接

The decision whether to conduct single- or multiple-TCP-connection tests depends upon the size of the BDP in relation to the TCP RWND configured in the end-user environment. For example, if the BDP for

是否执行单个或多个TCP连接测试取决于BDP相对于最终用户环境中配置的TCP RWND的大小。例如,如果BDP

a Long Fat Network (LFN) turns out to be 2 MB, then it is probably more realistic to test this network path with multiple connections. Assuming typical host TCP RWND sizes of 64 KB (e.g., Windows XP), using 32 TCP connections would emulate a small-office scenario.

一个长Fat网络(LFN)原来是2MB,那么用多个连接测试这个网络路径可能更现实。假设典型的主机TCP RWND大小为64 KB(例如Windows XP),使用32个TCP连接将模拟小型办公室场景。

The following table is provided to illustrate the relationship between the TCP RWND and the number of TCP connections required to fill the available capacity of a given BDP. For this example, the network bandwidth is 500 Mbps and the RTT is 5 ms; then, the BDP equates to 312.5 KBytes.

下表说明了TCP RWND与填充给定BDP可用容量所需的TCP连接数之间的关系。对于该示例,网络带宽为500mbps,RTT为5ms;然后,BDP等于312.5 KB。

                              Number of TCP Connections
                  TCP RWND   to fill available bandwidth
                  --------------------------------------
                    16 KB             20
                    32 KB             10
                    64 KB              5
                   128 KB              3
        
                              Number of TCP Connections
                  TCP RWND   to fill available bandwidth
                  --------------------------------------
                    16 KB             20
                    32 KB             10
                    64 KB              5
                   128 KB              3
        

Table 5.1. Number of TCP Connections versus TCP RWND

表5.1。TCP连接数与TCP RWND

The TCP Transfer Time Ratio metric is useful when conducting multiple-connection tests. Each connection SHOULD be configured to transfer payloads of the same size (e.g., 100 MB); then, the TCP Transfer Time Ratio provides a simple metric to verify the actual versus expected results.

在执行多个连接测试时,TCP传输时间比率度量非常有用。每个连接应配置为传输相同大小的有效负载(例如,100 MB);然后,TCP传输时间比率提供了一个简单的指标来验证实际结果与预期结果。

Note that the TCP transfer time is the time required for each connection to complete the transfer of the predetermined payload size. From the previous table, the 64-KB window is considered. Each of the 5 TCP connections would be configured to transfer 100 MB, and each one should obtain a maximum of 100 Mbps. So for this example, the 100-MB payload should be transferred across the connections in approximately 8 seconds (which would be the Ideal TCP Transfer Time under these conditions).

请注意,TCP传输时间是每个连接完成预定有效负载大小传输所需的时间。在上一个表中,考虑了64-KB的窗口。5个TCP连接中的每一个都将配置为传输100 MB,并且每个连接的最大传输速率应为100 Mbps。因此,在本例中,100-MB的有效负载应在大约8秒钟内通过连接传输(在这些条件下,这将是理想的TCP传输时间)。

Additionally, the TCP Efficiency Percentage metric MUST be computed for each connection as defined in Section 4.2.

此外,必须为第4.2节中定义的每个连接计算TCP效率百分比指标。

5.2. Results Interpretation
5.2. 结果解释

At the end, a TCP Throughput Test Device (TCP TTD) SHOULD generate a report with the calculated BDP and a set of Window size experiments. Window size refers to the minimum of the Send Socket Buffer and TCP RWND. The report SHOULD include TCP Throughput results for each TCP Window size tested. The goal is to provide achievable versus actual TCP Throughput results with respect to the TCP Window size when no fragmentation occurs. The report SHOULD also include the results for

最后,TCP吞吐量测试设备(TCP TTD)应该生成一个报告,其中包含计算出的BDP和一组窗口大小实验。窗口大小是指发送套接字缓冲区和TCP RWND的最小值。报告应包括测试的每个TCP窗口大小的TCP吞吐量结果。目标是在不发生碎片的情况下,提供与TCP窗口大小相关的可实现与实际TCP吞吐量结果。报告还应包括以下方面的结果:

the 3 metrics defined in Section 4. The goal is to provide a clear relationship between these 3 metrics and user experience. As an example, for the same results in regard to Transfer Time Ratio, a better TCP Efficiency could be obtained at the cost of higher Buffer Delays.

第4节中定义的3个指标。目标是在这3个指标和用户体验之间提供一个清晰的关系。例如,对于传输时间比方面的相同结果,可以以更高的缓冲延迟为代价获得更好的TCP效率。

For cases where the test results are not equal to the ideal values, some possible causes are as follows:

对于试验结果不等于理想值的情况,可能的原因如下:

- Network congestion causing packet loss, which may be inferred from a poor TCP Efficiency % (i.e., higher TCP Efficiency % = less packet loss).

- 网络拥塞导致数据包丢失,这可能是由于TCP效率低(即,较高的TCP效率%=较少的数据包丢失)造成的。

- Network congestion causing an increase in RTT, which may be inferred from the Buffer Delay Percentage (i.e., 0% = no increase in RTT over baseline).

- 网络拥塞导致RTT增加,这可以从缓冲区延迟百分比推断出来(即,0%=RTT没有比基线增加)。

- Intermediate network devices that actively regenerate the TCP connection and can alter TCP RWND size, MTU, etc.

- 主动重新生成TCP连接并可以更改TCP RWND大小、MTU等的中间网络设备。

- Rate limiting by policing instead of shaping.

- 通过控制而不是塑造来限制速率。

- Maximum TCP Buffer Space. All operating systems have a global mechanism to limit the quantity of system memory to be used by TCP connections. On some systems, each connection is subject to a memory limit that is applied to the total memory used for input data, output data, and controls. On other systems, there are separate limits for input and output buffer spaces per connection. Client/server IP hosts might be configured with Maximum TCP Buffer Space limits that are far too small for high-performance networks.

- 最大TCP缓冲区空间。所有操作系统都有一个全局机制来限制TCP连接使用的系统内存量。在某些系统上,每个连接都有一个内存限制,该限制适用于用于输入数据、输出数据和控制的总内存。在其他系统上,每个连接的输入和输出缓冲区空间有单独的限制。客户端/服务器IP主机可能配置了最大TCP缓冲区空间限制,这些限制对于高性能网络来说太小了。

- Socket Buffer sizes. Most operating systems support separate per-connection send and receive buffer limits that can be adjusted as long as they stay within the maximum memory limits. These socket buffers MUST be large enough to hold a full BDP of TCP Bytes plus some overhead. There are several methods that can be used to adjust Socket Buffer sizes, but TCP Auto-Tuning automatically adjusts these as needed to optimally balance TCP performance and memory usage.

- 套接字缓冲区大小。大多数操作系统支持单独的每连接发送和接收缓冲区限制,只要它们保持在最大内存限制内,就可以进行调整。这些套接字缓冲区必须足够大,以容纳TCP字节的完整BDP以及一些开销。有几种方法可用于调整套接字缓冲区大小,但TCP自动调优会根据需要自动调整这些方法,以最佳平衡TCP性能和内存使用。

It is important to note that Auto-Tuning is enabled by default in LINUX since kernel release 2.6.6 and in UNIX since FreeBSD 7.0. It is also enabled by default in Windows since Vista and in Mac since OS X version 10.5 (Leopard). Over-buffering can cause some applications to behave poorly, typically causing sluggish interactive response and introducing the risk of running the system out of memory. Large default socket buffers have to be considered carefully on multi-user systems.

需要注意的是,自内核版本2.6.6以来,LINUX默认启用自动调优,自FreeBSD 7.0以来,UNIX默认启用自动调优。在Vista之后的Windows和OS X 10.5(Leopard)之后的Mac中,默认情况下也会启用该功能。过度缓冲会导致某些应用程序表现不佳,通常会导致交互响应缓慢,并带来系统内存不足的风险。在多用户系统上,必须仔细考虑大型默认套接字缓冲区。

- TCP Window Scale option [RFC1323]. This option enables TCP to support large BDP paths. It provides a scale factor that is required for TCP to support window sizes larger than 64 KB. Most systems automatically request WSCALE under some conditions, such as when the Receive Socket Buffer is larger than 64 KB or when the other end of the TCP connection requests it first. WSCALE can only be negotiated during the 3-way handshake. If either end fails to request WSCALE or requests an insufficient value, it cannot be renegotiated. Different systems use different algorithms to select WSCALE, but it is very important to have large enough buffer sizes. Note that under these constraints, a client application wishing to send data at high rates may need to set its own receive buffer to something larger than 64 KBytes before it opens the connection, to ensure that the server properly negotiates WSCALE. A system administrator might have to explicitly enable [RFC1323] extensions. Otherwise, the client/server IP host would not support TCP Window sizes (BDP) larger than 64 KB. Most of the time, performance gains will be obtained by enabling this option in LFNs.

- TCP窗口缩放选项[RFC1323]。此选项使TCP能够支持大型BDP路径。它提供了TCP支持大于64 KB的窗口所需的比例因子。大多数系统在某些情况下会自动请求WSCALE,例如当接收套接字缓冲区大于64 KB或TCP连接的另一端首先请求它时。WSCALE只能在三方握手期间协商。如果任何一端未能请求WSCALE或请求的值不足,则无法重新协商。不同的系统使用不同的算法来选择WSCALE,但拥有足够大的缓冲区是非常重要的。请注意,在这些限制条件下,希望以高速发送数据的客户端应用程序可能需要在打开连接之前将其自身的接收缓冲区设置为大于64 KB的值,以确保服务器正确协商WSCALE。系统管理员可能必须显式启用[RFC1323]扩展。否则,客户端/服务器IP主机将不支持大于64 KB的TCP窗口大小(BDP)。大多数情况下,在LFN中启用此选项将获得性能提升。

- TCP Timestamps option [RFC1323]. This feature provides better measurements of the Round-Trip Time and protects TCP from data corruption that might occur if packets are delivered so late that the sequence numbers wrap before they are delivered. Wrapped sequence numbers do not pose a serious risk below 100 Mbps, but the risk increases at higher data rates. Most of the time, performance gains will be obtained by enabling this option in Gigabit-bandwidth networks.

- TCP时间戳选项[RFC1323]。此功能提供了更好的往返时间测量,并保护TCP不受数据损坏的影响,如果数据包传递太晚,导致序列号在传递之前被包装,则可能会发生数据损坏。包装序列号在100Mbps以下不会造成严重风险,但在较高的数据速率下风险会增加。大多数情况下,在千兆带宽网络中启用此选项将获得性能提升。

- TCP Selective Acknowledgments (SACK) option [RFC2018]. This allows a TCP receiver to inform the sender about exactly which data segment is missing and needs to be retransmitted. Without SACK, TCP has to estimate which data segment is missing, which works just fine if all losses are isolated (i.e., only one loss in any given round trip). Without SACK, TCP takes a very long time to recover after multiple and consecutive losses. SACK is now supported by most operating systems, but it may have to be explicitly enabled by the system administrator. In networks with unknown load and error patterns, TCP SACK will improve throughput performance. On the other hand, security appliance vendors might have implemented TCP randomization without considering TCP SACK, and under such circumstances, SACK might need to be disabled in the client/server IP hosts until the vendor corrects the issue. Also, poorly implemented SACK algorithms might cause extreme CPU loads and might need to be disabled.

- TCP选择性确认(SACK)选项[RFC2018]。这允许TCP接收方准确地通知发送方丢失了哪些数据段,需要重新传输。在没有SACK的情况下,TCP必须估计丢失了哪个数据段,如果所有的丢失都被隔离(即,在任何给定的往返过程中只有一个丢失),那么这个数据段就可以正常工作。如果没有SACK,TCP在多次和连续丢失后需要很长时间才能恢复。现在大多数操作系统都支持SACK,但它可能必须由系统管理员显式启用。在未知负载和错误模式的网络中,TCP SACK将提高吞吐量性能。另一方面,安全设备供应商可能在没有考虑TCP SACK的情况下实施了TCP随机化,在这种情况下,可能需要在客户端/服务器IP主机中禁用SACK,直到供应商纠正该问题。此外,执行不善的SACK算法可能会导致CPU负载过大,可能需要禁用。

- Path MTU. The client/server IP host system SHOULD use the largest possible MTU for the path. This may require enabling Path MTU Discovery [RFC1191] and [RFC4821]. Since [RFC1191] is flawed, Path MTU Discovery is sometimes not enabled by default and may need to be explicitly enabled by the system administrator. [RFC4821] describes a new, more robust algorithm for MTU discovery and ICMP black hole recovery.

- 路径MTU。客户端/服务器IP主机系统应为路径使用尽可能大的MTU。这可能需要启用路径MTU发现[RFC1191]和[RFC4821]。由于[RFC1191]存在缺陷,因此路径MTU发现有时在默认情况下不启用,可能需要由系统管理员显式启用。[RFC4821]描述了一种新的、更健壮的MTU发现和ICMP黑洞恢复算法。

- TOE (TCP Offload Engine). Some recent Network Interface Cards (NICs) are equipped with drivers that can do part or all of the TCP/IP protocol processing. TOE implementations require additional work (i.e., hardware-specific socket manipulation) to set up and tear down connections. Because TOE NIC configuration parameters are vendor-specific and not necessarily RFC-compliant, they are poorly integrated with UNIX and LINUX. Occasionally, TOE might need to be disabled in a server because its NIC does not have enough memory resources to buffer thousands of connections.

- TOE(TCP卸载引擎)。一些最新的网络接口卡(NIC)配备了可以执行部分或全部TCP/IP协议处理的驱动程序。TOE实现需要额外的工作(即特定于硬件的套接字操作)来设置和断开连接。由于TOE NIC配置参数是特定于供应商的,不一定符合RFC,因此它们与UNIX和LINUX的集成度很差。有时,可能需要在服务器中禁用TOE,因为其NIC没有足够的内存资源来缓冲数千个连接。

Note that both ends of a TCP connection MUST be properly tuned.

请注意,必须正确调整TCP连接的两端。

6. Security Considerations
6. 安全考虑

Measuring TCP network performance raises security concerns. Metrics produced within this framework may create security issues.

测量TCP网络性能会引起安全问题。在此框架内生成的度量可能会产生安全问题。

6.1. Denial-of-Service Attacks
6.1. 拒绝服务攻击

TCP network performance metrics, as defined in this document, attempt to fill the NUT with a stateful connection. However, since the test MAY use stateless IP streams as specified in Section 3.2.2, it might appear to network operators to be a denial-of-service attack. Thus, as mentioned at the beginning of Section 3, TCP Throughput testing may require cooperation between the end-user customer and the network provider.

本文档中定义的TCP网络性能指标试图用有状态连接来填补漏洞。然而,由于测试可能使用第3.2.2节中规定的无状态IP流,因此网络运营商可能认为这是拒绝服务攻击。因此,如第3节开头所述,TCP吞吐量测试可能需要最终用户客户和网络提供商之间的合作。

6.2. User Data Confidentiality
6.2. 用户数据保密性

Metrics within this framework generate packets from a sample, rather than taking samples based on user data. Thus, our framework does not threaten user data confidentiality.

此框架中的度量从样本生成数据包,而不是根据用户数据进行采样。因此,我们的框架不会威胁用户数据的机密性。

6.3. Interference with Metrics
6.3. 对指标的干扰

The security considerations that apply to any active measurement of live networks are relevant here as well. See [RFC4656] and [RFC5357].

适用于实时网络的任何主动测量的安全注意事项也与此相关。参见[RFC4656]和[RFC5357]。

7. Acknowledgments
7. 致谢

Thanks to Lars Eggert, Al Morton, Matt Mathis, Matt Zekauskas, Yaakov Stein, and Loki Jorgenson for many good comments and for pointing us to great sources of information pertaining to past works in the TCP capacity area.

感谢Lars Eggert、Al Morton、Matt Mathis、Matt Zekauskas、Yaakov Stein和Loki Jorgenson发表了许多好的评论,并为我们指出了与TCP容量领域过去工作相关的大量信息来源。

8. Normative References
8. 规范性引用文件

[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, November 1990.

[RFC1191]Mogul,J.和S.Deering,“MTU发现路径”,RFC1191,1990年11月。

[RFC1323] Jacobson, V., Braden, R., and D. Borman, "TCP Extensions for High Performance", RFC 1323, May 1992.

[RFC1323]Jacobson,V.,Braden,R.,和D.Borman,“高性能TCP扩展”,RFC 1323,1992年5月。

[RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP Selective Acknowledgment Options", RFC 2018, October 1996.

[RFC2018]Mathis,M.,Mahdavi,J.,Floyd,S.,和A.Romanow,“TCP选择性确认选项”,RFC 2018,1996年10月。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2544] Bradner, S. and J. McQuaid, "Benchmarking Methodology for Network Interconnect Devices", RFC 2544, March 1999.

[RFC2544]Bradner,S.和J.McQuaid,“网络互连设备的基准测试方法”,RFC 2544,1999年3月。

[RFC4656] Shalunov, S., Teitelbaum, B., Karp, A., Boote, J., and M. Zekauskas, "A One-way Active Measurement Protocol (OWAMP)", RFC 4656, September 2006.

[RFC4656]Shalunov,S.,Teitelbaum,B.,Karp,A.,Boote,J.,和M.Zekauskas,“单向主动测量协议(OWAMP)”,RFC 46562006年9月。

[RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU Discovery", RFC 4821, March 2007.

[RFC4821]Mathis,M.和J.Heffner,“打包层路径MTU发现”,RFC 48212007年3月。

[RFC4898] Mathis, M., Heffner, J., and R. Raghunarayan, "TCP Extended Statistics MIB", RFC 4898, May 2007.

[RFC4898]Mathis,M.,Heffner,J.和R.Raghunarayan,“TCP扩展统计MIB”,RFC 4898,2007年5月。

[RFC5136] Chimento, P. and J. Ishac, "Defining Network Capacity", RFC 5136, February 2008.

[RFC5136]Chimento,P.和J.Ishac,“定义网络容量”,RFC 5136,2008年2月。

[RFC5357] Hedayat, K., Krzanowski, R., Morton, A., Yum, K., and J. Babiarz, "A Two-Way Active Measurement Protocol (TWAMP)", RFC 5357, October 2008.

[RFC5357]Hedayat,K.,Krzanowski,R.,Morton,A.,Yum,K.,和J.Babiarz,“双向主动测量协议(TWAMP)”,RFC 5357,2008年10月。

Authors' Addresses

作者地址

Barry Constantine JDSU, Test and Measurement Division One Milesone Center Court Germantown, MD 20876-7100 USA

Barry Constantine JDSU,美国马里兰州日耳曼镇米利森中心法院测试和测量一处,邮编:20876-7100

   Phone: +1 240 404 2227
   EMail: barry.constantine@jdsu.com
        
   Phone: +1 240 404 2227
   EMail: barry.constantine@jdsu.com
        

Gilles Forget Independent Consultant to Bell Canada 308, rue de Monaco, St-Eustache Qc. J7P-4T5 CANADA

Gilles是加拿大贝尔公司的独立顾问,位于摩纳哥街308号,圣尤斯塔什Qc。J7P-4T5加拿大

Phone: (514) 895-8212 EMail: gilles.forget@sympatico.ca

电话:(514)895-8212电子邮件:gilles。forget@sympatico.ca

Ruediger Geib Heinrich-Hertz-Strasse 3-7 Darmstadt, 64295 Germany

Ruediger Geib Heinrich Hertz Strasse 3-7 Darmstadt,64295德国

   Phone: +49 6151 5812747
   EMail: Ruediger.Geib@telekom.de
        
   Phone: +49 6151 5812747
   EMail: Ruediger.Geib@telekom.de
        

Reinhard Schrage Osterende 7 Seelze, 30926 Germany Schrage Consulting

莱因哈德·施拉格·奥斯特伦德7 Seelze,30926德国施拉格咨询公司

   Phone: +49 (0) 5137 909540
   EMail: reinhard@schrageconsult.com
        
   Phone: +49 (0) 5137 909540
   EMail: reinhard@schrageconsult.com