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