iPerf3 -w 参数详细图文分析
创始人
2025-06-01 20:41:34
0

本文目录

  • 1、 官方解释
  • 2、-w参数使用
  • 3、具体参数使用说明
    • 3.1、对于UDP,-w的使用详解:
      • 3.1.1、 如何查看Linux系统定义的UDP的发送、接收缓冲区的最小值
      • 3.1.2、 如何查看Linux系统定义的UDP的发送、接收缓冲区的最大值
    • 3.2、对于TCP,-w的使用详解:
      • 3.2.1、测试环境:
      • 3.2.2、模拟TCP长肥管道的测试过程
      • 3.3.3 长肥网络中TCP的测试结果
      • 3.3.3 长肥网络中:使用-w加大窗口后的TCP的测试结果

1、 官方解释

安装完iperf3 3.13版本后,我们可以通过man iperf3帮助命令看到对-w参数的解释如下:
-w, --window n[KMGT]
set socket buffer size / window size. This value gets sent to the server and used on that side too; on both sides this option sets both the sending and receiving socket buffer sizes. This option can be used to set (indirectly) the maximum TCP window size. Note that on Linux systems, the effective maximum window size is approximately double what is specified by this option (this behavior is not a bug in iperf3 but a “feature” of the Linux kernel, as documented by tcp(7) and socket(7)).

翻译一下:本参数用于设置socket的缓冲区大小或者窗口大小。这个设置值会被发送到服务端并且在服务端也会配置生效;在客户端和服务端,这个参数会去同时设置发送缓冲区与接收缓冲区。这个参数可以用于设置TCP窗口的最大值(间接的)。注意在Linux系统中,配置这个个参数后,生效的最大窗口大小大约是设置值的二倍(这不是iperf3的bug, 这是linux kernel的系统行为,参考TCP(7)和socket(7))

2、-w参数使用

注意-w这个参数只能在服务端命令行里被输入,但会同时在客户端的接收和发送缓冲区、服务端的接收和发送缓冲区同时设置生效。

不想知道详细过程的,可以直接看结论\color{red}直接看结论直接看结论:
如果你的测试目标是达到网络的最大速率(最大吞吐量),那么

  1. 使用UDP的话−w参数在不出错的情况下越大越好\color{red}使用UDP的话-w参数在不出错的情况下越大越好使用UDP的话−w参数在不出错的情况下越大越好
  2. 使用TDP的话−w参数在不出错的情况下越大越好\color{red}使用TDP的话-w参数在不出错的情况下越大越好使用TDP的话−w参数在不出错的情况下越大越好

3、具体参数使用说明

通过官方说明,我们已经知道了,对于TCP和对于UDP而言-w的意义并不相同,所以下面分成UDP和TCP二部分来说明。

3.1、对于UDP,-w的使用详解:

UDP套接字都有发送缓冲区大小,但实际上不存在UDP发送缓冲区,发送缓冲区大小的实际意义是可写到套接字的UDP数据报的大小上限。应用程序如果写一个大于上限的数据包进套接字,则系统会返回一个发送出错。

影响UDP可发送的报文大小的上限的二个因素:

  • UDP协议本身,UDP协议中有16位的UDP报文长度,那么UDP报文长度不能超过2^16=65535-20字节的IP头=65515字节。
  • socket的UDP发送缓存区大小,这个限制了应用层往套接字最大能送的UDP报文的长度, -w只能改变这个(受限于/proc/sys/net/core/wmem_default, /proc/sys/net/core/wmem_max)

注意UDP报文不要发送得太大,太大了受限于MTU, ip会自动产生分片,UDP报文会被分成多个IP报文,一个ip分片丢失,整个UDP报文报废。

我们以UDP单向测试为例(客户端发送---->服务端接收)

  1. 客户端:
    • 发送缓冲区
      如上所述,-w设置了,客户端发送能用的发送缓冲区大小的实际意义是可写到套接字的UDP数据报的大小上限,这个值不能大于Linux系统定义的最大值,也不能小于Linux系统定义的最小值。
      • 小于最小值时:
        设置会返回成功,但不会生效,直接使用最小值。
      • 大于最大值时:
        因为客户端的-w参数会被同步到服务端,所以当这个设置值>服务端最大值或者这设置值>客户端最大值时,iperf3会报错。
    • 接收缓冲区 (单向测试中,对于客户端而言,不会收到数据,所以接收缓冲区的大小没有意义)
      接收缓冲区是有意义的,它可以起到一个缓冲作用,比如当CPU被其它高优先级的任务使用,iperf3短时间内无法从socket接收缓冲区读取数据时,如果缓冲区太小则有可能会产生丢包(接收缓冲区满了之后,接收端UDP协议栈就会把新收到的包直接丢弃),同样,这个值不能大于Linux系统定义的最大值,也不能小于Linux系统定义的最小值。
      • 小于最小值时:
        设置会返回成功,但不会生效,直接使用最小值。
      • 大于最大值时:
        因为客户端的-w参数会被同步到服务端,所以当这个设置值>服务端最大值或者这设置值>客户端最大值时,iperf3会报错。

服务端:

  • 发送缓冲区(单向测试中,对于服务端而言,不会发送数据,所以发送缓冲区的大小没有意义)
    如上所述,-w设置了,客户端发送能用的发送缓冲区大小的实际意义是可写到套接字的UDP数据报的大小上限,这个值不能大于Linux系统定义的最大值,也不能小于Linux系统定义的最小值。
    - 小于最小值时:
    设置会返回成功,但不会生效,直接使用最小值。
    - 大于最大值时:
    因为客户端的-w参数会被同步到服务端,所以当这个设置值>服务端最大值或者这设置值>客户端最大值时,iperf3会报错。
    • 接收缓冲区
      接收缓冲区是有意义的,它可以起到一个缓冲作用,比如当CPU被其它高优先级的任务使用,iperf3短时间内无法从socket接收缓冲区读取数据时,如果缓冲区太小则有可能会产生丢包(接收缓冲区满了之后,接收端UDP协议栈就会把新收到的包直接丢弃),如果缓冲区足够大,那么在有这样的情况发生时,缓冲区可以先把收到的报文缓存下来等待iperf3回来后处理,而不至于直接产生丢包。同样,这个值不能大于Linux系统定义的最大值,也不能小于Linux系统定义的最小值。
      • 小于最小值时:
        设置会返回成功,但不会生效,直接使用最小值。
      • 大于最大值时:
        因为客户端的-w参数会被同步到服务端,所以当这个设置值>服务端最大值或者这设置值>客户端最大值时,iperf3会报错。

结论:使用UDP的话-w参数在不出错的情况下越大越好

3.1.1、 如何查看Linux系统定义的UDP的发送、接收缓冲区的最小值

如何查看Linux系统定义发送接收缓冲区的最小值:
通过打开-d选项,设置一个很小的-w, 比如 -w 256 可以看到如下打印

  • 客户端最小的发送缓冲区为4608,接收缓冲区为2304

xxx@xxx-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -u -b 10M -w 256 -d
send_parameters:
{"udp":  true,"omit": 0,"time": 10,"parallel":     1,"window":       256,"len":  1448,"bandwidth":    10000000,"pacing_timer": 1000,"client_version":       "3.9"
}
Connecting to host 192.168.3.60, port 5201
SNDBUF is 4608, expecting 256
RCVBUF is 2304, expecting 256
Setting application pacing to 1250000
[  5] local 192.168.3.107 port 39954 connected to 192.168.3.60 port 5201
  • 服务端最小的发送缓冲区为4480,接收缓冲区为2240
pi@raspberrypi:~ $ iperf3 -s -A 2 -d
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
get_parameters:
{"udp":  true,"omit": 0,"time": 10,"parallel":     1,"window":       256,"len":  1448,"bandwidth":    10000000,"pacing_timer": 1000,"client_version":       "3.9"
}
Accepted connection from 192.168.3.107, port 37692
SNDBUF is 4480, expecting 256
RCVBUF is 2240, expecting 256
Setting application pacing to 1250000
[  5] local 192.168.3.60 port 5201 connected to 192.168.3.107 port 39954

3.1.2、 如何查看Linux系统定义的UDP的发送、接收缓冲区的最大值

  • 客户端

xxx@xxx-pc:~$ sudo cat /proc/sys/net/core/rmem_max
212992
xxx@xxx-pc:~$ sudo cat /proc/sys/net/core/wmem_max
212992
  • 服务端
pi@raspberrypi:~ $ sudo cat /proc/sys/net/core/wmem_max
180224
pi@raspberrypi:~ $ sudo cat /proc/sys/net/core/rmem_max
180224

3.2、对于TCP,-w的使用详解:

从文章使用iperf3对长肥网络进行TCP测试(TCP长肥管道),如何配置iperf3中我们知道-w参数可以用来扩大接收窗口,用于解决TCP长肥管道中TCP流速度打不上去的问题。

3.2.1、测试环境:

客户端用的是8核i8的x86机器,单核主频为4.0Ghz,而服务端使用的是树莓派4B,单核主频为1G的ARM A53 CPU下,通过一个千兆的交换机直接连接,我们可以看到二个主机之间的带宽是1Gbps, RTT大约是0.2ms。在这样的网络下,我们直接使用默认参数进行TCP测试,如下所示可以达到940Mbps,此时服务端CPU2已经几乎达到100%了,说明受限于CPU处理能力,940Mbps基本上就是TCP的极速了。

-客户端测试命令:

xxx@xxx-pc:~$ ping 192.168.3.60
PING 192.168.3.60 (192.168.3.60) 56(84) bytes of data.
64 bytes from 192.168.3.60: icmp_seq=1 ttl=64 time=0.150 ms
64 bytes from 192.168.3.60: icmp_seq=2 ttl=64 time=0.192 ms
64 bytes from 192.168.3.60: icmp_seq=3 ttl=64 time=0.206 ms
64 bytes from 192.168.3.60: icmp_seq=4 ttl=64 time=0.219 ms
64 bytes from 192.168.3.60: icmp_seq=5 ttl=64 time=0.195 ms
64 bytes from 192.168.3.60: icmp_seq=6 ttl=64 time=0.214 ms
64 bytes from 192.168.3.60: icmp_seq=7 ttl=64 time=0.202 ms
^C
--- 192.168.3.60 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6135ms
rtt min/avg/max/mdev = 0.150/0.196/0.219/0.021 msxxx@xxx-pc:~$ /usr/bin/iperf3 -c 192.168.3.60
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 58330 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   955 Mbits/sec    0    390 KBytes
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   2.00-3.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   5.00-6.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   6.00-7.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   7.00-8.00   sec   112 MBytes   942 Mbits/sec    0    390 KBytes
[  5]   8.00-9.00   sec   112 MBytes   936 Mbits/sec    0    390 KBytes
[  5]   9.00-10.00  sec   112 MBytes   942 Mbits/sec    0    390 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   943 Mbits/sec    0             sender
[  5]   0.00-10.02  sec  1.10 GBytes   939 Mbits/sec                  receiveriperf Done.
  • 服务端测试命令:
pi@raspberrypi:~ $ iperf3 -s -A 2
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.3.107, port 54922
[  5] local 192.168.3.60 port 5201 connected to 192.168.3.107 port 54924
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   110 MBytes   919 Mbits/sec
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec
[  5]   2.00-3.00   sec   112 MBytes   941 Mbits/sec
[  5]   3.00-4.00   sec   112 MBytes   941 Mbits/sec
[  5]   4.00-5.00   sec   112 MBytes   941 Mbits/sec
  • 服务端CPU占用率:
    在这里插入图片描述

3.2.2、模拟TCP长肥管道的测试过程

我们用netem依次来来模拟一个来100ms回100ms来回共200ms的传播延时,带宽为1Gbps的长肥网络

有服务端输入命令:

root@raspberrypi:/home/pi# tc qdisc add dev eth0 root netem delay 100ms
root@raspberrypi:/home/pi#

在客户端输入命令:

root@xxx-pc:/home/xxx# tc qdisc add dev enp2s0 root netem delay 100ms
root@xxx-pc:/home/xxx# ping 192.168.3.60
PING 192.168.3.60 (192.168.3.60) 56(84) bytes of data.
64 bytes from 192.168.3.60: icmp_seq=1 ttl=64 time=200 ms
64 bytes from 192.168.3.60: icmp_seq=2 ttl=64 time=200 ms
64 bytes from 192.168.3.60: icmp_seq=3 ttl=64 time=200 ms
^C
--- 192.168.3.60 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 200.252/200.279/200.299/0.019 ms

我们通过ping命令可以看到RTT已经是200ms.

3.3.3 长肥网络中TCP的测试结果

我们可以看到,使用默认参数,TCP的速率很低,经过最初3秒中的慢启动爬坡后,速率最终稳定在105Mbps,远没有达到带宽的理论值 1Gbps,此时处理能力弱的服务端的CPU2的占用率还是很低的约为15%,说明不是CPU处理能力限制了带宽,而是TCP长肥管道限制了速率。

  • 客户端:

root@wangsheng-pc:/home/wangsheng# /usr/bin/iperf3 -c 192.168.3.60 -t 10
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 45868 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   740 KBytes  6.06 Mbits/sec    0    113 KBytes
[  5]   1.00-2.00   sec  6.18 MBytes  51.9 Mbits/sec    0   3.51 MBytes
[  5]   2.00-3.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   3.00-4.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   4.00-5.00   sec  11.2 MBytes  94.4 Mbits/sec    0   4.95 MBytes
[  5]   5.00-6.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   6.00-7.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   7.00-8.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   8.00-9.00   sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
[  5]   9.00-10.00  sec  12.5 MBytes   105 Mbits/sec    0   4.95 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   106 MBytes  88.6 Mbits/sec    0             sender
[  5]   0.00-10.20  sec   105 MBytes  86.1 Mbits/sec                  receiveriperf Done.
  • 服务端:

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.3.107, port 45854
[  5] local 192.168.3.60 port 5201 connected to 192.168.3.107 port 45868
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  99.0 KBytes   811 Kbits/sec
[  5]   1.00-2.00   sec  3.40 MBytes  28.5 Mbits/sec
[  5]   2.00-3.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   3.00-4.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   4.00-5.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   5.00-6.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   6.00-7.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   7.00-8.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   8.00-9.00   sec  12.4 MBytes   104 Mbits/sec
[  5]   9.00-10.00  sec  12.3 MBytes   103 Mbits/sec
[  5]  10.00-10.20  sec  2.47 MBytes   104 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.20  sec   105 MBytes  86.1 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
  • 服务端CPU占用率约为15%
    在这里插入图片描述

3.3.3 长肥网络中:使用-w加大窗口后的TCP的测试结果

根据TCP流量控制算法和拥塞控制算法,为了让TCP占满整个带宽(其实是带宽时延),至少需要满足3个条件
1)接收端需要通告一个 **带宽
时延**这么大的窗口,这样可以让发送端可以发送足够多的数据
2)发送端需要有 带宽*时延这么大的发送窗口,这样可以让发送端有足够多的数据可发
3)网络不能拥塞,不能用其它流量来占用网络,否则拥塞控制算法会让吞量下降

再根据
长肥网络与TCP的长肥管道
使用iperf3对长肥网络进行TCP测试(TCP长肥管道),如何配置iperf3
我们知道,通过-w增加窗口大小,会有利于在TCP长肥管道中得到更大的吞吐量。

以下我们分别测试-w为1k,2k,4k,8k,16k,32k,64k,128k,256k情况下的TCP吞吐量依次为26Kbps,34Kbps, 116Kbps,232Kbps,570Kbps,1.2Mbps,2.4Mbps,4.6Mbps,7.15Mbps


wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 1k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 40282 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  2.73 KBytes  22.4 Kbits/sec    0   5.47 KBytes
[  5]   1.00-2.00   sec  3.28 KBytes  26.9 Kbits/sec    0   5.47 KBytes
[  5]   2.00-3.00   sec  2.19 KBytes  17.9 Kbits/sec    0   5.47 KBytes
[  5]   3.00-4.00   sec  3.28 KBytes  26.9 Kbits/sec    0   5.47 KBytes
[  5]   4.00-5.00   sec  2.19 KBytes  17.9 Kbits/sec    0   5.47 KBytes
^C[  5]   5.00-5.21   sec  1.09 KBytes  42.2 Kbits/sec    0   5.47 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.21   sec  14.8 KBytes  23.2 Kbits/sec    0             sender
[  5]   0.00-5.21   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 2k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 33848 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  3.54 KBytes  28.9 Kbits/sec    0   7.07 KBytes
[  5]   1.00-2.00   sec  4.24 KBytes  34.8 Kbits/sec    0   7.07 KBytes
[  5]   2.00-3.00   sec  2.83 KBytes  23.2 Kbits/sec    0   7.07 KBytes
[  5]   3.00-4.00   sec  4.24 KBytes  34.8 Kbits/sec    0   7.07 KBytes
[  5]   4.00-5.00   sec  2.83 KBytes  23.2 Kbits/sec    0   7.07 KBytes
^C[  5]   5.00-5.63   sec  2.83 KBytes  36.9 Kbits/sec    0   7.07 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.63   sec  20.5 KBytes  29.8 Kbits/sec    0             sender
[  5]   0.00-5.63   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 4k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 53130 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  12.7 KBytes   104 Kbits/sec    0   14.1 KBytes
[  5]   1.00-2.00   sec  14.1 KBytes   116 Kbits/sec    0   14.1 KBytes
[  5]   2.00-3.00   sec  14.1 KBytes   116 Kbits/sec    0   14.1 KBytes
[  5]   3.00-4.00   sec  14.1 KBytes   116 Kbits/sec    0   14.1 KBytes
^C[  5]   4.00-4.62   sec  11.3 KBytes   149 Kbits/sec    0   14.1 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-4.62   sec  66.5 KBytes   118 Kbits/sec    0             sender
[  5]   0.00-4.62   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 8k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 53150 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  28.3 KBytes   232 Kbits/sec    0   14.1 KBytes
[  5]   1.00-2.00   sec  28.3 KBytes   232 Kbits/sec    0   14.1 KBytes
[  5]   2.00-3.00   sec  28.3 KBytes   232 Kbits/sec    0   14.1 KBytes
[  5]   3.00-4.00   sec  28.3 KBytes   232 Kbits/sec    0   14.1 KBytes
^C[  5]   4.00-4.81   sec  28.3 KBytes   285 Kbits/sec    0   14.1 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-4.81   sec   141 KBytes   241 Kbits/sec    0             sender
[  5]   0.00-4.81   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 16k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 33258 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  62.2 KBytes   510 Kbits/sec    0   28.3 KBytes
[  5]   1.00-2.00   sec  56.6 KBytes   463 Kbits/sec    0   28.3 KBytes
[  5]   2.00-3.00   sec  70.7 KBytes   579 Kbits/sec    0   28.3 KBytes
[  5]   3.00-4.00   sec  83.4 KBytes   684 Kbits/sec    0   28.3 KBytes
[  5]   4.00-5.00   sec  56.6 KBytes   463 Kbits/sec    0   28.3 KBytes
^C[  5]   5.00-5.16   sec  28.3 KBytes  1.41 Mbits/sec    0   28.3 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.16   sec   358 KBytes   567 Kbits/sec    0             sender
[  5]   0.00-5.16   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 32k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 59778 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   132 KBytes  1.08 Mbits/sec    0   62.2 KBytes
[  5]   1.00-2.00   sec   148 KBytes  1.22 Mbits/sec    0   62.2 KBytes
[  5]   2.00-3.00   sec   148 KBytes  1.22 Mbits/sec    0   62.2 KBytes
[  5]   3.00-4.00   sec   119 KBytes   973 Kbits/sec    0   62.2 KBytes
^C[  5]   4.00-4.40   sec  89.1 KBytes  1.81 Mbits/sec    0   62.2 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-4.40   sec   636 KBytes  1.18 Mbits/sec    0             sender
[  5]   0.00-4.40   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 64k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 56910 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   223 KBytes  1.83 Mbits/sec    0    113 KBytes
[  5]   1.00-2.00   sec   249 KBytes  2.04 Mbits/sec    0    129 KBytes
[  5]   2.00-3.00   sec   330 KBytes  2.70 Mbits/sec    0    129 KBytes
[  5]   3.00-4.00   sec   305 KBytes  2.50 Mbits/sec    0    129 KBytes
[  5]   4.00-5.00   sec   299 KBytes  2.45 Mbits/sec    0    129 KBytes
[  5]   5.00-6.00   sec   312 KBytes  2.55 Mbits/sec    0    129 KBytes
^C[  5]   6.00-6.41   sec   153 KBytes  3.04 Mbits/sec    0    129 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-6.41   sec  1.83 MBytes  2.39 Mbits/sec    0             sender
[  5]   0.00-6.41   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 128k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 52618 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   263 KBytes  2.15 Mbits/sec    0    113 KBytes
[  5]   1.00-2.00   sec   597 KBytes  4.89 Mbits/sec    0    257 KBytes
[  5]   2.00-3.00   sec   721 KBytes  5.91 Mbits/sec    0    257 KBytes
[  5]   3.00-4.00   sec   563 KBytes  4.61 Mbits/sec    0    257 KBytes
[  5]   4.00-5.00   sec   708 KBytes  5.80 Mbits/sec    0    257 KBytes
[  5]   5.00-6.00   sec   560 KBytes  4.59 Mbits/sec    0    257 KBytes
[  5]   6.00-7.00   sec   572 KBytes  4.68 Mbits/sec    0    257 KBytes
^C[  5]   7.00-7.61   sec   431 KBytes  5.77 Mbits/sec    0    257 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-7.61   sec  4.31 MBytes  4.75 Mbits/sec    0             sender
[  5]   0.00-7.61   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
wangsheng@wangsheng-pc:~$ /usr/bin/iperf3 -c 192.168.3.60 -t 100 -w 256k
Connecting to host 192.168.3.60, port 5201
[  5] local 192.168.3.107 port 56548 connected to 192.168.3.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   419 KBytes  3.43 Mbits/sec    0    113 KBytes
[  5]   1.00-2.00   sec   707 KBytes  5.79 Mbits/sec    0    359 KBytes
[  5]   2.00-3.00   sec   875 KBytes  7.17 Mbits/sec    0    359 KBytes
[  5]   3.00-4.00   sec  1011 KBytes  8.28 Mbits/sec    0    359 KBytes
[  5]   4.00-5.00   sec   871 KBytes  7.13 Mbits/sec    0    359 KBytes
[  5]   5.00-6.00   sec   873 KBytes  7.15 Mbits/sec    0    359 KBytes
[  5]   6.00-7.00   sec   873 KBytes  7.15 Mbits/sec    0    359 KBytes
^C[  5]   7.00-7.08   sec   175 KBytes  17.2 Mbits/sec    0    359 KBytes

注意:使用了一个巨大的窗口值来提高吞吐量其实是带来RTT测试周期变长的风险的,RTT测量周期变长意味着TCP协议栈不能很好的去适应网络的状态的变化。

相关内容

热门资讯

原创 一... 标题:一份绝妙的鳗鱼饭是如何炼成的? 在追求极致美味的道路上,我们总在探寻那些能够触动味蕾的秘密。...
豆芽菜只知道泡水保存? 专家分... 想要延长豆芽菜的保存期限,日本料理达人分享「用50度水浸泡2分钟」就能保存一周还能维持蔬菜脆度。 豆...
原创 豆... 标题:豆腐与它绝配,天冷热乎乎来一锅,一咬满口爆鲜汁,连锅一起吃 在寻找那一份能够唤醒味蕾的美食时...
原创 大... 相比南方一个市一个主打汤,我觉得北方的汤要简单太多了。 基本都是清水煮汤,味道全凭对食材的拿捏。 ...
原创 6... 暑气蒸腾的季节,厨房灶火前多站片刻都是煎熬。偏是此时,一碗清清爽爽的瓠子鸡蛋汤端上桌,那水润鲜亮的汤...
原创 豆... 标题:豆腐新吃法,1瓶可乐就搞定,比可乐鸡还好吃,做法超简单 在这个快节奏的时代,我们总是在寻找那...
原创 鸡... 标题:鸡蛋的新做法,只需3步,口感和颜值并存,招待客人特别有面子。 在美食的世界里,鸡蛋以其简单而...
原创 1... 火爆全国的湘菜,迎来了新拐点。 爆红的湘菜有了新挑战。 近几年,湘菜成了中餐赛道的焦点,“排队王...
原创 强... 鸡蛋抱豆腐这道菜,简直是我家餐桌上的"核武器级"下饭神器!每次掀开锅盖的瞬间,金灿灿的鸡蛋裹着嫩滑的...
原创 一... 标题:一根香肠,三个鸡蛋,做道嫩滑可口又营养的早餐,10分钟搞定! 在忙碌的早晨,我们总是渴望一份...
安徽涡阳:粽香传古韵 民俗庆端... 端午期间,安徽涡阳县各地纷纷开展丰富多彩的活动,以粽香传递千年古韵,用民俗共庆传统端阳,让古老节日焕...
原创 舌... 咱们总说 “民以食为天”,其实每一口吃下去的,可不只是填饱肚子的东西,更是一部藏在舌尖上的文明史。今...
原创 炒... 说起炒豆角,多少主妇翻过车?不是炒得蔫黄软烂失了魂,就是硬邦邦一股子生豆腥气,嚼得腮帮子累!更有人图...
原创 一... 标题:一块南瓜,做出的糕点,香软Q弹,热量也不高,有没有诱惑到你? 在探索美食的旅程中,我们总能找...
走进乌兰布统 感受雄浑壮阔的塞... 本文转自:人民网-内蒙古频道6月2日,航拍克什克腾旗乌兰布统草原美景。李富摄在内蒙古自治区赤峰市克什...
重庆五天四晚旅游攻略,两个人去... 重庆五天四晚旅游攻略,两个人去重庆玩五天要消费多少? 最近,我和朋友一直计划着一场说走就走的旅行,而...
原创 黄... 斑马消费 杨伟 2025年A股酒水板块“冰火两重天”,白酒承压,啤酒失速,黄酒却异军突起! Wind...
原创 4... 在城市的喧嚣中,我们常常忽略了那些默默付出的劳动者。今天,我要讲述的是一位来自农村的大姐,她的故事让...
原创 鱼... 标题:鱼肉的最新吃法,不蒸不煮不烧,鲜香爽滑,可以吃下两大碗米饭! 在探索美食的旅途中,我们总在寻...