自宅の OpenWRT ルータを GL-AR750SとNanoPi R2S の並列運用し、リモートからOpenConnect VPN で接続してファイル転送をしていると、マルチコアのR2Sへ繋いだ時の方が明らかに速かったことから、ルータの向こうにいる Synology NASに iPerf を入れて、両ルータのVPN転送速度を比較してみます。
2つのルータ
今回の実験は、現在自宅に設置している2台のOpenWRTルータ(GL-iNet GL-AR750SとFriendlyElec NanoPi R2S)のVPN性能を比較してみるものです。
下図のように、リモートPC(Ubuntu 18.04)からOpenConnectで自宅のルータいずれかに接続し、自宅LAN内のSynology NAS DS213Jとの間で、iPerfによる計測をしようと思います。
Ubuntu 18.04にiPerf3を入れる
まずリモート側のUbuntu 18.04デスクトップ機から。 apt でパッケージをインストールするだけです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
$ sudo apt install iperf3 パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下の追加パッケージがインストールされます: libiperf0 以下のパッケージが新たにインストールされます: iperf3 libiperf0 アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 2 個。 64.0 kB のアーカイブを取得する必要があります。 この操作後に追加で 205 kB のディスク容量が消費されます。 続行しますか? [Y/n] y 取得:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libiperf0 amd64 3.1.3-1 [55.2 kB] 取得:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 iperf3 amd64 3.1.3-1 [8,802 B] 64.0 kB を 1秒 で取得しました (52.2 kB/s) 以前に未選択のパッケージ libiperf0:amd64 を選択しています。 (データベースを読み込んでいます ... 現在 776931 個のファイルとディレクトリがインストールされています。) .../libiperf0_3.1.3-1_amd64.deb を展開する準備をしています ... libiperf0:amd64 (3.1.3-1) を展開しています... 以前に未選択のパッケージ iperf3 を選択しています。 .../iperf3_3.1.3-1_amd64.deb を展開する準備をしています ... iperf3 (3.1.3-1) を展開しています... libiperf0:amd64 (3.1.3-1) を設定しています ... iperf3 (3.1.3-1) を設定しています ... man-db (2.8.3-2ubuntu0.1) のトリガを処理しています ... libc-bin (2.27-3ubuntu1.6) のトリガを処理しています ... $ iperf3 -v iperf 3.1.3 Linux 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing |
Synology NAS DS213JにiPerfを入れる
問題はこちらのSynology NAS、調べてみるとCommunityレポジトリの中にある、「SynoCli Monitor Tools」パッケージの中にiPerf(iPerf2とiPerf3)が含まれているとこのと。
早速、パッケージセンタからインストールしました。
そしてNASのターミナルへ入ると、確かにiPerfが使えるようになっていました。
1 2 3 4 5 6 7 8 9 |
$ uname -a Linux nas07 3.2.40 #25556 Thu Jul 1 14:30:20 CST 2021 armv7l GNU/Linux synology_armada370_213j $ iperf3 -v iperf 3.11 (cJSON 1.7.13) Linux nas07 3.2.40 #25556 Thu Jul 1 14:30:20 CST 2021 armv7l Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, authentication, bind to device, support IPv4 don't fragment |
GL-AR750S経由での転送速度を計測
転送速度の計測はまず、リモートからGL-AR750SへOpenConnect VPNで接続して、ルータの向こうにいるSynology NASに対して行います(以降、ルータから見て外向きを上り、内向きを下りとします)。
下り Remote PC → [GL-AR750S] → Synology NAS 計測データ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ iperf3 -c 192.168.51.207 Connecting to host 192.168.51.207, port 5201 [ 4] local 192.168.100.46 port 44880 connected to 192.168.51.207 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 2.03 MBytes 17.0 Mbits/sec 0 103 KBytes [ 4] 1.00-2.00 sec 1.92 MBytes 16.1 Mbits/sec 0 179 KBytes [ 4] 2.00-3.00 sec 1.86 MBytes 15.6 Mbits/sec 0 254 KBytes [ 4] 3.00-4.00 sec 2.11 MBytes 17.7 Mbits/sec 0 339 KBytes [ 4] 4.00-5.00 sec 1.98 MBytes 16.6 Mbits/sec 0 416 KBytes [ 4] 5.00-6.00 sec 1.55 MBytes 13.0 Mbits/sec 0 453 KBytes [ 4] 6.00-7.00 sec 1.55 MBytes 13.0 Mbits/sec 0 453 KBytes [ 4] 7.00-8.00 sec 1.67 MBytes 14.0 Mbits/sec 0 453 KBytes [ 4] 8.00-9.00 sec 1.61 MBytes 13.5 Mbits/sec 0 453 KBytes [ 4] 9.00-10.00 sec 1.61 MBytes 13.5 Mbits/sec 0 453 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 17.9 MBytes 15.0 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 15.8 MBytes 13.2 Mbits/sec receiver iperf Done. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$ iperf3 -s ----------------------------------------------------------- Server listening on 5201 (test #1) ----------------------------------------------------------- Accepted connection from 192.168.100.46, port 44878 [ 5] local 192.168.51.207 port 5201 connected to 192.168.100.46 port 44880 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 1.41 MBytes 11.9 Mbits/sec [ 5] 1.00-2.00 sec 1.49 MBytes 12.5 Mbits/sec [ 5] 2.00-3.00 sec 1.44 MBytes 12.1 Mbits/sec [ 5] 3.00-4.00 sec 1.66 MBytes 13.9 Mbits/sec [ 5] 4.00-5.00 sec 1.53 MBytes 12.8 Mbits/sec [ 5] 5.00-6.00 sec 1.32 MBytes 11.1 Mbits/sec [ 5] 6.00-7.00 sec 1.58 MBytes 13.2 Mbits/sec [ 5] 7.00-8.00 sec 1.66 MBytes 13.9 Mbits/sec [ 5] 8.00-9.00 sec 1.60 MBytes 13.4 Mbits/sec [ 5] 9.00-10.00 sec 1.64 MBytes 13.7 Mbits/sec [ 5] 10.00-10.26 sec 444 KBytes 13.9 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-10.26 sec 15.8 MBytes 12.9 Mbits/sec receiver |
上り Synology NAS → [GL-AR750S] → Remote PC 計測データ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ iperf3 -c 192.168.100.46 Connecting to host 192.168.100.46, port 5201 [ 5] local 192.168.51.207 port 49417 connected to 192.168.100.46 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 1.48 MBytes 12.4 Mbits/sec 0 98.5 KBytes [ 5] 1.00-2.00 sec 1.55 MBytes 13.0 Mbits/sec 0 163 KBytes [ 5] 2.00-3.00 sec 951 KBytes 7.79 Mbits/sec 0 216 KBytes [ 5] 3.00-4.00 sec 1.30 MBytes 10.9 Mbits/sec 0 279 KBytes [ 5] 4.00-5.00 sec 1.49 MBytes 12.5 Mbits/sec 0 343 KBytes [ 5] 5.00-6.00 sec 1.17 MBytes 9.83 Mbits/sec 0 401 KBytes [ 5] 6.00-7.00 sec 1.18 MBytes 9.90 Mbits/sec 2 371 KBytes [ 5] 7.00-8.00 sec 1.01 MBytes 8.49 Mbits/sec 96 212 KBytes [ 5] 8.00-9.00 sec 1.30 MBytes 10.9 Mbits/sec 0 235 KBytes [ 5] 9.00-10.00 sec 1.49 MBytes 12.5 Mbits/sec 0 247 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 12.9 MBytes 10.8 Mbits/sec 98 sender [ 5] 0.00-10.00 sec 12.7 MBytes 10.6 Mbits/sec receiver iperf Done. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$ iperf3 -s warning: this system does not seem to support IPv6 - trying IPv4 ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Accepted connection from 192.168.51.207, port 49416 [ 5] local 192.168.100.46 port 5201 connected to 192.168.51.207 port 49417 [ ID] Interval Transfer Bandwidth [ 5] 0.00-1.00 sec 1.19 MBytes 9.98 Mbits/sec [ 5] 1.00-2.00 sec 1.34 MBytes 11.3 Mbits/sec [ 5] 2.00-3.00 sec 1.00 MBytes 8.42 Mbits/sec [ 5] 3.00-4.00 sec 1.35 MBytes 11.3 Mbits/sec [ 5] 4.00-5.00 sec 1.35 MBytes 11.3 Mbits/sec [ 5] 5.00-6.00 sec 1.20 MBytes 10.1 Mbits/sec [ 5] 6.00-7.00 sec 1.20 MBytes 10.0 Mbits/sec [ 5] 7.00-8.00 sec 1.14 MBytes 9.58 Mbits/sec [ 5] 8.00-9.00 sec 1.29 MBytes 10.8 Mbits/sec [ 5] 9.00-10.00 sec 1.33 MBytes 11.2 Mbits/sec [ 5] 10.00-10.19 sec 269 KBytes 11.4 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 5] 0.00-10.19 sec 0.00 Bytes 0.00 bits/sec sender [ 5] 0.00-10.19 sec 12.7 MBytes 10.4 Mbits/sec receiver |
NanoPi R2S経由での転送速度を計測
続いてOpenConnect VPNをNanoPi R2Sへ繋ぎ直してから、同じ要領で計測します。
下り Remote PC → [NanoPi R2S] → Synology NAS 計測データ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ iperf3 -c 192.168.51.207 Connecting to host 192.168.51.207, port 5201 [ 4] local 192.168.101.186 port 35616 connected to 192.168.51.207 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 11.6 MBytes 97.3 Mbits/sec 0 448 KBytes [ 4] 1.00-2.00 sec 10.5 MBytes 87.8 Mbits/sec 0 448 KBytes [ 4] 2.00-3.00 sec 10.8 MBytes 90.9 Mbits/sec 0 448 KBytes [ 4] 3.00-4.00 sec 12.1 MBytes 101 Mbits/sec 0 448 KBytes [ 4] 4.00-5.00 sec 11.5 MBytes 96.7 Mbits/sec 0 448 KBytes [ 4] 5.00-6.00 sec 11.8 MBytes 98.7 Mbits/sec 0 471 KBytes [ 4] 6.00-7.00 sec 18.2 MBytes 153 Mbits/sec 0 471 KBytes [ 4] 7.00-8.00 sec 17.9 MBytes 150 Mbits/sec 0 471 KBytes [ 4] 8.00-9.00 sec 11.8 MBytes 99.3 Mbits/sec 0 471 KBytes [ 4] 9.00-10.00 sec 10.3 MBytes 86.3 Mbits/sec 0 471 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 127 MBytes 106 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 124 MBytes 104 Mbits/sec receiver iperf Done. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$ iperf3 -s ----------------------------------------------------------- Server listening on 5201 (test #1) ----------------------------------------------------------- Accepted connection from 192.168.51.###, port 35614 [ 5] local 192.168.51.207 port 5201 connected to 192.168.51.### port 35616 [ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 8.93 MBytes 74.9 Mbits/sec [ 5] 1.00-2.00 sec 10.4 MBytes 87.5 Mbits/sec [ 5] 2.00-3.00 sec 10.9 MBytes 91.2 Mbits/sec [ 5] 3.00-4.00 sec 12.2 MBytes 102 Mbits/sec [ 5] 4.00-5.00 sec 11.4 MBytes 95.9 Mbits/sec [ 5] 5.00-6.00 sec 11.8 MBytes 98.8 Mbits/sec [ 5] 6.00-7.00 sec 18.0 MBytes 151 Mbits/sec [ 5] 7.00-8.00 sec 17.9 MBytes 150 Mbits/sec [ 5] 8.00-9.00 sec 11.8 MBytes 99.3 Mbits/sec [ 5] 9.00-10.00 sec 10.3 MBytes 86.6 Mbits/sec [ 5] 10.00-10.04 sec 445 KBytes 83.1 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate [ 5] 0.00-10.04 sec 124 MBytes 104 Mbits/sec receiver |
上り Synology NAS → [NanoPi R2S] → Remote PC 計測データ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
administrator@nas07:~$ iperf3 -c 192.168.101.186 Connecting to host 192.168.101.186, port 5201 [ 5] local 192.168.51.207 port 42487 connected to 192.168.101.186 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 8.40 MBytes 70.4 Mbits/sec 0 494 KBytes [ 5] 1.00-2.00 sec 9.91 MBytes 83.2 Mbits/sec 0 583 KBytes [ 5] 2.00-3.00 sec 10.2 MBytes 85.5 Mbits/sec 0 588 KBytes [ 5] 3.00-4.00 sec 10.1 MBytes 84.9 Mbits/sec 0 588 KBytes [ 5] 4.00-5.00 sec 10.4 MBytes 87.0 Mbits/sec 0 591 KBytes [ 5] 5.00-6.00 sec 10.1 MBytes 84.9 Mbits/sec 0 591 KBytes [ 5] 6.00-7.00 sec 8.92 MBytes 74.8 Mbits/sec 94 455 KBytes [ 5] 7.00-8.00 sec 10.3 MBytes 86.1 Mbits/sec 0 509 KBytes [ 5] 8.00-9.00 sec 10.1 MBytes 85.0 Mbits/sec 0 545 KBytes [ 5] 9.00-10.00 sec 10.0 MBytes 83.9 Mbits/sec 0 567 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 98.4 MBytes 82.6 Mbits/sec 94 sender [ 5] 0.00-10.00 sec 98.4 MBytes 82.6 Mbits/sec receiver iperf Done. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$ iperf3 -s warning: this system does not seem to support IPv6 - trying IPv4 ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Accepted connection from 192.168.51.207, port 42486 [ 5] local 192.168.101.186 port 5201 connected to 192.168.51.207 port 42487 [ ID] Interval Transfer Bandwidth [ 5] 0.00-1.00 sec 7.11 MBytes 59.6 Mbits/sec [ 5] 1.00-2.00 sec 10.0 MBytes 84.2 Mbits/sec [ 5] 2.00-3.00 sec 10.1 MBytes 84.8 Mbits/sec [ 5] 3.00-4.00 sec 10.3 MBytes 86.3 Mbits/sec [ 5] 4.00-5.00 sec 10.2 MBytes 85.7 Mbits/sec [ 5] 5.00-6.00 sec 10.1 MBytes 85.1 Mbits/sec [ 5] 6.00-7.00 sec 8.99 MBytes 75.4 Mbits/sec [ 5] 7.00-8.00 sec 10.1 MBytes 85.1 Mbits/sec [ 5] 8.00-9.00 sec 10.1 MBytes 84.8 Mbits/sec [ 5] 9.00-10.00 sec 10.2 MBytes 85.4 Mbits/sec [ 5] 10.00-10.11 sec 1.11 MBytes 86.7 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 5] 0.00-10.11 sec 0.00 Bytes 0.00 bits/sec sender [ 5] 0.00-10.11 sec 98.4 MBytes 81.7 Mbits/sec receiver |
GL-AR750S vs NanoPi R2S の勝敗
以上のiPerfによる転送速度の計測結果をまとめると以下の通り。
GL-AR750S (シングルコア)
-
- 下り : 12.9 Mbps
- 上り : 10.4 Mbps
NanoPi R2S (4コア)
-
- 下り : 104.0 Mbps
- 上り : 81.7 Mbps
いずれもギガビットルータに違いはありませんが、VPNの転送速度に関してはやはり、CPUの強さが如実に反映されることがよく分かりました。