1. Installing Netperf
Slightly
2. Turn on the service point process
-sh-4.1#./netserver
Starting NetServer at Port 12865
Starting NetServer at hostname 0.0.0.0 Port 12865 and family Af_unspec
3. Open a single client process to test the maximum throughput per TCP connection
-sh-4.1#./netperf-h 192.168.10.2-l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 af_inet to 192.168.10.2 (192.168.10.2) port 0 af_inet
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time throughput
Bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768) 60.00 3642.99
As can be seen from the test results, the TCP throughput of a single connection is around 3.6Gbps, which is related to the configuration of the system.
For a gigabit NIC, you probably need to turn on 4 client processes.
4. Four client process tests
First Test Result:
-sh-4.1#./netperf-h 192.168.10.2-l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 af_inet to 192.168.10.2 (192.168.10.2) port 0 af_inet
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time throughput
Bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768) 60.00 2520.14
A second Test result:
-sh-4.1#./netperf-h 192.168.10.2-l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 af_inet to 192.168.10.2 (192.168.10.2) port 0 af_inet
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time throughput
Bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768) 60.00 2779.29
A third Test result:
-sh-4.1#./netperf-h 192.168.10.2-l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 af_inet to 192.168.10.2 (192.168.10.2) port 0 af_inet
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time throughput
Bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768) 60.00 1421.87
Fourth Test Result:
-sh-4.1#./netperf-h 192.168.10.2-l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 af_inet to 192.168.10.2 (192.168.10.2) port 0 af_inet
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time throughput
Bytes bytes bytes secs. 10^6bits/sec
32768 32768 32768) 60.00 2766.95
Add it to get the network card bandwidth:
2520.14 + 2779.29 + 1421.87 + 2766.95 = 9488.25
To reach 95% of the physical bandwidth.
You can also capture data on a gigabit network card through a shell script.
The obtained network card bandwidth data is 9878.4Mbps, reaching 98% of the physical bandwidth.
The reason for this is that Netperf gets the average throughput of this 60s, while the shell script captures the average of 1s.
Million Gigabit bandwidth test method