From owner-freebsd-security@FreeBSD.ORG Sun May 24 17:30:22 2015 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FA60642 for ; Sun, 24 May 2015 17:30:22 +0000 (UTC) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE1AE1BB2 for ; Sun, 24 May 2015 17:30:21 +0000 (UTC) Received: by igbsb11 with SMTP id sb11so20694843igb.0 for ; Sun, 24 May 2015 10:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=a6e/Ca0XszEeDKME7JeU04QeeZo9XQ1c++j5re46uQU=; b=eJpkZ/OjYKU5rE4G7UmYMQpOo6vbRYsG5haL4i1DPzN9penDDQBsTPwdAwAjriS4v7 /xN5xR8ZbaNOaVNshaZJmX35U2YIiUt6GLOHZGUYPPkyV7PQAmtmD5V1vJZCNi3qDEwR hysu9GhFxNFh0iz2/M9pyH6nwFJa5EId9yVhZ5jngvERtGsCLY0Jv6cdABbFNrQ7qLu4 KWfc92RXB/3RR6lk4+HrYEvlEPL9F4xpdQ9lWIemYLrf0hCuFdYY+FdGTPjbXI6tPqGt kGuOC9aEkGBrsgm/oOqkDIoQ43MC8hcxOegQB1ilEgghcC+kuwI/3s6J8soEG4XqbTcv NokA== MIME-Version: 1.0 X-Received: by 10.107.137.80 with SMTP id l77mr16944252iod.92.1432488621108; Sun, 24 May 2015 10:30:21 -0700 (PDT) Received: by 10.36.121.86 with HTTP; Sun, 24 May 2015 10:30:21 -0700 (PDT) In-Reply-To: <6BA42026-C785-40B5-B9CF-DD4280693C41@dragondata.com> References: <6BA42026-C785-40B5-B9CF-DD4280693C41@dragondata.com> Date: Sun, 24 May 2015 13:30:21 -0400 Message-ID: Subject: Re: Atom C2758 - loading aesni(4) reduces performance From: Robert Simmons To: freebsd-security@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 17:30:22 -0000 Can you provide the output of freebsd-version, and openssl version? It looks like you're using a very old version of OpenSSL. Here's my output as an example: % freebsd-version 10.1-RELEASE-p10 % openssl version OpenSSL 1.0.1l-freebsd 15 Jan 2015 % /usr/local/bin/openssl version OpenSSL 1.0.2a 19 Mar 2015 On Sun, May 24, 2015 at 12:22 PM, Kevin Day wrote: > > I=E2=80=99ve got an Atom C2758 system: > > CPU: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz (2400.06-MHz K8-class CPU) > Origin =3D "GenuineIntel" Id =3D 0x406d8 Family =3D 0x6 Model =3D 0x= 4d Stepping =3D 8 > Features=3D0xbfebfbff > Features2=3D0x43d8e3bf > AMD Features=3D0x28100800 > AMD Features2=3D0x101 > Standard Extended Features=3D0x2282 > > Enabling aesni seems to make performance much worse: > > root@router:~ # openssl speed -evp aes-256-cbc -elapsed > You have chosen to measure elapsed time instead of user CPU time. > Doing aes-256-cbc for 3s on 16 size blocks: 33200486 aes-256-cbc's in 3.0= 1s > Doing aes-256-cbc for 3s on 64 size blocks: 11444626 aes-256-cbc's in 3.0= 1s > Doing aes-256-cbc for 3s on 256 size blocks: 3328753 aes-256-cbc's in 3.0= 2s > Doing aes-256-cbc for 3s on 1024 size blocks: 866523 aes-256-cbc's in 3.0= 2s > Doing aes-256-cbc for 3s on 8192 size blocks: 108891 aes-256-cbc's in 3.0= 0s > OpenSSL 1.0.1e-freebsd 11 Feb 2013 > built on: date not available > options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int= ) blowfish(idx) > compiler: cc > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 b= ytes > aes-256-cbc 176609.34k 243517.86k 281851.62k 293480.37k 29734= 5.02k > > > root@router:~ # kldload aesni > root@router:~ # openssl speed -evp aes-256-cbc -elapsed > You have chosen to measure elapsed time instead of user CPU time. > Doing aes-256-cbc for 3s on 16 size blocks: 881020 aes-256-cbc's in 3.02s > Doing aes-256-cbc for 3s on 64 size blocks: 842078 aes-256-cbc's in 3.00s > Doing aes-256-cbc for 3s on 256 size blocks: 700368 aes-256-cbc's in 3.03= s > Doing aes-256-cbc for 3s on 1024 size blocks: 425602 aes-256-cbc's in 3.0= 0s > Doing aes-256-cbc for 3s on 8192 size blocks: 76495 aes-256-cbc's in 3.00= s > OpenSSL 1.0.1e-freebsd 11 Feb 2013 > built on: date not available > options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int= ) blowfish(idx) > compiler: cc > The 'numbers' are in 1000s of bytes per second processed. > type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 b= ytes > aes-256-cbc 4662.35k 17964.33k 59148.60k 145272.15k 20888= 2.35k > > > Is this expected here, or is something broken? > > =E2=80=94 Kevin > > _______________________________________________ > freebsd-security@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.or= g"