Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2015 22:47:23 +0200
From:      Christoph Moench-Tegeder <cmt@burggraben.net>
To:        freebsd-security@freebsd.org
Subject:   Re: Atom C2758 - loading aesni(4) reduces performance
Message-ID:  <20150524204723.GA2853@elch.exwg.net>
In-Reply-To: <6BA42026-C785-40B5-B9CF-DD4280693C41@dragondata.com>
References:  <6BA42026-C785-40B5-B9CF-DD4280693C41@dragondata.com>

next in thread | previous in thread | raw e-mail | index | archive | help
## Kevin Day (toasty@dragondata.com):

> Is this expected here, or is something broken?

I'd expect there's something wrong (I don't have access to an AES-NI
capable Atom, but on my i7 there's no such impact).
The performance numbers for the "openssl speed" suite show heavy
fluctutation even under light load - was this a one-shot test or is
this reproducable on a "unloaded" (yes, I know, system stuff...) system?
Can you run multiple tests in each configuration and check average, median
and standard deviation? (just to make sure this is significant).

Anyways, openssl does not use crypto(4) by default (and therefore cannot
use aesni(4)). openssl detects the cpu features by itself and uses the
AES-NI instruction set if available - unless told otherwise (see
OPENSSL_ia32cap(3)). To make the long manual short - you can force
openssl not to use AES-NI by setting the environment
OPENSSL_ia32cap="~0x0200000000000000". From my tests I estimate (I did
only a few tests) that this option alone cuts aes-256-cbc by 50 to 60%.
Loading (or not) aesni(4) has no obvious effect on the numbers in
both cases (variations are in the order of the usual noise).

Regards,
Christoph

-- 
Spare Space



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