Thread: [Ocf-linux-users] No performances improvment with AMD Geode
Brought to you by:
david-m
|
From: Adam C. (Le_Vert) <ga...@le...> - 2008-06-02 15:25:29
|
Hello, Could you please help me to figure out what's wrong with my OCF setup ? Here are some useful commands run on the Geode: Loaded kernel modules: gandalf@alix:~$ lsmod | grep -e cry -e oc cryptodev 13988 3 crypto_null 2624 0 cryptosoft 12136 0 ocf 28984 2 cryptodev,cryptosoft Device node: gandalf@alix:~$ ls -lah /dev/crypto crw-rw-rw- 1 root root 10, 70 jun 2 17:11 /dev/crypto OpenSSL engines: gandalf@alix:~$ openssl engine (cryptodev) BSD cryptodev engine (padlock) VIA PadLock (no-RNG, no-ACE) (dynamic) Dynamic engine loading support Speed (without cryptodev): gandalf@alix:~$ openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 270767 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 183585 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 84286 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 25353 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 13786 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon Jun 2 14:52:51 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 1444.09k 3916.48k 7192.41k 8653.82k 9408.11k Speed (with cryptodev): gandalf@alix:~$ openssl speed -evp aes128 -elapsed -engine cryptodev engine "cryptodev" set. You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 270840 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 188479 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 84691 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 26627 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 13889 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon Jun 2 14:52:51 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 1444.48k 4020.89k 7226.97k 9088.68k 9481.56k Thanks in advance for your help. Best regards, Adam. |
|
From: Daniel M. <da...@da...> - 2008-06-02 17:05:40
|
On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: I do not own a AMD Geode but.. > Loaded kernel modules: > gandalf@alix:~$ lsmod | grep -e cry -e oc > cryptodev 13988 3 > crypto_null 2624 0 > cryptosoft 12136 0 > ocf 28984 2 cryptodev,cryptosoft .. you need to load the geode-aes module as well. You can find it in your kernel configuration. Cryptographic API ---> [*] Hardware crypto devices ---> <M> Support for the Geode LX AES engine Try to load the modules in the following order: geode-aes.ko ocf.ko cryptosoft.ko cryptodev.ko bye, danm -- Daniel Mueller http://www.danm.de Berlin, Germany OpenPGP: F9F982C1 |
|
From: Adam C. (Le_Vert) <ga...@le...> - 2008-06-02 19:45:22
|
Daniel Mueller a écrit : > On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: > > I do not own a AMD Geode but.. > > >> Loaded kernel modules: >> gandalf@alix:~$ lsmod | grep -e cry -e oc >> cryptodev 13988 3 >> crypto_null 2624 0 >> cryptosoft 12136 0 >> ocf 28984 2 cryptodev,cryptosoft >> > > .. you need to load the geode-aes module as well. You can find it in > your kernel configuration. > > Cryptographic API ---> > [*] Hardware crypto devices ---> > <M> Support for the Geode LX AES engine > > Try to load the modules in the following order: > geode-aes.ko > ocf.ko > cryptosoft.ko > cryptodev.ko > > bye, > danm > > gandalf@alix:~$ cat /etc/modules # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Geode WatchDog geodewdt # Geode LX AES hardware crypto geode-aes geode-rng ocf cryptosoft cryptodev # Alix LEDs driver leds-alix # Sensors lm90 It's already loaded. Any other idea ? ;) |
|
From: Daniel M. <da...@da...> - 2008-06-02 21:57:25
|
On Mon, 02 Jun 2008 21:45:15 +0200 Adam Cécile wrote: > It's already loaded. Any other idea ? ;) In this case no, sorry. bye, danm -- Daniel Mueller http://www.danm.de Berlin, Germany OpenPGP: F9F982C1 |
|
From: David M. <Dav...@se...> - 2008-06-02 23:18:52
|
Jivin "Adam Cécile (Le_Vert)" lays it down ... > Hello, > > Could you please help me to figure out what's wrong with my OCF setup ? > Here are some useful commands run on the Geode: > > Loaded kernel modules: > gandalf@alix:~$ lsmod | grep -e cry -e oc > cryptodev 13988 3 > crypto_null 2624 0 > cryptosoft 12136 0 > ocf 28984 2 cryptodev,cryptosoft > > Device node: > gandalf@alix:~$ ls -lah /dev/crypto > crw-rw-rw- 1 root root 10, 70 jun 2 17:11 /dev/crypto > > OpenSSL engines: > gandalf@alix:~$ openssl engine > (cryptodev) BSD cryptodev engine > (padlock) VIA PadLock (no-RNG, no-ACE) > (dynamic) Dynamic engine loading support > > Speed (without cryptodev): > gandalf@alix:~$ openssl speed -evp aes128 -elapsed > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 270767 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 183585 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 84286 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 25353 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 13786 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Mon Jun 2 14:52:51 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 1444.09k 3916.48k 7192.41k 8653.82k > 9408.11k > > Speed (with cryptodev): > gandalf@alix:~$ openssl speed -evp aes128 -elapsed -engine cryptodev > engine "cryptodev" set. > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 270840 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 188479 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 84691 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 26627 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 13889 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Mon Jun 2 14:52:51 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 1444.48k 4020.89k 7226.97k 9088.68k > 9481.56k So obviously openssl is not using OCF :-) If it was it would be slower for smaller operations and faster for large operations. No sure if you have told me before, but, have you patched openssl ? Which version of OCF did you use ? Make sure you are using the latest openssl patches. The current openssl patches will use cryptodev by default if it supports the alg you are using. I don't have a geode handy, but I just tried it on a VIA board (padlock aes) and it is working ok there, see below for an idea on output. Cheers, Davidm # rmmod cryptosoft # # openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 2400255 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 678551 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 175440 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 44201 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 22141 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon May 19 14:42:05 EST 2008 options:bn(64,32) rc4(ptr,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: ucfront-gcc i386-linux-20070808-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DHAVE_CRYPTODEV -DOPENSSL_NO_ERR -DOPENSSL_NO_HW -O1 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DCONFIG_SNAPGEAR -DEMBED available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 12801.36k 14461.29k 14955.92k 15067.19k 15094.80k # # # modprobe cryptosoft # # # openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 1244481 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 1202468 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 1063384 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 740477 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 524824 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon May 19 14:42:05 EST 2008 options:bn(64,32) rc4(ptr,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: ucfront-gcc i386-linux-20070808-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DHAVE_CRYPTODEV -DOPENSSL_NO_ERR -DOPENSSL_NO_HW -O1 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DCONFIG_SNAPGEAR -DEMBED available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 6635.02k 25627.02k 90651.45k 252496.99k 357921.93k # -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |
|
From: David M. <Dav...@se...> - 2008-06-02 23:19:49
|
Jivin "Adam Cécile (Le_Vert)" lays it down ... > Daniel Mueller a écrit : > > On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: > > > > I do not own a AMD Geode but.. > > > > > >> Loaded kernel modules: > >> gandalf@alix:~$ lsmod | grep -e cry -e oc > >> cryptodev 13988 3 > >> crypto_null 2624 0 > >> cryptosoft 12136 0 > >> ocf 28984 2 cryptodev,cryptosoft > >> > > > > .. you need to load the geode-aes module as well. You can find it in > > your kernel configuration. > > > > Cryptographic API ---> > > [*] Hardware crypto devices ---> > > <M> Support for the Geode LX AES engine > > > > Try to load the modules in the following order: > > geode-aes.ko > > ocf.ko > > cryptosoft.ko > > cryptodev.ko > > > > bye, > > danm > > > > > gandalf@alix:~$ cat /etc/modules > # /etc/modules: kernel modules to load at boot time. > # > # This file contains the names of kernel modules that should be loaded > # at boot time, one per line. Lines beginning with "#" are ignored. > > # Geode WatchDog > geodewdt > > # Geode LX AES hardware crypto > geode-aes > geode-rng > ocf > cryptosoft > cryptodev > > # Alix LEDs driver > leds-alix > > # Sensors > lm90 > > It's already loaded. Any other idea ? ;) Did you check that with a "lsmod" to be sure ? Thanks, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |
|
From: Adam C. (Le_Vert) <ga...@le...> - 2008-07-09 18:00:53
|
David McCullough a écrit : > Jivin "Adam Cécile (Le_Vert)" lays it down ... > >> Daniel Mueller a écrit : >> >>> On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: >>> >>> I do not own a AMD Geode but.. >>> >>> >>> >>>> Loaded kernel modules: >>>> gandalf@alix:~$ lsmod | grep -e cry -e oc >>>> cryptodev 13988 3 >>>> crypto_null 2624 0 >>>> cryptosoft 12136 0 >>>> ocf 28984 2 cryptodev,cryptosoft >>>> >>>> >>> .. you need to load the geode-aes module as well. You can find it in >>> your kernel configuration. >>> >>> Cryptographic API ---> >>> [*] Hardware crypto devices ---> >>> <M> Support for the Geode LX AES engine >>> >>> Try to load the modules in the following order: >>> geode-aes.ko >>> ocf.ko >>> cryptosoft.ko >>> cryptodev.ko >>> >>> bye, >>> danm >>> >>> >>> >> gandalf@alix:~$ cat /etc/modules >> # /etc/modules: kernel modules to load at boot time. >> # >> # This file contains the names of kernel modules that should be loaded >> # at boot time, one per line. Lines beginning with "#" are ignored. >> >> # Geode WatchDog >> geodewdt >> >> # Geode LX AES hardware crypto >> geode-aes >> geode-rng >> ocf >> cryptosoft >> cryptodev >> >> # Alix LEDs driver >> leds-alix >> >> # Sensors >> lm90 >> >> It's already loaded. Any other idea ? ;) >> > > Did you check that with a "lsmod" to be sure ? > > Thanks, > Davidm > > Hello, I've updated to debian's kernel 2.6.25-3-686 + latest ocf patch and I still don't see any performance improvement. gandalf@wrap:~$ lsmod | grep -e cry -e oc cryptodev 13572 3 crypto_null 3392 0 cryptosoft 11624 0 ocf 29176 2 cryptodev,cryptosoft crypto_blkcipher 18564 4 crypto_null,ecb,cbc,geode_aes dock 10320 1 libata gandalf@wrap:~$ ls -lah /dev/crypto crw-rw-rw- 1 root root 10, 70 Jan 1 2000 /dev/crypto gandalf@wrap:~$ openssl engine (cryptodev) BSD cryptodev engine (padlock) VIA PadLock (no-RNG, no-ACE) (dynamic) Dynamic engine loading support gandalf@wrap:~$ openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 123525 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 119105 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 103091 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 68212 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 46401 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon Jun 2 14:52:51 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 658.80k 2540.91k 8797.10k 23283.03k 31676.42k gandalf@wrap:~$ openssl speed -evp aes128 -elapsed -engine cryptodev engine "cryptodev" set. You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 123212 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 119413 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 103493 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 67906 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 46018 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Mon Jun 2 14:52:51 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 657.13k 2546.63k 8831.40k 23178.58k 31414.95k Only OpenSSL hasn't been rebuilt with latest OCF patch but I'll do asap. Any pointers would be greatly appreciated (maybe my bench commands are just wrong ?). Regards, Adam. |
|
From: David M. <Dav...@se...> - 2008-07-09 23:37:33
|
Jivin "Adam Cécile (Le_Vert)" lays it down ... > David McCullough a écrit : > > Jivin "Adam Cécile (Le_Vert)" lays it down ... > > > >> Daniel Mueller a écrit : > >> > >>> On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: > >>> > >>> I do not own a AMD Geode but.. > >>> > >>> > >>> > >>>> Loaded kernel modules: > >>>> gandalf@alix:~$ lsmod | grep -e cry -e oc > >>>> cryptodev 13988 3 > >>>> crypto_null 2624 0 > >>>> cryptosoft 12136 0 > >>>> ocf 28984 2 cryptodev,cryptosoft > >>>> > >>>> > >>> .. you need to load the geode-aes module as well. You can find it in > >>> your kernel configuration. > >>> > >>> Cryptographic API ---> > >>> [*] Hardware crypto devices ---> > >>> <M> Support for the Geode LX AES engine > >>> > >>> Try to load the modules in the following order: > >>> geode-aes.ko > >>> ocf.ko > >>> cryptosoft.ko > >>> cryptodev.ko > >>> > >>> bye, > >>> danm > >>> > >>> > >>> > >> gandalf@alix:~$ cat /etc/modules > >> # /etc/modules: kernel modules to load at boot time. > >> # > >> # This file contains the names of kernel modules that should be loaded > >> # at boot time, one per line. Lines beginning with "#" are ignored. > >> > >> # Geode WatchDog > >> geodewdt > >> > >> # Geode LX AES hardware crypto > >> geode-aes > >> geode-rng > >> ocf > >> cryptosoft > >> cryptodev > >> > >> # Alix LEDs driver > >> leds-alix > >> > >> # Sensors > >> lm90 > >> > >> It's already loaded. Any other idea ? ;) > >> > > > > Did you check that with a "lsmod" to be sure ? > > > > Thanks, > > Davidm > > > > > Hello, > > I've updated to debian's kernel 2.6.25-3-686 + latest ocf patch and I > still don't see any performance improvement. Have a look for emails by "Andreas Steinel" just recently , he seems to have got it working, might be some clues. More below. > gandalf@wrap:~$ lsmod | grep -e cry -e oc > cryptodev 13572 3 > crypto_null 3392 0 > cryptosoft 11624 0 > ocf 29176 2 cryptodev,cryptosoft > crypto_blkcipher 18564 4 crypto_null,ecb,cbc,geode_aes > dock 10320 1 libata Make sure you load crypto_blkcipher before you load ocf. > gandalf@wrap:~$ ls -lah /dev/crypto > crw-rw-rw- 1 root root 10, 70 Jan 1 2000 /dev/crypto > > gandalf@wrap:~$ openssl engine > (cryptodev) BSD cryptodev engine > (padlock) VIA PadLock (no-RNG, no-ACE) > (dynamic) Dynamic engine loading support > > gandalf@wrap:~$ openssl speed -evp aes128 -elapsed > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 123525 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 119105 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 103091 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 68212 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 46401 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Mon Jun 2 14:52:51 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 658.80k 2540.91k 8797.10k 23283.03k > 31676.42k Ok, this looks like you are using OCF for crypto, it is easy to tell because the small packets do not get the same total throughput as the large packets. If you "rmmod cryptodev" then run the test again it should confirm this. > gandalf@wrap:~$ openssl speed -evp aes128 -elapsed -engine cryptodev > engine "cryptodev" set. > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 123212 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 119413 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 103493 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 67906 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 46018 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Mon Jun 2 14:52:51 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 657.13k 2546.63k 8831.40k 23178.58k > 31414.95k These numbers at the same as above. The reason for that is openssl will use ocf by default if it is enabled. The best way to check is to remove the cryptodev driver and see what the performance is. Either way, you are getting 31414.95k bytes of AES throughput. Thats around 250Mbits/s using 2k packets. Are you sure that is not fast enough ? Check your numbers with cryptodev unloaded to know for sure. > Only OpenSSL hasn't been rebuilt with latest OCF patch but I'll do asap. > Any pointers would be greatly appreciated (maybe my bench commands are > just wrong ?). No need to do that, the patch hasn't changed since the last release (at least I don't recall any changes ;-) Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |
|
From: Adam C. (Le_Vert) <ga...@le...> - 2008-07-10 07:46:56
|
David McCullough a écrit : > Jivin "Adam Cécile (Le_Vert)" lays it down ... > >> David McCullough a écrit : >> >>> Jivin "Adam Cécile (Le_Vert)" lays it down ... >>> >>> >>>> Daniel Mueller a écrit : >>>> >>>> >>>>> On Mon, 02 Jun 2008 17:25:23 +0200 Adam Cécile wrote: >>>>> >>>>> I do not own a AMD Geode but.. >>>>> >>>>> >>>>> >>>>> >>>>>> Loaded kernel modules: >>>>>> gandalf@alix:~$ lsmod | grep -e cry -e oc >>>>>> cryptodev 13988 3 >>>>>> crypto_null 2624 0 >>>>>> cryptosoft 12136 0 >>>>>> ocf 28984 2 cryptodev,cryptosoft >>>>>> >>>>>> >>>>>> >>>>> .. you need to load the geode-aes module as well. You can find it in >>>>> your kernel configuration. >>>>> >>>>> Cryptographic API ---> >>>>> [*] Hardware crypto devices ---> >>>>> <M> Support for the Geode LX AES engine >>>>> >>>>> Try to load the modules in the following order: >>>>> geode-aes.ko >>>>> ocf.ko >>>>> cryptosoft.ko >>>>> cryptodev.ko >>>>> >>>>> bye, >>>>> danm >>>>> >>>>> >>>>> >>>>> >>>> gandalf@alix:~$ cat /etc/modules >>>> # /etc/modules: kernel modules to load at boot time. >>>> # >>>> # This file contains the names of kernel modules that should be loaded >>>> # at boot time, one per line. Lines beginning with "#" are ignored. >>>> >>>> # Geode WatchDog >>>> geodewdt >>>> >>>> # Geode LX AES hardware crypto >>>> geode-aes >>>> geode-rng >>>> ocf >>>> cryptosoft >>>> cryptodev >>>> >>>> # Alix LEDs driver >>>> leds-alix >>>> >>>> # Sensors >>>> lm90 >>>> >>>> It's already loaded. Any other idea ? ;) >>>> >>>> >>> Did you check that with a "lsmod" to be sure ? >>> >>> Thanks, >>> Davidm >>> >>> >>> >> Hello, >> >> I've updated to debian's kernel 2.6.25-3-686 + latest ocf patch and I >> still don't see any performance improvement. >> > > > Have a look for emails by "Andreas Steinel" just recently , he seems to > have got it working, might be some clues. > More below. > > > >> gandalf@wrap:~$ lsmod | grep -e cry -e oc >> cryptodev 13572 3 >> crypto_null 3392 0 >> cryptosoft 11624 0 >> ocf 29176 2 cryptodev,cryptosoft >> crypto_blkcipher 18564 4 crypto_null,ecb,cbc,geode_aes >> dock 10320 1 libata >> > > Make sure you load crypto_blkcipher before you load ocf. > > >> gandalf@wrap:~$ ls -lah /dev/crypto >> crw-rw-rw- 1 root root 10, 70 Jan 1 2000 /dev/crypto >> >> gandalf@wrap:~$ openssl engine >> (cryptodev) BSD cryptodev engine >> (padlock) VIA PadLock (no-RNG, no-ACE) >> (dynamic) Dynamic engine loading support >> >> gandalf@wrap:~$ openssl speed -evp aes128 -elapsed >> You have chosen to measure elapsed time instead of user CPU time. >> To get the most accurate results, try to run this >> program when this computer is idle. >> Doing aes-128-cbc for 3s on 16 size blocks: 123525 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 64 size blocks: 119105 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 256 size blocks: 103091 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 1024 size blocks: 68212 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 2048 size blocks: 46401 aes-128-cbc's in 3.00s >> OpenSSL 0.9.8g 19 Oct 2007 >> built on: Mon Jun 2 14:52:51 UTC 2008 >> options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> aes(partial) blowfish(idx) >> compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> available timing options: TIMES TIMEB HZ=100 [sysconf value] >> timing function used: ftime >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> bytes >> aes-128-cbc 658.80k 2540.91k 8797.10k 23283.03k >> 31676.42k >> > > > Ok, this looks like you are using OCF for crypto, it is easy to tell > because the small packets do not get the same total throughput as the > large packets. > > If you "rmmod cryptodev" then run the test again it should confirm this. > > > >> gandalf@wrap:~$ openssl speed -evp aes128 -elapsed -engine cryptodev >> engine "cryptodev" set. >> You have chosen to measure elapsed time instead of user CPU time. >> To get the most accurate results, try to run this >> program when this computer is idle. >> Doing aes-128-cbc for 3s on 16 size blocks: 123212 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 64 size blocks: 119413 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 256 size blocks: 103493 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 1024 size blocks: 67906 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 2048 size blocks: 46018 aes-128-cbc's in 3.00s >> OpenSSL 0.9.8g 19 Oct 2007 >> built on: Mon Jun 2 14:52:51 UTC 2008 >> options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> aes(partial) blowfish(idx) >> compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> available timing options: TIMES TIMEB HZ=100 [sysconf value] >> timing function used: ftime >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> bytes >> aes-128-cbc 657.13k 2546.63k 8831.40k 23178.58k >> 31414.95k >> > > These numbers at the same as above. The reason for that is openssl will > use ocf by default if it is enabled. The best way to check is to remove > the cryptodev driver and see what the performance is. > > Either way, you are getting 31414.95k bytes of AES throughput. Thats > around 250Mbits/s using 2k packets. Are you sure that is not fast enough ? > > Check your numbers with cryptodev unloaded to know for sure. > > >> Only OpenSSL hasn't been rebuilt with latest OCF patch but I'll do asap. >> Any pointers would be greatly appreciated (maybe my bench commands are >> just wrong ?). >> > > No need to do that, the patch hasn't changed since the last release (at > least I don't recall any changes ;-) > > Cheers, > Davidm > > gandalf@wrap:~$ cat /etc/modules # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Geode WatchDog geodewdt # Geode LX AES hardware crypto geode-aes geode-rng crypto_blkcipher ocf cryptosoft cryptodev # Alix LEDs driver leds-alix # Sensors lm90 wrap:/home/gandalf# openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 104083 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 101925 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 89677 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 61529 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 42862 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Wed Jul 9 18:31:21 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 555.11k 2173.68k 7652.44k 21001.90k 29260.46k wrap:/home/gandalf# lsmod | grep cry crypto_blkcipher 18564 1 geode_aes wrap:/home/gandalf# lsmod | grep ocf wrap:/home/gandalf# openssl speed -evp aes128 -elapsed You have chosen to measure elapsed time instead of user CPU time. To get the most accurate results, try to run this program when this computer is idle. Doing aes-128-cbc for 3s on 16 size blocks: 895899 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 324390 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 92243 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 23823 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 2048 size blocks: 11998 aes-128-cbc's in 3.00s OpenSSL 0.9.8g 19 Oct 2007 built on: Wed Jul 9 18:31:21 UTC 2008 options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM available timing options: TIMES TIMEB HZ=100 [sysconf value] timing function used: ftime The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 4778.13k 6920.32k 7871.40k 8131.58k 8190.63k Okay there's performance difference when I unload all ocf/cryptodev kernel modules. But are you sure it comes from hardware ? It may just come from the fact that ocf software perform better than the standard linux crypto stack. What's your mind about this ? Thanks in advance, Regards, Adam. |
|
From: David M. <Dav...@se...> - 2008-07-10 10:33:21
|
Jivin "Adam Cécile (Le_Vert)" lays it down ... ... > gandalf@wrap:~$ cat /etc/modules > # /etc/modules: kernel modules to load at boot time. > # > # This file contains the names of kernel modules that should be loaded > # at boot time, one per line. Lines beginning with "#" are ignored. > > # Geode WatchDog > geodewdt > > # Geode LX AES hardware crypto > geode-aes > geode-rng > crypto_blkcipher > ocf > cryptosoft > cryptodev > > # Alix LEDs driver > leds-alix > > # Sensors > lm90 > > wrap:/home/gandalf# openssl speed -evp aes128 -elapsed > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 104083 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 101925 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 89677 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 61529 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 42862 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Wed Jul 9 18:31:21 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 555.11k 2173.68k 7652.44k 21001.90k > 29260.46k > > wrap:/home/gandalf# lsmod | grep cry > crypto_blkcipher 18564 1 geode_aes > wrap:/home/gandalf# lsmod | grep ocf > wrap:/home/gandalf# openssl speed -evp aes128 -elapsed > You have chosen to measure elapsed time instead of user CPU time. > To get the most accurate results, try to run this > program when this computer is idle. > Doing aes-128-cbc for 3s on 16 size blocks: 895899 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 64 size blocks: 324390 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 256 size blocks: 92243 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 1024 size blocks: 23823 aes-128-cbc's in 3.00s > Doing aes-128-cbc for 3s on 2048 size blocks: 11998 aes-128-cbc's in 3.00s > OpenSSL 0.9.8g 19 Oct 2007 > built on: Wed Jul 9 18:31:21 UTC 2008 > options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > aes(partial) blowfish(idx) > compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > available timing options: TIMES TIMEB HZ=100 [sysconf value] > timing function used: ftime > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > bytes > aes-128-cbc 4778.13k 6920.32k 7871.40k 8131.58k > 8190.63k > > Okay there's performance difference when I unload all ocf/cryptodev > kernel modules. But are you sure it comes from hardware ? It may just > come from the fact that ocf software perform better than the standard > linux crypto stack. What's your mind about this ? If ocf is using software crypto it can never (on a single crypto stream) go faster than openssl (or kernel crypto) without ocf. It's just not possible since they are all using basically the same crypto code on the same speed CPU. So yes, I am sure you are doing HW crypto using OCF+cryptosoft and geode. It would go even faster if you ran it from in the kernel. This is what the ocf-bench driver does if you are interested: modprobe ocf-bench dmesg Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |
|
From: Adam C. (Le_Vert) <ga...@le...> - 2008-07-10 16:20:27
|
David McCullough a écrit : > Jivin "Adam Cécile (Le_Vert)" lays it down ... > ... > >> gandalf@wrap:~$ cat /etc/modules >> # /etc/modules: kernel modules to load at boot time. >> # >> # This file contains the names of kernel modules that should be loaded >> # at boot time, one per line. Lines beginning with "#" are ignored. >> >> # Geode WatchDog >> geodewdt >> >> # Geode LX AES hardware crypto >> geode-aes >> geode-rng >> crypto_blkcipher >> ocf >> cryptosoft >> cryptodev >> >> # Alix LEDs driver >> leds-alix >> >> # Sensors >> lm90 >> >> wrap:/home/gandalf# openssl speed -evp aes128 -elapsed >> You have chosen to measure elapsed time instead of user CPU time. >> To get the most accurate results, try to run this >> program when this computer is idle. >> Doing aes-128-cbc for 3s on 16 size blocks: 104083 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 64 size blocks: 101925 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 256 size blocks: 89677 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 1024 size blocks: 61529 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 2048 size blocks: 42862 aes-128-cbc's in 3.00s >> OpenSSL 0.9.8g 19 Oct 2007 >> built on: Wed Jul 9 18:31:21 UTC 2008 >> options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> aes(partial) blowfish(idx) >> compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> available timing options: TIMES TIMEB HZ=100 [sysconf value] >> timing function used: ftime >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> bytes >> aes-128-cbc 555.11k 2173.68k 7652.44k 21001.90k >> 29260.46k >> >> wrap:/home/gandalf# lsmod | grep cry >> crypto_blkcipher 18564 1 geode_aes >> wrap:/home/gandalf# lsmod | grep ocf >> wrap:/home/gandalf# openssl speed -evp aes128 -elapsed >> You have chosen to measure elapsed time instead of user CPU time. >> To get the most accurate results, try to run this >> program when this computer is idle. >> Doing aes-128-cbc for 3s on 16 size blocks: 895899 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 64 size blocks: 324390 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 256 size blocks: 92243 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 1024 size blocks: 23823 aes-128-cbc's in 3.00s >> Doing aes-128-cbc for 3s on 2048 size blocks: 11998 aes-128-cbc's in 3.00s >> OpenSSL 0.9.8g 19 Oct 2007 >> built on: Wed Jul 9 18:31:21 UTC 2008 >> options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> aes(partial) blowfish(idx) >> compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> -march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> available timing options: TIMES TIMEB HZ=100 [sysconf value] >> timing function used: ftime >> The 'numbers' are in 1000s of bytes per second processed. >> type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> bytes >> aes-128-cbc 4778.13k 6920.32k 7871.40k 8131.58k >> 8190.63k >> >> Okay there's performance difference when I unload all ocf/cryptodev >> kernel modules. But are you sure it comes from hardware ? It may just >> come from the fact that ocf software perform better than the standard >> linux crypto stack. What's your mind about this ? >> > > If ocf is using software crypto it can never (on a single crypto stream) > go faster than openssl (or kernel crypto) without ocf. It's just not > possible since they are all using basically the same crypto code on the > same speed CPU. > > So yes, I am sure you are doing HW crypto using OCF+cryptosoft and geode. > > It would go even faster if you ran it from in the kernel. This is what > the ocf-bench driver does if you are interested: > > modprobe ocf-bench > dmesg > > Cheers, > Davidm > Hello, I've just rebuild my kernel with ocf-bench. Here is what happens: gandalf@wrap:~$ sudo modprobe ocf-bench [sudo] password for root: FATAL: Error inserting ocf_bench (/lib/modules/2.6.25-2-alix/kernel/crypto/ocf/o cf-bench.ko): Invalid argument gandalf@wrap:~$ dmesg | tail [ 44.840932] wan: no IPv6 routers present [ 61.510480] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 66.773388] warning: `named' uses 32-bit capabilities (legacy support in use) [ 74.301323] tun: Universal TUN/TAP device driver, 1.6 [ 74.301346] tun: (C) 1999-2004 Max Krasnyansky <ma...@qu...> [ 74.307817] tun0: Disabled Privacy Extensions [ 82.660103] wlan: no IPv6 routers present [ 132.637766] Crypto Speed tests [ 132.637766] OCF: testing ... [ 133.811467] OCF: 1044 requests of 1500 bytes in 294 jiffies gandalf@wrap:~$ Seems the module fails to load. Known issue? Regards, Adam. |
|
From: David M. <Dav...@se...> - 2008-07-10 22:47:24
|
Jivin "Adam Cécile (Le_Vert)" lays it down ... > David McCullough a écrit : > >Jivin "Adam Cécile (Le_Vert)" lays it down ... > >... > > > >>gandalf@wrap:~$ cat /etc/modules > >># /etc/modules: kernel modules to load at boot time. > >># > >># This file contains the names of kernel modules that should be loaded > >># at boot time, one per line. Lines beginning with "#" are ignored. > >> > >># Geode WatchDog > >>geodewdt > >> > >># Geode LX AES hardware crypto > >>geode-aes > >>geode-rng > >>crypto_blkcipher > >>ocf > >>cryptosoft > >>cryptodev > >> > >># Alix LEDs driver > >>leds-alix > >> > >># Sensors > >>lm90 > >> > >>wrap:/home/gandalf# openssl speed -evp aes128 -elapsed > >>You have chosen to measure elapsed time instead of user CPU time. > >>To get the most accurate results, try to run this > >>program when this computer is idle. > >>Doing aes-128-cbc for 3s on 16 size blocks: 104083 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 64 size blocks: 101925 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 256 size blocks: 89677 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 1024 size blocks: 61529 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 2048 size blocks: 42862 aes-128-cbc's in 3.00s > >>OpenSSL 0.9.8g 19 Oct 2007 > >>built on: Wed Jul 9 18:31:21 UTC 2008 > >>options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > >>aes(partial) blowfish(idx) > >>compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > >>-DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > >>-march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > >>-DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > >>available timing options: TIMES TIMEB HZ=100 [sysconf value] > >>timing function used: ftime > >>The 'numbers' are in 1000s of bytes per second processed. > >>type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > >>bytes > >>aes-128-cbc 555.11k 2173.68k 7652.44k 21001.90k > >>29260.46k > >> > >>wrap:/home/gandalf# lsmod | grep cry > >>crypto_blkcipher 18564 1 geode_aes > >>wrap:/home/gandalf# lsmod | grep ocf > >>wrap:/home/gandalf# openssl speed -evp aes128 -elapsed > >>You have chosen to measure elapsed time instead of user CPU time. > >>To get the most accurate results, try to run this > >>program when this computer is idle. > >>Doing aes-128-cbc for 3s on 16 size blocks: 895899 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 64 size blocks: 324390 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 256 size blocks: 92243 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 1024 size blocks: 23823 aes-128-cbc's in 3.00s > >>Doing aes-128-cbc for 3s on 2048 size blocks: 11998 aes-128-cbc's in 3.00s > >>OpenSSL 0.9.8g 19 Oct 2007 > >>built on: Wed Jul 9 18:31:21 UTC 2008 > >>options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) > >>aes(partial) blowfish(idx) > >>compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT > >>-DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 > >>-march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS > >>-DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM > >>available timing options: TIMES TIMEB HZ=100 [sysconf value] > >>timing function used: ftime > >>The 'numbers' are in 1000s of bytes per second processed. > >>type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 > >>bytes > >>aes-128-cbc 4778.13k 6920.32k 7871.40k 8131.58k > >>8190.63k > >> > >>Okay there's performance difference when I unload all ocf/cryptodev > >>kernel modules. But are you sure it comes from hardware ? It may just > >>come from the fact that ocf software perform better than the standard > >>linux crypto stack. What's your mind about this ? > >> > > > >If ocf is using software crypto it can never (on a single crypto stream) > >go faster than openssl (or kernel crypto) without ocf. It's just not > >possible since they are all using basically the same crypto code on the > >same speed CPU. > > > >So yes, I am sure you are doing HW crypto using OCF+cryptosoft and geode. > > > >It would go even faster if you ran it from in the kernel. This is what > >the ocf-bench driver does if you are interested: > > > > modprobe ocf-bench > > dmesg > > > >Cheers, > >Davidm > > > Hello, > > I've just rebuild my kernel with ocf-bench. Here is what happens: > gandalf@wrap:~$ sudo modprobe ocf-bench > [sudo] password for root: > FATAL: Error inserting ocf_bench > (/lib/modules/2.6.25-2-alix/kernel/crypto/ocf/o > cf-bench.ko): Invalid argument > gandalf@wrap:~$ dmesg | tail > [ 44.840932] wan: no IPv6 routers present > [ 61.510480] ip6_tables: (C) 2000-2006 Netfilter Core Team > [ 66.773388] warning: `named' uses 32-bit capabilities (legacy support > in use) > [ 74.301323] tun: Universal TUN/TAP device driver, 1.6 > [ 74.301346] tun: (C) 1999-2004 Max Krasnyansky <ma...@qu...> > [ 74.307817] tun0: Disabled Privacy Extensions > [ 82.660103] wlan: no IPv6 routers present > [ 132.637766] Crypto Speed tests > [ 132.637766] OCF: testing ... > [ 133.811467] OCF: 1044 requests of 1500 bytes in 294 jiffies > gandalf@wrap:~$ > > Seems the module fails to load. Known issue? No, it fails to load by design, but you can see there that is printed out a performance number. You will need to find out you jiffies and multiply that out to see the performance. By default ocf-bench tests sha1/3des, you will need to modify the source to try out AES or something else. I know it's a complete hack, but it is useful if you want raw kenerl performance. Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |
|
From: Andreas S. <a.s...@go...> - 2008-07-11 11:23:14
|
Hi, we saw the following improvement of AES: # openssl engine (dynamic) Dynamic engine loading support # openssl speed -evp aes-128-cbc -engine dynamic type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 7091.41k 10286.25k 11557.60k 12058.76k 12157.67k changed to # openssl engine (cryptodev) BSD cryptodev engine (padlock) VIA PadLock (no-RNG, no-ACE) (dynamic) Dynamic engine loading support # openssl speed -evp aes-128-cbc type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 bytes aes-128-cbc 65098.13k 92264.00k 410205.87k 5833523.20k 7599923.20k If you have further questions, don't hesitate to ask me. Best, Andreas On Fri, Jul 11, 2008 at 12:47 AM, David McCullough <Dav...@se...> wrote: > > Jivin "Adam Cécile (Le_Vert)" lays it down ... >> David McCullough a écrit : >> >Jivin "Adam Cécile (Le_Vert)" lays it down ... >> >... >> > >> >>gandalf@wrap:~$ cat /etc/modules >> >># /etc/modules: kernel modules to load at boot time. >> >># >> >># This file contains the names of kernel modules that should be loaded >> >># at boot time, one per line. Lines beginning with "#" are ignored. >> >> >> >># Geode WatchDog >> >>geodewdt >> >> >> >># Geode LX AES hardware crypto >> >>geode-aes >> >>geode-rng >> >>crypto_blkcipher >> >>ocf >> >>cryptosoft >> >>cryptodev >> >> >> >># Alix LEDs driver >> >>leds-alix >> >> >> >># Sensors >> >>lm90 >> >> >> >>wrap:/home/gandalf# openssl speed -evp aes128 -elapsed >> >>You have chosen to measure elapsed time instead of user CPU time. >> >>To get the most accurate results, try to run this >> >>program when this computer is idle. >> >>Doing aes-128-cbc for 3s on 16 size blocks: 104083 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 64 size blocks: 101925 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 256 size blocks: 89677 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 1024 size blocks: 61529 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 2048 size blocks: 42862 aes-128-cbc's in 3.00s >> >>OpenSSL 0.9.8g 19 Oct 2007 >> >>built on: Wed Jul 9 18:31:21 UTC 2008 >> >>options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> >>aes(partial) blowfish(idx) >> >>compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> >>-DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> >>-march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> >>-DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> >>available timing options: TIMES TIMEB HZ=100 [sysconf value] >> >>timing function used: ftime >> >>The 'numbers' are in 1000s of bytes per second processed. >> >>type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> >>bytes >> >>aes-128-cbc 555.11k 2173.68k 7652.44k 21001.90k >> >>29260.46k >> >> >> >>wrap:/home/gandalf# lsmod | grep cry >> >>crypto_blkcipher 18564 1 geode_aes >> >>wrap:/home/gandalf# lsmod | grep ocf >> >>wrap:/home/gandalf# openssl speed -evp aes128 -elapsed >> >>You have chosen to measure elapsed time instead of user CPU time. >> >>To get the most accurate results, try to run this >> >>program when this computer is idle. >> >>Doing aes-128-cbc for 3s on 16 size blocks: 895899 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 64 size blocks: 324390 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 256 size blocks: 92243 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 1024 size blocks: 23823 aes-128-cbc's in 3.00s >> >>Doing aes-128-cbc for 3s on 2048 size blocks: 11998 aes-128-cbc's in 3.00s >> >>OpenSSL 0.9.8g 19 Oct 2007 >> >>built on: Wed Jul 9 18:31:21 UTC 2008 >> >>options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) >> >>aes(partial) blowfish(idx) >> >>compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT >> >>-DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_CRYPTODEV -DL_ENDIAN -DTERMIO -O3 >> >>-march=i586 -Wa,--noexecstack -g -Wall -DOPENSSL_BN_ASM_PART_WORDS >> >>-DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM >> >>available timing options: TIMES TIMEB HZ=100 [sysconf value] >> >>timing function used: ftime >> >>The 'numbers' are in 1000s of bytes per second processed. >> >>type 16 bytes 64 bytes 256 bytes 1024 bytes 2048 >> >>bytes >> >>aes-128-cbc 4778.13k 6920.32k 7871.40k 8131.58k >> >>8190.63k >> >> >> >>Okay there's performance difference when I unload all ocf/cryptodev >> >>kernel modules. But are you sure it comes from hardware ? It may just >> >>come from the fact that ocf software perform better than the standard >> >>linux crypto stack. What's your mind about this ? >> >> >> > >> >If ocf is using software crypto it can never (on a single crypto stream) >> >go faster than openssl (or kernel crypto) without ocf. It's just not >> >possible since they are all using basically the same crypto code on the >> >same speed CPU. >> > >> >So yes, I am sure you are doing HW crypto using OCF+cryptosoft and geode. >> > >> >It would go even faster if you ran it from in the kernel. This is what >> >the ocf-bench driver does if you are interested: >> > >> > modprobe ocf-bench >> > dmesg >> > >> >Cheers, >> >Davidm >> > >> Hello, >> >> I've just rebuild my kernel with ocf-bench. Here is what happens: >> gandalf@wrap:~$ sudo modprobe ocf-bench >> [sudo] password for root: >> FATAL: Error inserting ocf_bench >> (/lib/modules/2.6.25-2-alix/kernel/crypto/ocf/o >> cf-bench.ko): Invalid argument >> gandalf@wrap:~$ dmesg | tail >> [ 44.840932] wan: no IPv6 routers present >> [ 61.510480] ip6_tables: (C) 2000-2006 Netfilter Core Team >> [ 66.773388] warning: `named' uses 32-bit capabilities (legacy support >> in use) >> [ 74.301323] tun: Universal TUN/TAP device driver, 1.6 >> [ 74.301346] tun: (C) 1999-2004 Max Krasnyansky <ma...@qu...> >> [ 74.307817] tun0: Disabled Privacy Extensions >> [ 82.660103] wlan: no IPv6 routers present >> [ 132.637766] Crypto Speed tests >> [ 132.637766] OCF: testing ... >> [ 133.811467] OCF: 1044 requests of 1500 bytes in 294 jiffies >> gandalf@wrap:~$ >> >> Seems the module fails to load. Known issue? > > No, it fails to load by design, but you can see there that is printed > out a performance number. You will need to find out you jiffies and > multiply that out to see the performance. > > By default ocf-bench tests sha1/3des, you will need to modify the > source to try out AES or something else. I know it's a complete hack, > but it is useful if you want raw kenerl performance. > > Cheers, > Davidm > > -- > David McCullough, dav...@se..., Ph:+61 734352815 > Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Ocf-linux-users mailing list > Ocf...@li... > https://lists.sourceforge.net/lists/listinfo/ocf-linux-users > |