====== SQM (Smart Queue Management) ====== ===== 準備: 現在の速度と待機時間を測定する ===== [[http://www.dslreports.com/speedtest|Speed test - how fast is your internet? | DSLReports, ISP Information]] で、速度テストを実行して、ダウンロード/アップロードの速度を計測する。\\ {{:hardware:gl-ar750s-ext:openwrt_sqm_000.png?600|Speed test}}\\ ダウンロード: 47.9 Mbit/s(47,900 kbit/s) アップロード: 30.8 Mbit/s(30,800 kbit/s)\\ ===== パッケージ インストール ===== qos-scripts および luci-app-qos がインストールされている場合はアンインストールする。\\ # opkg remove qos-scripts luci-app-qos No packages removed. \\ luci-app-sqm パッケージをインストールする。(他の必要なパッケージが自動的にインストールされる)\\ # opkg update && opkg install luci-app-sqm Installing luci-app-sqm (1.2.3-1) to root... Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/packages/luci-app-sqm_1.2.3-1_all.ipk Installing kmod-sched-cake (4.9.120+2018-07-16-f39ab9a4-1) to root... Downloading https://fw.gl-inet.com/releases/kmod-3.2/ar71xx/nand/kmod-sched-cake_4.9.120%2b2018-07-16-f39ab9a4-1_mips_24kc.ipk Installing kmod-ifb (4.9.120-1) to root... Downloading https://fw.gl-inet.com/releases/kmod-3.2/ar71xx/nand/kmod-ifb_4.9.120-1_mips_24kc.ipk Installing sqm-scripts (1.2.3-1) to root... Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/packages/sqm-scripts_1.2.3-1_all.ipk Configuring kmod-sched-cake. Configuring kmod-ifb. Configuring sqm-scripts. Configuring luci-app-sqm. \\ SQM スクリプトを有効化して開始する。\\ # service sqm enable && service sqm start ===== SQM Bufferbloat パッケージの構成 ===== Bufferbloat (バッファブロート) とは、パケット交換型ネットワークにおける、送信パケットの過剰なバッファリングにより生じる大きな遅延のことである。\\ [[https://ja.wikipedia.org/wiki/Bufferbloat|Bufferbloat - Wikipedia]] より。\\ \\ [Network] - [SQM QoS] をクリックして Smart Queue Management(SQM) GUI を開く。\\ {{:hardware:gl-ar750s-ext:openwrt_sqm_001.png?400|Smart Queue Management(SQM) GUI 001}}\\ ==== Basic Settings ==== - Enable this SQM instance. チェックボックスをオンにする。 - Interface name を [Network] - [Interfaces] から見つけた WAN または WWAN(WiFi 中継時) に設定する。 - ダウンロードとアップロードの速度を、準備で測定した速度の 80~95% に設定する。 * ダウンロード: 47.9 Mbit/s(47,900 kbit/s) アップロード: 30.8 Mbit/s(30,800 kbit/s) の場合 * Download speed (kbit/s): 47,900 x 80% = 38320 ~‬ 47,900 x 95% = 45505 * Upload speed (kbit/s): 30,800 x 80% = 24640‬ ~‬ 30,800 x 95% = 29260 ==== Queue Discipline ==== - Queuing disciplines: cake に設定する。 - Queue setup script: piece_of_cake.qos に設定する。 ==== Link Layer Adaptation ==== - [Save & Apply] ボタンをクリックする。 >ping_collector.bat This script requires administrative priviledge 144 144000 hrping -q -l16:160:1 -s 10 -W -n 144000 -F ping_sweep_xDSL_20200126_115938.67.txt 8.8.8.8 This is hrPING v5.07.1148 by cFos Software GmbH -- http://www.cfos.de 2020-01-26 11:59:38.795: -q -l16:160:1 -s 10 -W -n 144000 -F ping_sweep_xDSL_20200126_115938.67.txt 8.8.8.8 Source address is 172.77.0.122; using ICMP echo-request, ID=501e Pinging 8.8.8.8 [8.8.8.8] with 16-160 bytes data (44-188 bytes IP): Packets: sent=144000, rcvd=143797, error=0, lost=203 (0.1% loss) in 1440.033774 sec RTTs in ms: min/avg/max/dev: 28.497 / 45.792 / 1962.358 / 24.127 Bandwidth in kbytes/sec: sent=11.599, rcvd=8.637 Correlation: 11.0% DONE ===== 参考文献 ===== [[https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm|OpenWrt Project: SQM (aka Smart Queue Management)]]\\ [[https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details|OpenWrt Project: SQM Details]]\\ [[https://www.stoplagging.com/gl-inet-openwrt-method/|GL.inet / OpenWrt Guide (fq_codel/Cake) - StopLagging.com]]\\ [[https://forum.openwrt.org/t/sqm-per-packet-overhead-for-3g-mobile-connection/2409/5|SQM: Per packet overhead for 3g mobile connection - Installing and Using OpenWrt - OpenWrt Forum]]\\ [[https://github.com/moeller0/ATM_overhead_detector|moeller0/ATM_overhead_detector: Heuristically determine the likelihood of ATM-AAL5 "quantization" and likely per packet overhead for ATM based links.]]\\ [[https://www.cfos.de/en/ping/ping.htm|Ping Utility hrPING v5.06 - cFos Software]]\\ [[https://github.com/moeller0/ATM_overhead_detector/wiki|Home · moeller0/ATM_overhead_detector Wiki]]\\ [[https://www.bufferbloat.net/projects/bloat/wiki/Getting_SQM_Running_Right/|Getting SQM Running Right - Bufferbloat.net]]\\