Re: [Ocf-linux-users] No performances improvment with AMD Geode
                
                Brought to you by:
                
                    david-m
                    
                
            
            
        
        
        
    | 
      
      
      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 |