Code-Hex / gvisor-vmnet

vmnet based gvisor tcpip stack
MIT License
11 stars 4 forks source link

Benchmark #2

Open Code-Hex opened 1 year ago

Code-Hex commented 1 year ago

Host

ProductName:        macOS
ProductVersion:     13.0
BuildVersion:       22A380

Guest

codehex@debian:~$ uname -a
Linux debian 5.10.0-20-arm64 #1 SMP Debian 5.10.158-2 (2022-12-13) aarch64 GNU/Linux

Host -> Guest

Run in guest $ iperf3 -s

Then in Host (unsupport udp forwarding now)

`$ iperf3 -c 127.0.0.1 -p 5202` ``` macOS:~$ iperf3 -c 127.0.0.1 -p 5202 Connecting to host 127.0.0.1, port 5202 [ 5] local 127.0.0.1 port 54818 connected to 127.0.0.1 port 5202 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 65.1 MBytes 546 Mbits/sec [ 5] 1.00-2.00 sec 59.4 MBytes 498 Mbits/sec [ 5] 2.00-3.00 sec 60.3 MBytes 505 Mbits/sec [ 5] 3.00-4.00 sec 58.3 MBytes 490 Mbits/sec [ 5] 4.00-5.00 sec 61.3 MBytes 514 Mbits/sec [ 5] 5.00-6.00 sec 59.9 MBytes 502 Mbits/sec [ 5] 6.00-7.00 sec 59.9 MBytes 503 Mbits/sec [ 5] 7.00-8.00 sec 60.2 MBytes 505 Mbits/sec [ 5] 8.00-9.00 sec 60.2 MBytes 505 Mbits/sec [ 5] 9.00-10.00 sec 60.7 MBytes 510 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 605 MBytes 508 Mbits/sec sender [ 5] 0.00-10.00 sec 604 MBytes 507 Mbits/sec receiver iperf Done. ```
`$ iperf3 -c 127.0.0.1 -p 5202 -R` ``` macOS:~$ iperf3 -c 127.0.0.1 -p 5202 -R Connecting to host 127.0.0.1, port 5202 Reverse mode, remote host 127.0.0.1 is sending [ 5] local 127.0.0.1 port 54825 connected to 127.0.0.1 port 5202 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 1.01-2.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 2.01-3.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 3.00-4.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 4.01-5.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 5.01-6.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 6.01-7.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 7.00-8.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 8.01-9.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 9.01-10.01 sec 0.00 Bytes 0.00 bits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 141 KBytes 116 Kbits/sec 5 sender [ 5] 0.00-10.01 sec 0.00 Bytes 0.00 bits/sec receiver iperf Done. ```

Guest -> Internet

`$ iperf3 -c speedtest.uztelecom.uz -p 5206` ``` codehex@debian:~$ iperf3 -c speedtest.uztelecom.uz -p 5206 Connecting to host speedtest.uztelecom.uz, port 5206 [ 5] local 192.168.127.2 port 35078 connected to 195.69.189.215 port 5206 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.01 sec 84.8 KBytes 691 Kbits/sec 2 1.41 KBytes [ 5] 1.01-2.01 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 2.01-3.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 3.01-4.01 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 4.01-5.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 5.01-6.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 6.01-7.01 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 7.01-8.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 8.01-9.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 9.01-10.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 84.8 KBytes 69.5 Kbits/sec 5 sender [ 5] 0.00-10.01 sec 0.00 Bytes 0.00 bits/sec receiver iperf Done. ```
`$ iperf3 -c speedtest.uztelecom.uz -p 5206 -R` ``` codehex@debian:~$ iperf3 -c speedtest.uztelecom.uz -p 5206 -R Connecting to host speedtest.uztelecom.uz, port 5206 Reverse mode, remote host speedtest.uztelecom.uz is sending [ 5] local 192.168.127.2 port 45778 connected to 195.69.189.215 port 5206 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.01 sec 101 KBytes 826 Kbits/sec [ 5] 1.01-2.01 sec 41.1 KBytes 337 Kbits/sec [ 5] 2.01-3.01 sec 5.48 KBytes 44.8 Kbits/sec [ 5] 3.01-4.01 sec 13.7 KBytes 112 Kbits/sec [ 5] 4.01-5.01 sec 15.1 KBytes 123 Kbits/sec [ 5] 5.01-6.00 sec 21.9 KBytes 180 Kbits/sec [ 5] 6.00-7.00 sec 27.4 KBytes 225 Kbits/sec [ 5] 7.00-8.00 sec 30.1 KBytes 246 Kbits/sec [ 5] 8.00-9.01 sec 46.6 KBytes 380 Kbits/sec [ 5] 9.01-10.01 sec 19.2 KBytes 157 Kbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 438 KBytes 359 Kbits/sec 17 sender [ 5] 0.00-10.01 sec 322 KBytes 263 Kbits/sec receiver iperf Done. ```
`$ iperf3 -c speedtest.uztelecom.uz -p 5206 -u` ``` codehex@debian:~$ iperf3 -c speedtest.uztelecom.uz -p 5206 -u Connecting to host speedtest.uztelecom.uz, port 5206 [ 5] local 192.168.127.2 port 33149 connected to 195.69.189.215 port 5206 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 1.00-2.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 2.00-3.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 3.00-4.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 4.00-5.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 5.00-6.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 6.00-7.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 7.00-8.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 8.00-9.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 9.00-10.00 sec 129 KBytes 1.05 Mbits/sec 91 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/906 (0%) sender [ 5] 0.00-10.00 sec 543 KBytes 445 Kbits/sec 2.325 ms 519/903 (57%) receiver iperf Done. ```

Guest -> Guest

Running 2 VMs 192.168.127.2 (server) and 192.168.127.3 (client)

`$ iperf3 -c 192.168.127.2` ``` codehex@debian:~$ iperf3 -c 192.168.127.2 Connecting to host 192.168.127.2, port 5201 [ 5] local 192.168.127.3 port 57420 connected to 192.168.127.2 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 84.8 KBytes 693 Kbits/sec 2 1.41 KBytes [ 5] 1.00-2.01 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 2.01-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 4.00-5.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 5.01-6.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 6.01-7.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 7.00-8.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 8.01-9.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 9.00-10.01 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 84.8 KBytes 69.5 Kbits/sec 5 sender [ 5] 0.00-10.01 sec 0.00 Bytes 0.00 bits/sec receiver iperf Done. ```
`$ iperf3 -c 192.168.127.2 -R` ``` codehex@debian:~$ iperf3 -c 192.168.127.2 -R Connecting to host 192.168.127.2, port 5201 Reverse mode, remote host 192.168.127.2 is sending [ 5] local 192.168.127.3 port 44614 connected to 192.168.127.2 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 1.01-2.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 2.00-3.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 3.01-4.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 4.00-5.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 5.01-6.00 sec 0.00 Bytes 0.00 bits/sec [ 5] 6.00-7.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 7.01-8.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 8.01-9.01 sec 0.00 Bytes 0.00 bits/sec [ 5] 9.01-10.00 sec 0.00 Bytes 0.00 bits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 141 KBytes 116 Kbits/sec 5 sender [ 5] 0.00-10.00 sec 0.00 Bytes 0.00 bits/sec receiver iperf Done. ```
`$ iperf3 -c 192.168.127.2 -u` ``` codehex@debian:~$ iperf3 -c 192.168.127.2 -u Connecting to host 192.168.127.2, port 5201 [ 5] local 192.168.127.3 port 42729 connected to 192.168.127.2 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 1.00-2.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 2.00-3.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 3.00-4.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 4.00-5.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 5.00-6.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 6.00-7.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 7.00-8.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 8.00-9.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 9.00-10.00 sec 129 KBytes 1.05 Mbits/sec 91 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/906 (0%) sender [ 5] 0.00-10.00 sec 1.25 MBytes 1.05 Mbits/sec 0.025 ms 0/906 (0%) receiver iperf Done. ```
Code-Hex commented 1 year ago

Public iperf3 server https://github.com/R0GGER/public-iperf3-servers

Code-Hex commented 1 year ago

I tried iperf3 from macOS guest to the public server, I can confirm the result. I'm not sure why...

スクリーンショット 2023-01-07 10 31 45 スクリーンショット 2023-01-07 10 33 29
Code-Hex commented 1 year ago

Version macOS iperf3

iperf 3.12 (cJSON 1.7.15)
Darwin codehexnokasoumashin.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:37 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_VMAPPLE arm64
Optional features available: sendfile / zerocopy, authentication, support IPv4 don't fragment

Debian version

iperf 3.9 (cJSON 1.7.13)
Linux debian 5.10.0-20-arm64 #1 SMP Debian 5.10.158-2 (2022-12-13) aarch64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication

I need to update iperf3 in debian

Code-Hex commented 1 year ago

I tried iperf3 from debian guest to public server after updated iperf3, I cannot confirm the result. I believe any reason for Linux-specific configurations...

codehex@debian:~/iperf-3.12$ ./src/iperf3 -v
iperf 3.12 (cJSON 1.7.15)
Linux debian 5.10.0-20-arm64 #1 SMP Debian 5.10.158-2 (2022-12-13) aarch64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, bind to device, support IPv4 don't fragment
codehex@debian:~/iperf-3.12$ ./src/iperf3 -c speedtest.uztelecom.uz -p 5206
Connecting to host speedtest.uztelecom.uz, port 5206
[  5] local 192.168.127.3 port 60016 connected to 195.69.189.215 port 5206
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.01   sec  84.8 KBytes   691 Kbits/sec    2   1.41 KBytes
[  5]   1.01-2.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   4.00-5.01   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   5.01-6.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   8.00-9.01   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   9.01-10.00  sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  84.8 KBytes  69.5 Kbits/sec    5             sender
[  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  receiver

iperf Done.