Project

General

Profile

Actions

Bug #1542

closed

bad crypto performance (using openssl)

Added by alexh about 15 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Results of a few tests on my soekris net5501 box (no, I'm not using the crypto
hardware; yes I am sure about that):

-------------------------------------------------------------------------
dragonfly# openssl speed aes-128-cbc
...
OpenSSL 0.9.8k 25 Mar 2009
built on: Sat Sep 26 09:03:11 BST 2009
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial)
blowfish(idx)
...
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 4072.40k 4231.00k 4268.95k 4291.97k 4283.60k

pfSense:~# openssl speed aes-128-cbc
...
OpenSSL 0.9.8e 23 Feb 2007
built on: Sun Feb 24 16:11:39 UTC 2008
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial)
blowfish(idx)
...
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 5436.43k 5587.18k 5658.61k 5670.01k 5681.02k

dragonfly# dd if=/dev/zero bs=4k count=100000 | openssl enc -aes-128-cbc -e -
out /dev/null -nosalt -k abcdefhij
100000+0 records in
100000+0 records out
409600000 bytes transferred in 103.347777 secs (3963317 bytes/sec)

pfSense:~# dd if=/dev/zero bs=4k count=100000 | openssl enc -aes-128-cbc -e -
out /dev/null -nosalt -k abcdefhij
100000+0 records in
100000+0 records out
409600000 bytes transferred in 89.482008 secs (4577457 bytes/sec)

-------------------------------------------------------------------------
Results of the same tests on the same VMWare virtual machine:

dragonfly (openssl compiled with -O2):
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 62175.25k 62713.00k 64060.00k 64069.51k 64250.39k

freebsd (seems to be compiled with -O2 -DOPENSSL_THREADS:
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128 cbc 81097.86k 84583.24k 86055.15k 86210.96k 86484.81k

dd:
dragonfly:
409600000 bytes transferred in 7.676454 secs (53357969 bytes/sec)

freebsd:
409600000 bytes transferred in 5.239756 secs (78171577 bytes/sec)


And even more, running time -l openssl speed aes-128-cbc:

dragonfly:
aes-128 cbc 62038.39k 62486.35k 64122.89k 64131.56k 64477.89k
15.11 real 15.06 user 0.01 sys
2144 maximum resident set size
132 average shared memory size
7 average unshared data size
49 average unshared stack size
448 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
0 messages sent
0 messages received
10 signals received
0 voluntary context switches
0 involuntary context switches

freebsd:
aes-128 cbc 81091.22k 84641.53k 85396.39k 86787.24k 85657.43k
15.26 real 15.08 user 0.01 sys
2816 maximum resident set size
368 average shared memory size
367 average unshared data size
128 average unshared stack size
209 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
0 messages sent
0 messages received
5 signals received
1 voluntary context switches
1463 involuntary context switches

----------------------
on a different issue, 0 involuntary context switches? doesn't sound right.


Files

i386 (17.6 KB) i386 peter, 11/22/2010 11:29 AM
i386-asm (17.6 KB) i386-asm peter, 11/22/2010 11:29 AM
x86_64 (17.7 KB) x86_64 peter, 11/22/2010 11:29 AM
x86_64-asm (17.7 KB) x86_64-asm peter, 11/22/2010 11:29 AM
Actions

Also available in: Atom PDF