Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2015 14:02:17 -0500
From:      Mike Tancsa <mike@sentex.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: cryptodev HW (aesni) vs software
Message-ID:  <565362B9.8020808@sentex.net>
In-Reply-To: <20151123174833.0e36619c@gumby.homeunix.com>
References:  <20151120200325.2baade9c@nonamehost.local> <20151120192920.119bbf91@gumby.homeunix.com> <20151122130329.6ea9b9c6@nonamehost.local> <86lh9qhtuw.fsf@WorkBox.Home> <20151123145326.63d3203b@nonamehost.local> <20151123174833.0e36619c@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/23/2015 12:48 PM, RW via freebsd-questions wrote:
> 
> The aesni kernel module provides AES-NI support for crypto/cryptodev in
> the kernel, not in userland.
> 
>  
>> Problem 3
>> In the best case FreeBSD inferior Linux in encryption by as much as
>> 23% at exactly the same hardware
> 
> I think hardware would be more than 23% faster than software.

Make sure your version of openssl is actually aesni capable (releng9
doesnt have a version I think)

see
http://stackoverflow.com/questions/25284119/how-can-i-check-if-openssl-is-support-use-the-intel-aes-ni

for some details on the userland use of it.

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192
bytes
aes-128-cbc     274206.29k   321032.83k   330511.33k   334024.02k
335142.91k
aes-128-cbc     385536.87k   662102.59k   810009.26k   854812.43k
867447.30k


openssl speed -elapsed -evp aes-128-cbc
...
OPENSSL_ia32cap="~0x200000200000000" openssl speed -elapsed -evp aes-128-cbc

Numbers from an i5 CPU that has aesni instructions.  No aesni module loaded.

% openssl version
OpenSSL 1.0.1p-freebsd 9 Jul 2015

	---Mike

-- 
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?565362B9.8020808>