OpenSSLベンチ: WNDR4300, EPSON NP11
OpenVPNサーバを立てようと省電力な箱を探していたところ、手元にあったNETGEAR WNDR4300とEPSON Endeavor NP11 が使えそうかな―と思いちょっと調べたのでメモ。
WNDR4300
WNDR4300はDD-WRTをぶち込めば、そのままOpenVPNもインストールされているのですぐ使える。
当然ながら普通の無線LANルータなので、AESで暗号化するにはCPUがちと非力すぎる。
DD-WRT Wiki: Netgear WNDR4300
root@DD-WRT:~# openssl speed bf aes Doing aes-128 cbc for 3s on 16 size blocks: 1456621 aes-128 cbc's in 2.99s Doing aes-128 cbc for 3s on 64 size blocks: 417504 aes-128 cbc's in 3.01s Doing aes-128 cbc for 3s on 256 size blocks: 108189 aes-128 cbc's in 2.99s Doing aes-128 cbc for 3s on 1024 size blocks: 27569 aes-128 cbc's in 3.01s Doing aes-128 cbc for 3s on 8192 size blocks: 3432 aes-128 cbc's in 2.99s Doing aes-192 cbc for 3s on 16 size blocks: 1301158 aes-192 cbc's in 3.01s Doing aes-192 cbc for 3s on 64 size blocks: 364490 aes-192 cbc's in 2.98s Doing aes-192 cbc for 3s on 256 size blocks: 94335 aes-192 cbc's in 2.98s Doing aes-192 cbc for 3s on 1024 size blocks: 24066 aes-192 cbc's in 3.01s Doing aes-192 cbc for 3s on 8192 size blocks: 2984 aes-192 cbc's in 2.99s Doing aes-256 cbc for 3s on 16 size blocks: 1174657 aes-256 cbc's in 3.01s Doing aes-256 cbc for 3s on 64 size blocks: 323806 aes-256 cbc's in 2.98s Doing aes-256 cbc for 3s on 256 size blocks: 83825 aes-256 cbc's in 2.95s Doing aes-256 cbc for 3s on 1024 size blocks: 21284 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 8192 size blocks: 2648 aes-256 cbc's in 2.96s Doing aes-512 cbc for 3s on 16 size blocks: 1067598 aes-512 cbc's in 2.99s Doing aes-512 cbc for 3s on 64 size blocks: 292645 aes-512 cbc's in 2.98s Doing aes-512 cbc for 3s on 256 size blocks: 75179 aes-512 cbc's in 2.97s Doing aes-512 cbc for 3s on 1024 size blocks: 19140 aes-512 cbc's in 2.99s Doing aes-512 cbc for 3s on 8192 size blocks: 2372 aes-512 cbc's in 2.95s Doing blowfish cbc for 3s on 16 size blocks: 2079773 blowfish cbc's in 3.00s Doing blowfish cbc for 3s on 64 size blocks: 547936 blowfish cbc's in 2.99s Doing blowfish cbc for 3s on 256 size blocks: 140209 blowfish cbc's in 2.97s Doing blowfish cbc for 3s on 1024 size blocks: 35550 blowfish cbc's in 2.99s Doing blowfish cbc for 3s on 8192 size blocks: 4204 blowfish cbc's in 2.86s OpenSSL 1.0.2k 26 Jan 2017 built on: reproducible build, date unspecified compiler: ccache ccache mips-linux-uclibc-gcc -I/home/seg/DEV/pb42/src/router/zlib -L/home/seg/DEV/pb42/src/router/zlib -I/home/seg/DEV/pb42/src/router/openssl/crypto -fPIC -I. -I.. -I../include -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Os -pipe -mips32r2 -mtune=34kc -msoft-float -fno-caller-saves -mno-branch-likely -DASMAES512 -ffunction-sections -fdata-sections -DOPENSSL_SMALL_FOOTPRINT -I/home/seg/DEV/pb42/src/router/zlib -DNDEBUG -DOPENSSL_NO_ERR -DTERMIO -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes blowfish cbc 11092.12k 11728.40k 12085.35k 12174.98k 12041.67k aes-128 cbc 7794.63k 8877.16k 9263.00k 9378.96k 9402.99k aes-192 cbc 6916.45k 7827.97k 8103.95k 8187.24k 8175.56k aes-256 cbc 6244.02k 6954.22k 7274.31k 7264.94k 7328.52k aes-512 cbc 5712.90k 6284.99k 6480.08k 6554.97k 6586.92k
root@DD-WRT:~# cat /proc/cpuinfo system type : Atheros AR9344 ver 1 rev 1.2 (0x2122) processor : 0 cpu model : MIPS 74Kc V4.12 BogoMIPS : 278.93 CPUClock : 560 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb] isa : mips1 mips2 mips32r1 mips32r2 ASEs implemented : mips16 shadow register sets : 1 kscratch registers : 0 package : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available
EEPSON NP11
CentOS 7をインストールしてテスト。WNDR4300と比較してAESは2.5倍ほどのスループット。 初期のAtomなのでかなり遅いし、AES-NIにも当然非対応。
$ openssl speed bf aes Doing aes-128 cbc for 3s on 16 size blocks: 3991912 aes-128 cbc's in 2.99s Doing aes-128 cbc for 3s on 64 size blocks: 1100147 aes-128 cbc's in 3.00s Doing aes-128 cbc for 3s on 256 size blocks: 284467 aes-128 cbc's in 3.00s Doing aes-128 cbc for 3s on 1024 size blocks: 71629 aes-128 cbc's in 3.00s Doing aes-128 cbc for 3s on 8192 size blocks: 8984 aes-128 cbc's in 3.00s Doing aes-192 cbc for 3s on 16 size blocks: 3362651 aes-192 cbc's in 3.00s Doing aes-192 cbc for 3s on 64 size blocks: 914259 aes-192 cbc's in 2.99s Doing aes-192 cbc for 3s on 256 size blocks: 237098 aes-192 cbc's in 3.00s Doing aes-192 cbc for 3s on 1024 size blocks: 59689 aes-192 cbc's in 3.00s Doing aes-192 cbc for 3s on 8192 size blocks: 7475 aes-192 cbc's in 3.00s Doing aes-256 cbc for 3s on 16 size blocks: 2931506 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 64 size blocks: 788130 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 256 size blocks: 201528 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 1024 size blocks: 50687 aes-256 cbc's in 3.00s Doing aes-256 cbc for 3s on 8192 size blocks: 6345 aes-256 cbc's in 3.00s Doing blowfish cbc for 3s on 16 size blocks: 6425744 blowfish cbc's in 3.00s Doing blowfish cbc for 3s on 64 size blocks: 1846948 blowfish cbc's in 3.00s Doing blowfish cbc for 3s on 256 size blocks: 478100 blowfish cbc's in 2.99s Doing blowfish cbc for 3s on 1024 size blocks: 120800 blowfish cbc's in 3.00s Doing blowfish cbc for 3s on 8192 size blocks: 15091 blowfish cbc's in 3.00s OpenSSL 1.0.1e-fips 11 Feb 2013 built on: Mon Feb 20 14:38:48 UTC 2017 options:bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes blowfish cbc 34270.63k 39401.56k 40934.31k 41233.07k 41208.49k aes-128 cbc 21361.40k 23469.80k 24274.52k 24449.37k 24532.31k aes-192 cbc 17934.14k 19569.42k 20232.36k 20373.85k 20411.73k aes-256 cbc 15634.70k 16813.44k 17197.06k 17301.16k 17326.08k
$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 28 model name : Intel(R) Atom(TM) CPU 230 @ 1.60GHz stepping : 2 microcode : 0x218 cpu MHz : 1599.544 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm bogomips : 3199.08 clflush size : 64 cache_alignment : 64 address sizes : 32 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 28 model name : Intel(R) Atom(TM) CPU 230 @ 1.60GHz stepping : 2 microcode : 0x218 cpu MHz : 1599.544 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm bogomips : 3199.08 clflush size : 64 cache_alignment : 64 address sizes : 32 bits physical, 48 bits virtual power management:
う〜ん、ギガビット回線で使うにはどちらも非力すぎてダメかなぁ。