命令
openssl speed -elapsed -evp aes-128-gcm
结果
kvm
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-gcm for 3s on 16 size blocks: 14437624 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 64 size blocks: 4532836 aes-128-gcm's in 3.01s
Doing aes-128-gcm for 3s on 256 size blocks: 1112765 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 1024 size blocks: 309334 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 8192 size blocks: 39058 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 16384 size blocks: 19514 aes-128-gcm's in 3.00s
OpenSSL 1.1.1d 10 Sep 2019
built on: Mon Apr 20 20:23:01 2020 UTC
options:bn(64,64) rc4(8x,char) des(int) aes(partial) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-8Ocme2/openssl-1.1.1d=. -fstack-protector-strong -Wformat -Werror=format-security -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 -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-gcm 77000.66k 96379.24k 94955.95k 105586.01k 106654.38k 106572.46k
host
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128-gcm for 3s on 16 size blocks: 24164323 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 64 size blocks: 7980988 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 256 size blocks: 2270894 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 1024 size blocks: 543897 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 8192 size blocks: 72932 aes-128-gcm's in 3.00s
Doing aes-128-gcm for 3s on 16384 size blocks: 37819 aes-128-gcm's in 3.00s
OpenSSL 1.1.1d 10 Sep 2019
built on: Mon Apr 20 20:23:01 2020 UTC
options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-8Ocme2/openssl-1.1.1d=. -fstack-protector-strong -Wformat -Werror=format-security -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 -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-128-gcm 128876.39k 170261.08k 193782.95k 185650.18k 199152.98k 206542.17k
结论
host比kvm高近一倍