我正在使用IPerf3测试TCP性能。但是在理解报告格式时遇到麻烦。
我正在启动从客户端(IP:2001:1:1:1::)到服务器(IP:2001:1:1:1:0:000:00:0001:0001)的TCP流。我在客户端使用的命令是
iperf3-客户端2001:1:1:1:0:0001:0001:0001-端口22001-端口32001 --connect-timeout 9999 --set-mss 1400 -w 32M -k 4 -b 4M -l 256K --json --logfile client_file.txt
因此,基本上,我试图从客户端到服务器发送4个数据块,每个数据块大小256 KB,总共1MB = 1048576字节数据。
现在完成测试后,我会收到报告。
在服务器端,我看到以下输出:
{
"start": {
"connected": [{
"socket": 6,
"local_host": "2001:1:1:1:0:1:1:1",
"local_port": 22001,
"remote_host": "2001:1:1:1::",
"remote_port": 32001
}],
"version": "iperf 3.6",
"system_info": "Linux deba 5.3.0-51-generic #44-Ubuntu SMP Wed Apr 22 21:09:44 UTC 2020 x86_64",
"sock_bufsize": 33554432,
"sndbuf_actual": 33554432,
"rcvbuf_actual": 33554432,
"timestamp": {
"time": "Fri, 01 May 2020 18:13:38 GMT",
"timesecs": 1588356818
},
"accepted_connection": {
"host": "2001:1:1:1::",
"port": 57974
},
"cookie": "vqbvzrztcokczyyg45sue2a3mjndzxr3thvd",
"tcp_mss": 1400,
"test_start": {
"protocol": "TCP",
"num_streams": 1,
"blksize": 262144,
"omit": 0,
"duration": 0,
"bytes": 0,
"blocks": 4,
"reverse": 0,
"tos": 0
}
},
"intervals": [{
"streams": [{
"socket": 6,
"start": 0,
"end": 1.0002388954162598,
"seconds": 1.0002388954162598,
"bytes": 6940,
"bits_per_second": 55506.7396943155,
"omitted": false
}],
"sum": {
"start": 0,
"end": 1.0002388954162598,
"seconds": 1.0002388954162598,
"bytes": 6940,
"bits_per_second": 55506.7396943155,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 1.0002388954162598,
"end": 2.0000648498535156,
"seconds": 0.99982595443725586,
"bytes": 13880,
"bits_per_second": 111059.32938348054,
"omitted": false
}],
"sum": {
"start": 1.0002388954162598,
"end": 2.0000648498535156,
"seconds": 0.99982595443725586,
"bytes": 13880,
"bits_per_second": 111059.32938348054,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 2.0000648498535156,
"end": 3.0002357959747314,
"seconds": 1.0001709461212158,
"bytes": 8328,
"bits_per_second": 66612.612832212282,
"omitted": false
}],
"sum": {
"start": 2.0000648498535156,
"end": 3.0002357959747314,
"seconds": 1.0001709461212158,
"bytes": 8328,
"bits_per_second": 66612.612832212282,
"omitted": false
}
}],
"end": {
"streams": [{
"sender": {
"socket": 6,
"start": 0,
"end": 3.099092960357666,
"seconds": 3.099092960357666,
"bytes": 0,
"bits_per_second": 0
},
"receiver": {
"socket": 6,
"start": 0,
"end": 3.099092960357666,
"seconds": 3.099092960357666,
"bytes": 29148,
"bits_per_second": 75242.660669684541
}
}],
"sum_sent": {
"start": 0,
"end": 3.099092960357666,
"seconds": 3.099092960357666,
"bytes": 0,
"bits_per_second": 0
},
"sum_received": {
"start": 0,
"end": 3.099092960357666,
"seconds": 3.099092960357666,
"bytes": 29148,
"bits_per_second": 75242.660669684541
},
"cpu_utilization_percent": {
"host_total": 0.0042643816737899364,
"host_user": 0.004261896602884464,
"host_system": 0,
"remote_total": 0,
"remote_user": 0,
"remote_system": 0
},
"receiver_tcp_congestion": "cubic"
}
}
您可以看到报告的底部。在这里,我可以看到sum_sent有0个字节,sum_received有29148个字节的数据。
当我打开客户端报告时,我看到以下内容:
{
"start": {
"connected": [{
"socket": 6,
"local_host": "2001:1:1:1::",
"local_port": 32001,
"remote_host": "2001:1:1:1:0:1:1:1",
"remote_port": 22001
}],
"version": "iperf 3.6",
"system_info": "Linux deba 5.3.0-51-generic #44-Ubuntu SMP Wed Apr 22 21:09:44 UTC 2020 x86_64",
"timestamp": {
"time": "Fri, 01 May 2020 18:13:38 GMT",
"timesecs": 1588356818
},
"connecting_to": {
"host": "2001:1:1:1:0:0001:0001:0001",
"port": 22001
},
"cookie": "vqbvzrztcokczyyg45sue2a3mjndzxr3thvd",
"tcp_mss": 1400,
"sock_bufsize": 33554432,
"sndbuf_actual": 33554432,
"rcvbuf_actual": 33554432,
"test_start": {
"protocol": "TCP",
"num_streams": 1,
"blksize": 262144,
"omit": 0,
"duration": 0,
"bytes": 0,
"blocks": 4,
"reverse": 0,
"tos": 0
}
},
"intervals": [{
"streams": [{
"socket": 6,
"start": 0,
"end": 1.0000619888305664,
"seconds": 1.0000619888305664,
"bytes": 524288,
"bits_per_second": 4194044.0161160971,
"retransmits": 2,
"snd_cwnd": 19432,
"rtt": 471866,
"rttvar": 246835,
"pmtu": 1500,
"omitted": false
}],
"sum": {
"start": 0,
"end": 1.0000619888305664,
"seconds": 1.0000619888305664,
"bytes": 524288,
"bits_per_second": 4194044.0161160971,
"retransmits": 2,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 1.0000619888305664,
"end": 1.5732829570770264,
"seconds": 0.57322096824646,
"bytes": 524288,
"bits_per_second": 7317080.5541723184,
"retransmits": 2,
"snd_cwnd": 13880,
"rtt": 800058,
"rttvar": 490532,
"pmtu": 1500,
"omitted": false
}],
"sum": {
"start": 1.0000619888305664,
"end": 1.5732829570770264,
"seconds": 0.57322096824646,
"bytes": 524288,
"bits_per_second": 7317080.5541723184,
"retransmits": 2,
"omitted": false
}
}],
"end": {
"streams": [{
"sender": {
"socket": 6,
"start": 0,
"end": 1.5732829570770264,
"seconds": 1.5732829570770264,
"bytes": 1048576,
"bits_per_second": 5331913.0943775307,
"retransmits": 4,
"max_snd_cwnd": 19432,
"max_rtt": 800058,
"min_rtt": 471866,
"mean_rtt": 635962
},
"receiver": {
"socket": 6,
"start": 0,
"end": 3.099092960357666,
"seconds": 1.5732829570770264,
"bytes": 29148,
"bits_per_second": 75242.660669684541
}
}],
"sum_sent": {
"start": 0,
"end": 1.5732829570770264,
"seconds": 1.5732829570770264,
"bytes": 1048576,
"bits_per_second": 5331913.0943775307,
"retransmits": 4
},
"sum_received": {
"start": 0,
"end": 3.099092960357666,
"seconds": 3.099092960357666,
"bytes": 29148,
"bits_per_second": 75242.660669684541
},
"cpu_utilization_percent": {
"host_total": 15.396905666723878,
"host_user": 5.0539797696817077,
"host_system": 10.343012292320152,
"remote_total": 0.0042643816737899364,
"remote_user": 0.004261896602884464,
"remote_system": 0
},
"sender_tcp_congestion": "cubic",
"receiver_tcp_congestion": "cubic"
}
}
在客户端,我看到sum_sent字节= 1048576字节= 1 MB和 sum_recevied = 29148个字节的数据。
因此,很明显,从客户端向服务器发送了1 MB数据。但是在服务器端报告中,我看不到收到了多少数据。如服务器端报告所述,sub_recieved为0。
另一方面,服务器端报告说向客户端发送了0字节数据,而客户端报告说已接收到29148个字节。
我一团糟,难以理解报告格式。这是否意味着服务器没有从客户端接收到全部数据?