前回までの Celeron J4125 搭載産業用ミニPCのハードウェアレビュー、そしてWindows 10をインストールしてのパフォーマンス確認に続き、今回は OpenWRT をインストールして、Intel I225 ネットワークアダプタとIntel AX210 WiFi6Eモジュールの互換性を確認します。
OpenWRT x86_64イメージの取得
OpenWRTのx86版インストールは今回が初めて。本機に搭載されているIntel I225イーサネットコントローラに対応して欲しかったので、イメージファイルは本記事執筆当時最新のver.22.03.0-rc6のx86_64汎用版を公式リリースページでダウンロードします。
いくつかのシステム仕様の中から選んだのはNanoPi R2Sと同様に、恒久的なファイルシステムで構成されるext4版のこちらのイメージファイルです。
1 2 |
generic-ext4-combined-efi.img.gz 11,733.9 KB Mon Aug 1 13:55:57 2022 |
OpenWRTシステムをSDカードへ構築
今回はネットワークアダプタ(Intel I225やAX210)がOpenWRTで使えるかの検証用なので、以前のNanoPi R2Sと同様、1GB micro SDカードにそのシステムを構築し、USBカードリーダを使ってJ4125ミニPCで起動させようと思います。
Ubuntu 18.04母艦で、ダウンロードしたイメージファイルから起動用SDの作成します。
1 2 3 4 5 6 7 8 9 10 11 12 |
$ sudo fdisk -l /dev/sdd ディスク /dev/sdd: 961 MiB, 1007681536 バイト, 1968128 セクタ 単位: セクタ (1 * 512 = 512 バイト) セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト $ gunzip -c ~/Downloads/openwrt-22.03.0-rc6-x86-64-generic-ext4-combined-efi.img.gz | sudo dd of=/dev/sdd bs=4M conv=fsync status=progress gzip: /home/user/Downloads/openwrt-22.03.0-rc6-x86-64-generic-ext4-combined-efi.img.gz: decompression OK, trailing garbage ignored 0+3845 レコード入力 0+3845 レコード出力 126123520 bytes (126 MB, 120 MiB) copied, 17.6927 s, 7.1 MB/s $ sudo sync |
イメージ書き込みが終わったら、SDカードのファイルシステムを gparted で800MBに拡大します。
1 2 3 4 5 6 7 8 9 10 11 12 |
$ sudo fdisk -l /dev/sdd ディスク /dev/sdd: 961 MiB, 1007681536 バイト, 1968128 セクタ 単位: セクタ (1 * 512 = 512 バイト) セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト ディスクラベルのタイプ: gpt ディスク識別子: 5A758C35-A6C1-E37D-B819-777F56E24300 デバイス 開始位置 最後から セクタ サイズ タイプ /dev/sdd1 512 33279 32768 16M Linux ファイルシステム /dev/sdd2 33280 1673215 1639936 800.8M Linux ファイルシステム /dev/sdd128 34 511 478 239K BIOS 起動 |
ネットワーク初期設定
OpenWRTのシステムを入れたmicro SDから初めて起動すると、4つあるI225イーサネットポートのうち、 eth0 はLAN、 eth1 がWANに割当てられていました。これをコンソールより、 eth0 をWAN、 eth1〜3 をLANへと変更します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
config interface 'loopback' option device 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' config device option name 'br-lan' option type 'bridge' list ports 'eth1' list ports 'eth2' list ports 'eth3' config interface 'lan' option device 'br-lan' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' config interface 'wan' option device 'eth0' option proto 'dhcp' |
そして二重ルータと同じ要領で、既存のLANをOpenWRTのWANポートへ接続し、以後の検証作業をOpenWRTのWAN側から進めたいのですが、デフォルトではアクセスできません。
Dropbear ssh serverやLuCI(uhttpd)元々、WANを含む全インターフェイスでLISTENしているので、以下の要領でファイアウォールに穴を開けるだけでWAN側からアクセス可能になります。
1 2 3 4 5 6 7 8 9 10 11 12 |
config rule option name 'Allow-sshWan' option src 'wan' option dest_port '22' option proto 'tcp' option target 'ACCEPT' config rule option name 'Allow-LuCI-WAN' option src 'wan' option dest_port '80' option proto 'tcp' option target 'ACCEPT' |
WAN側からブラウザからLuCIへアクセスしてみます。
Memory項に計16GBのRAMと、Storage項はSDカードの800MBファイルシステムが認識されています。
続いて、ターミナルからシステムの基本情報を確認してみます。
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 51 52 53 54 55 56 57 58 |
_______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- OpenWrt 22.03.0-rc6, r19590-042d558536 ----------------------------------------------------- # uname -a Linux J4125 5.10.134 #0 SMP Sun Jul 31 15:12:47 2022 x86_64 GNU/Linux # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 122 model name : Intel(R) Celeron(R) J4125 CPU @ 2.00GHz stepping : 8 microcode : 0x1a cpu MHz : 1161.141 cache size : 4096 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 24 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm 3dnowprefetch cpuid_fault cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust smep erms mpx rdt_a rdseed smap clflushopt intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts umip rdpid md_clear arch_capabilities vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec tsc_scaling bugs : spectre_v1 spectre_v2 spec_store_bypass bogomips : 3993.60 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: -略- # cat /etc/os-release NAME="OpenWrt" VERSION="22.03.0-rc6" ID="openwrt" ID_LIKE="lede openwrt" PRETTY_NAME="OpenWrt 22.03.0-rc6" VERSION_ID="22.03.0-rc6" HOME_URL="https://openwrt.org/" BUG_URL="https://bugs.openwrt.org/" SUPPORT_URL="https://forum.openwrt.org/" BUILD_ID="r19590-042d558536" OPENWRT_BOARD="x86/64" OPENWRT_ARCH="x86_64" OPENWRT_TAINTS="" OPENWRT_DEVICE_MANUFACTURER="OpenWrt" OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/" OPENWRT_DEVICE_PRODUCT="Generic" OPENWRT_DEVICE_REVISION="v0" OPENWRT_RELEASE="OpenWrt 22.03.0-rc6 r19590-042d558536" |
I225有線インターフェイスの確認
ネットワークインターフェイスは次のように、 eth0 がWAN、それ以外がブリッジインターフェイスにまとめられた上でLANに設定されています。
ネットワークデバイスタブでは、全ての物理・論理デバイスが一覧されていました。
br-lan の設定を確認すると、この中に eth1〜3 が属しているのが分かります。
AX210 WiFi6Eモジュールの確認
一方、Intel AX210 WiFi6Eモジュールは、そのままでは認識されないので、以下のパッケージをインストールする必要があります。
- kmod-iwlwifi
- iwlwifi-firmware-AX210
- hostapd
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# opkg install kmod-iwlwifi Installing kmod-iwlwifi (5.10.134+5.15.58-1-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-iwlwifi_5.10.134%2b5.15.58-1-1_x86_64.ipk Installing iw (5.16-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/iw_5.16-1_x86_64.ipk Installing iwinfo (2022-08-13-705d3b5c-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/iwinfo_2022-08-13-705d3b5c-1_x86_64.ipk Installing wireless-regdb (2022.06.06-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/wireless-regdb_2022.06.06-1_all.ipk Installing kmod-cfg80211 (5.10.134+5.15.58-1-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-cfg80211_5.10.134%2b5.15.58-1-1_x86_64.ipk Installing kmod-crypto-cmac (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-cmac_5.10.134-1_x86_64.ipk Installing kmod-crypto-null (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-null_5.10.134-1_x86_64.ipk Installing kmod-crypto-aead (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-aead_5.10.134-1_x86_64.ipk Installing kmod-crypto-manager (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-manager_5.10.134-1_x86_64.ipk Installing kmod-crypto-hmac (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-hmac_5.10.134-1_x86_64.ipk Installing kmod-crypto-sha256 (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-sha256_5.10.134-1_x86_64.ipk Installing kmod-crypto-rng (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-rng_5.10.134-1_x86_64.ipk Installing kmod-crypto-seqiv (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-seqiv_5.10.134-1_x86_64.ipk Installing kmod-crypto-ctr (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-ctr_5.10.134-1_x86_64.ipk Installing kmod-crypto-ccm (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-ccm_5.10.134-1_x86_64.ipk Installing kmod-crypto-gf128 (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-gf128_5.10.134-1_x86_64.ipk Installing kmod-crypto-ghash (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-ghash_5.10.134-1_x86_64.ipk Installing kmod-crypto-gcm (5.10.134-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-crypto-gcm_5.10.134-1_x86_64.ipk Installing hostapd-common (2022-01-16-cff80b4f-9) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/hostapd-common_2022-01-16-cff80b4f-9_x86_64.ipk Installing kmod-mac80211 (5.10.134+5.15.58-1-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/targets/x86/64/packages/kmod-mac80211_5.10.134%2b5.15.58-1-1_x86_64.ipk Configuring iwinfo. Configuring kmod-crypto-gf128. Configuring iw. Configuring kmod-crypto-null. Configuring kmod-crypto-aead. Configuring kmod-crypto-manager. Configuring kmod-crypto-hmac. Configuring kmod-crypto-sha256. Configuring kmod-crypto-rng. Configuring kmod-crypto-seqiv. Configuring kmod-crypto-ctr. Configuring kmod-crypto-ghash. Configuring kmod-crypto-ccm. Configuring wireless-regdb. Configuring kmod-cfg80211. Configuring kmod-crypto-cmac. Configuring kmod-crypto-gcm. Configuring hostapd-common. Configuring kmod-mac80211. Configuring kmod-iwlwifi. # opkg install iwlwifi-firmware-ax210 Installing iwlwifi-firmware-ax210 (20220411-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/iwlwifi-firmware-ax210_20220411-1_x86_64.ipk Configuring iwlwifi-firmware-ax210. # opkg install hostapd Installing hostapd (2022-01-16-cff80b4f-9) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/hostapd_2022-01-16-cff80b4f-9_x86_64.ipk Configuring hostapd. |
インストールを終えてデバイスを再起動した後、AX210が使える状態になります。
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 |
# lspci 00:00.0 Host bridge: Intel Corporation Gemini Lake Host Bridge (rev 06) 00:02.0 VGA compatible controller: Intel Corporation GeminiLake [UHD Graphics 600] (rev 06) 00:0e.0 Audio device: Intel Corporation Celeron/Pentium Silver Processor High Definition Audio (rev 06) 00:0f.0 Communication controller: Intel Corporation Celeron/Pentium Silver Processor Trusted Execution Engine Interface (rev 06) 00:12.0 SATA controller: Intel Corporation Celeron/Pentium Silver Processor SATA Controller (rev 06) 00:13.0 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:13.1 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:13.2 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:13.3 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:14.0 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:14.1 PCI bridge: Intel Corporation Gemini Lake PCI Express Root Port (rev f6) 00:15.0 USB controller: Intel Corporation Celeron/Pentium Silver Processor USB 3.0 xHCI Controller (rev 06) 00:1f.0 ISA bridge: Intel Corporation Celeron/Pentium Silver Processor LPC Controller (rev 06) 00:1f.1 SMBus: Intel Corporation Celeron/Pentium Silver Processor Gaussian Mixture Model (rev 06) 01:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03) 02:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03) 03:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03) 04:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03) 06:00.0 Network controller: Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz (rev 1a) # iw dev phy#0 Interface wlan0 ifindex 6 wdev 0x1 addr 84:14:4d:e6:96:f0 type managed txpower 0.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 |
フォーラムで報告されている通り、これでクライアントモードでのスキャンは2.4G・5G帯共に動作するものの、APモードは5G帯は使用不能な状態から抜け出せません。
2.4G帯で使えるようにするには、まずチャンネルをAutoにせず指定し、Advanced Settingsタブ内にあるカントリーコードの設定もデフォルトのままにせずに明示的に指定します。
その上で11n〜11ax各モードでサポートされる接続速度をまとめると次のようになります。
1 2 3 4 5 6 |
Mode Width Speed Desc. 11n 20MHz 150Mbps "Force 40MHz mode"せず 11n 40MHz 300Mbps "Force 40MHz mode"指定 11ac -- NO 2.4G -- 11ax 20MHz 300Mbps "Force 40MHz mode"せず 11ax 40MHz 600Mbps "Force 40MHz mode"指定 <-- 最大速度はこの設定。 |
11axで帯域幅80MHzを指定してもその通りには動作せず、 Advanced Settings タブ内の Force 40MHz mode オプションにチェックを入れていると40MHz、そうでない場合は20MHz帯域幅になってしまいます。
実際にASUS ZenFone8Flip(ZS672KS)で繋いでみても、WiFi6とは認識されるも573Mbpsまでしか速度が出せない状況でした。
OpenSSLとCoreMarkでベンチマーク
x86系するとどの程度速くなるのか、以前ARM系の様々なデバイスで計測した、OpenSSLとCoreMarkでベンチマークしてみます。
先ずは、OpenSSLに必要なパッケージをインストール。
1 2 3 4 5 6 7 8 9 10 11 |
# opkg install openssl-util Installing openssl-util (1.1.1q-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/openssl-util_1.1.1q-1_x86_64.ipk Installing libopenssl1.1 (1.1.1q-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/libopenssl1.1_1.1.1q-1_x86_64.ipk Installing libopenssl-conf (1.1.1q-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/libopenssl-conf_1.1.1q-1_x86_64.ipk Configuring libopenssl1.1. Configuring libopenssl-conf. Generating engines.cnf Configuring openssl-util. |
早速、 aes-256-gcm のシングルとマルチを実行してみます。
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 |
# openssl speed -evp aes-256-gcm Doing aes-256-gcm for 3s on 16 size blocks: 44252313 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 64 size blocks: 30432134 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 256 size blocks: 12359643 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 1024 size blocks: 3645469 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 8192 size blocks: 477834 aes-256-gcm's in 3.00s Doing aes-256-gcm for 3s on 16384 size blocks: 239681 aes-256-gcm's in 3.00s OpenSSL 1.1.1q 5 Jul 2022 built on: Tue Aug 30 08:59:51 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr) compiler: x86_64-openwrt-linux-musl-gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-256-gcm 236012.34k 649218.86k 1054689.54k 1244320.09k 1304805.38k 1308977.83k # openssl speed -evp aes-256-gcm -multi 4 Forked child 0 Forked child 1 Forked child 2 Forked child 3 +DT:aes-256-gcm:3:16 +DT:aes-256-gcm:3:16 +DT:aes-256-gcm:3:16 +DT:aes-256-gcm:3:16 -略- OpenSSL 1.1.1q 5 Jul 2022 built on: Tue Aug 30 08:59:51 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr) compiler: x86_64-openwrt-linux-musl-gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG evp 915602.76k 2513104.90k 4082751.66k 4816613.72k 5051872.60k 4792724.14k |
続いて、 chacha20-poly1305 でも同様にシングルとマルチを計測します。
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 |
# openssl speed -evp chacha20-poly1305 Doing chacha20-poly1305 for 3s on 16 size blocks: 29311596 chacha20-poly1305's in 3.00s Doing chacha20-poly1305 for 3s on 64 size blocks: 14388188 chacha20-poly1305's in 3.00s Doing chacha20-poly1305 for 3s on 256 size blocks: 5588660 chacha20-poly1305's in 3.00s Doing chacha20-poly1305 for 3s on 1024 size blocks: 1468301 chacha20-poly1305's in 3.00s Doing chacha20-poly1305 for 3s on 8192 size blocks: 188157 chacha20-poly1305's in 3.00s Doing chacha20-poly1305 for 3s on 16384 size blocks: 94235 chacha20-poly1305's in 3.00s OpenSSL 1.1.1q 5 Jul 2022 built on: Tue Aug 30 08:59:51 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr) compiler: x86_64-openwrt-linux-musl-gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes chacha20-poly1305 156328.51k 306948.01k 476898.99k 501180.07k 513794.05k 514648.75k # openssl speed -evp chacha20-poly1305 -multi 4 Forked child 0 Forked child 1 Forked child 2 Forked child 3 +DT:chacha20-poly1305:3:16 +DT:chacha20-poly1305:3:16 +DT:chacha20-poly1305:3:16 +DT:chacha20-poly1305:3:16 -略- OpenSSL 1.1.1q 5 Jul 2022 built on: Tue Aug 30 08:59:51 2022 UTC options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr) compiler: x86_64-openwrt-linux-musl-gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -ffunction-sections -fdata-sections -znow -zrelro -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG evp 606961.95k 1188487.27k 1839912.62k 1945686.02k 1988444.16k 1892827.14k |
次にCoreMarkパッケージをインストールの上、計測します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# opkg install coremark Installing coremark (2022-01-03-b24e397f-1) to root... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/packages/coremark_2022-01-03-b24e397f-1_x86_64.ipk Configuring coremark. # coremark 2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 13071 Total time (secs): 13.071000 Iterations/Sec : 15301.048122 Iterations : 200000 Compiler version : GCC11.2.0 Compiler flags : -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-x86_64_musl/coremark-b24e397f7103061b3673261d292a0667bd3bc1b8=coremark-b24e397f7103061b3673261d292a0667bd3bc1b8 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -flto -O3 -lrt Memory location : Please put data memory location here (e.g. code in flash, data on heap etc) seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0x4983 Correct operation validated. See README.md for run and reporting rules. CoreMark 1.0 : 15301.048122 / GCC11.2.0 -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-x86_64_musl/coremark-b24e397f7103061b3673261d292a0667bd3bc1b8=coremark-b24e397f7103061b3673261d292a0667bd3bc1b8 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -flto -O3 -lrt / Heap |
以上の結果をまとめると以下の通りで、さすがにARM系とは一桁違う速さを見せつけられました。
RC版ならではパッケージ一括更新
今回採用したOpenWRTは日々開発が進行しているRC版なので、インストールから数日経ただけで、更新が必要なパッケージがズラズラと現れます。
こんなときこそ、NanoPi R2Sの際に試した、一括更新ワンライナーの出番です。
1 2 3 4 5 6 7 |
# opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade Upgrading iwinfo on root from 2022-08-13-705d3b5c-1 to 2022-08-19-0dad3e66-1... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/iwinfo_2022-08-19-0dad3e66-1_x86_64.ipk Upgrading rpcd on root from 2022-02-07-909f2a04-1 to 2022-08-24-82904bd4-1... Downloading https://downloads.openwrt.org/releases/22.03.0-rc6/packages/x86_64/base/rpcd_2022-08-24-82904bd4-1_x86_64.ipk Upgrading libiwinfo-lua on root from 2022-08-13-705d3b5c-1 to 2022-08-19-0dad3e66-1... -略- |
今回の検証でも引き続きWiFiモジュールが鬼門でした。OpenWRTにおけるWiFi USBドングル比較の際、
相性の良かったMediaTek製のモジュールをいくつか手配したので、次回試してみます。