crypto加速器测试,硬件是BCM5823

OpenBSD的安装、升级、更新等日常问题。

版主: chenjun天地乾坤

回复
hyaska
铜 Cu
帖子: 311
注册时间: 2010-12-10 16:11

crypto加速器测试,硬件是BCM5823

帖子 hyaska » 2013-01-02 9:41

自从去年夏天买了新电脑折腾MAC OS,加上后来那块ATOM板坏了之后(8G MINI IDE SSD 现在也没有能用的地方啊),一直没有再搞OB。最近花70元淘了块 AM2的主板,东讨西要,再加上我以前没有用上的配件,终于拼凑了一台主机,以下是主角:
1、CPU及内存

代码: 全选

cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ ("AuthenticAMD" 686-class, 512KB L2 cache) 1.91 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,SSE3,CX16,LAHF,SVM
real mem  = 1006104576 (959MB)
avail mem = 978841600 (933MB)
2、加速卡

代码: 全选

ubsec0 at pci1 dev 8 function 0 "Broadcom 5823" rev 0x01: 3DES MD5 SHA1 AES RNG PK, apic 2 int 7
现在来做个测试对比
1、先看看当前SSL引擎

代码: 全选

# openssl engine
(dynamic) Dynamic engine loading support
2、没有激活硬件啊,补上

代码: 全选

# sysctl kern.usercrypto=1
kern.usercrypto: 0 -> 1
# openssl engine           
(cryptodev) BSD cryptodev engine
(dynamic) Dynamic engine loading support
3、简单测试一下用CPU是什么情况

代码: 全选

# openssl speed aes-256-cbc
Doing aes-256 cbc for 3s on 16 size blocks: 5271231 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 64 size blocks: 1404874 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 256 size blocks: 358395 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 1024 size blocks: 229585 aes-256 cbc's in 3.01s
Doing aes-256 cbc for 3s on 8192 size blocks: 28984 aes-256 cbc's in 3.01s
OpenSSL 1.0.0f 4 Jan 2012
built on: date not available
options:bn(64,32) rc4(4x,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256 cbc      28019.83k    29871.08k    30481.44k    78104.66k    78882.70k
这个时候,CPU的利用率是100%

4、用硬件加速的情况

代码: 全选

# openssl speed -evp aes-256-cbc 
Doing aes-256-cbc for 3s on 16 size blocks: 176739 aes-256-cbc's in 0.05s
Doing aes-256-cbc for 3s on 64 size blocks: 165720 aes-256-cbc's in 0.06s
Doing aes-256-cbc for 3s on 256 size blocks: 126129 aes-256-cbc's in 0.01s
Doing aes-256-cbc for 3s on 1024 size blocks: 62139 aes-256-cbc's in 0.02s
Doing aes-256-cbc for 3s on 8192 size blocks: 10995 aes-256-cbc's in 0.00s
OpenSSL 1.0.0f 4 Jan 2012
built on: date not available
options:bn(64,32) rc4(4x,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-256-cbc      56556.48k   176768.00k  3228902.40k  3181516.80k         infk
CPU利用率才2%,但是快了好几倍。

5、其它
唯一的缺点就是测试时,有时数值没有,像上面就是一个infK,这块卡是PCI64的卡,我现在是插在PCI32上,不知道是不是这个原因。


以后就是怎么应用了,请各位多给点案例及配置什么的,谢谢了。

头像
acheng
锌 Zn
帖子: 581
注册时间: 2011-07-07 21:52

回复: crypto加速器测试,硬件是BCM5823

帖子 acheng » 2013-01-05 17:28

加速效果还是很明显的。
加速器哪买的啊,淘宝上?

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 0 访客