OpenWRT 19.07で実装された Flow Offloading 機能を、GL-iNet社の GL-AR750S で実際に有効化してみて、CPU負荷や回線速度を相対比較してみました。
OpenWRTのFlow Offloading
CPU負荷の軽減と回線速度向上が見込めるとの記述を近年よく目にする、OpenWRTルータのFlow Offloading機能は、
Kernel 4.14をベースとするOpenWRT 19.07より、実験的ながら利用可能になりました。
SoftwareとHardwareと言う2つのFlow Offloadingのうち、Hardware OffloadingはMediaTek製の一部のSoCに限定されるため、今回GL-AR750Sで使ってみるのはSoftware Flow Offloadingです
なお、現時点で分かっている情報として、IPv6では正常に機能しないという点があるので注意。
Flow Offloadingの有効化
Flow Offloadingに関する設定は、OpenWRTのLuCIで Network → Firewall ページの General Settings タブの中にひっそりとあるこのチェックボックス。
Software flow offloadingへチェックを入れると、その下へHardware flow offloadingのチェックボックスが現れますが、こちらはチェックを入れずに Save & Apply を押して適用します。
Firewall設定の再適用で数秒程度LuCIが待ち画面になるものの、その間もネットワークは途切れたりしないので既存のセッションに気兼ねすること無く、Flow Offloading機能を試すことができます。
なお、この設定変更により設定ファイルへ追加される項目は、次の一行です。
1 2 |
config defaults option flow_offloading '1' |
Synology NASからスピードテスト
Flow Offloading機能の効果を試すべく、このルータと中華ギガビットハブを介して有線接続している、Synology NAS DS213jからSpeedtest CLIを使って回線速度を計測してみようと思います。
以前、NanoPi NEO2 BlackにSpeedtest CLIを仕込んで組んだインターネットスピードテスタを使っても良かったのかも。
Synology DSM上での実行に際しては、Pyhton製の汎用Speedtest CLIを使わせて頂きました(Great Tnx!!)。
wget でスクリプトをダウンロードし、実行権限を付与するだけで計測可能。
1 2 3 4 5 6 7 8 9 10 11 |
$ wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py --2022-06-06 22:23:23-- https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py Resolving raw.githubusercontent.com... 185.199.109.133, 185.199.111.133, 185.199.110.133, ... Connecting to raw.githubusercontent.com|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 65334 (64K) [text/plain] Saving to: 'speedtest.py' speedtest.py 100%[==========================================>] 63.80K --.-KB/s in 0.009s 2022-06-06 22:23:24 (6.96 MB/s) - 'speedtest.py' saved [65334/65334] $ chmod +x speedtest.py |
コマンドラインオプションも同じで助かりました。
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
$ python ./speedtest.py -h usage: speedtest.py [-h] [--no-download] [--no-upload] [--single] [--bytes] [--share] [--simple] [--csv] [--csv-delimiter CSV_DELIMITER] [--csv-header] [--json] [--list] [--server SERVER] [--exclude EXCLUDE] [--mini MINI] [--source SOURCE] [--timeout TIMEOUT] [--secure] [--no-pre-allocate] [--version] Command line interface for testing internet bandwidth using speedtest.net. -------------------------------------------------------------------------- https://github.com/sivel/speedtest-cli optional arguments: -h, --help show this help message and exit --no-download Do not perform download test --no-upload Do not perform upload test --single Only use a single connection instead of multiple. This simulates a typical file transfer. --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv --share Generate and provide a URL to the speedtest.net share results image, not displayed with --csv --simple Suppress verbose output, only show basic information --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes --csv-delimiter CSV_DELIMITER Single character delimiter to use in CSV output. Default "," --csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes --list Display a list of speedtest.net servers sorted by distance --server SERVER Specify a server ID to test against. Can be supplied multiple times --exclude EXCLUDE Exclude a server from selection. Can be supplied multiple times --mini MINI URL of the Speedtest Mini server --source SOURCE Source IP address to bind to --timeout TIMEOUT HTTP timeout in seconds. Default 10 --secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this option to avoid a MemoryError --version Show the version number and exit |
計測前にまずは利用可能なサーバを確認します。
1 2 3 4 5 6 7 8 9 10 11 12 |
$ python ./speedtest.py --list Retrieving speedtest.net configuration... 34809) HGC環電 (Hong Kong, Hong Kong) [7.59 km] 28912) fdcservers.net (Hong Kong, Hong Kong) [7.59 km] 47845) HK Broadband Network (Hong Kong, Hong Kong) [7.59 km] 2993) Website Solution Limited (Hong Kong, China) [7.59 km] 35445) UDomain (Hong Kong, Hong Kong) [7.59 km] 50275) Verizon (Hong Kong, Hong Kong) [7.59 km] 32155) China Mobile Hong Kong (Kwai Chung, Hong Kong) [7.90 km] 15863) GX ChinaMobile (Nanning, China) [605.00 km] 14689) 南天 (台南, Taiwan) [624.66 km] 4870) 湖南联通5G (Changsha, China) [665.05 km] |
#32155を相手に、Flow Offloading無し・有りそれぞれの場合で計測してみます。
1 2 3 4 5 6 7 8 9 10 |
$ python ./speedtest.py --server 32155 --bytes Retrieving speedtest.net configuration... Testing from Netvigator (###.###.###.###)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by China Mobile Hong Kong (Kwai Chung) [7.90 km]: 8.352 ms Testing download speed........................................... Download: 96.32 Mbit/s Testing upload speed............................................. Upload: 84.64 Mbit/s |
1 2 3 4 5 6 7 8 9 10 |
$ python ./speedtest.py --server 32155 --bytes Retrieving speedtest.net configuration... Testing from Netvigator (###.###.###.###)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by China Mobile Hong Kong (Kwai Chung) [7.90 km]: 7.799 ms Testing download speed........................................... Download: 259.04 Mbit/s Testing upload speed............................................. Upload: 202.56 Mbit/s |
上り下り共にあっさりと倍以上の速度になりました。CPU負荷については、Software Flow Offloadingという性質のためか、両者の間に明確な差異を見つけるには至りませんでした。
WiFi越しにスピードテスト
最後にGL-AR750S内蔵の11ac WiFi越しになってしまいますが、AndroidスマートフォンからSpeedtestアプリを用いて、Flow Offloadingの有無による差異を比較計測してみました。

図4.Androidアプリからの計測結果
こちらでもやはり、上り下り3〜4倍近くの速度向上を確認することができました。