From owner-freebsd-security@FreeBSD.ORG Sun May 24 16:22:29 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 5679EB17 for ; Sun, 24 May 2015 16:22:29 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 23304138A for ; Sun, 24 May 2015 16:22:28 +0000 (UTC) Received: by igbyr2 with SMTP id yr2so22114760igb.0 for ; Sun, 24 May 2015 09:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dragondata.com; s=google; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=i/yGs0jRoEH/8oYjP8SmQ1srP4MFOl8ylxEuA5TqSwI=; b=o4Ivnh/Mjkaq5cM15nyjn9Ny8H5QtUwle2/A7hfDaXx33i2efpVlMFxJ24FLRjLg1j JVy7Y97JxIg46LOUMYhle5xef/e+jo/RI0essoYjFSQ1my5Q0BsSWuNebJ27V9FM+zLY Ag4x984GuJfbWiA+XKxoPSxBP6mz3Znmr89pQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=i/yGs0jRoEH/8oYjP8SmQ1srP4MFOl8ylxEuA5TqSwI=; b=Da+XI17Mg++ai28hC4SzZhKQLvn68+I2EBDsG/xVKUMekrB813sPZAz3K8emE1kliZ fH+dGtFyYdqoRvuDjm5KUqmCSkQLEFQDnPOMQPnPM9AQ4VfbsMe62Gi9Lj1DVvGRaUJl SqVlzwD1LLrmK5WOA2oxjtMHSAELmdj3qLTUKX1JoxoFSm3BxDK/GcIOoUn5QS2nykuD Hhp/UlKp183I8w4zaLdG7EV5CsACW9fRhxJ4nG8UmZPuEaLQKmuEG2aiC85NSbs1bHEu yqUb5ROw8v/A2ss0Np47atcu471wxqjQGBPal5EjOsvtTODSPPyCq1BGlvyMgpbRtsHf 8H+A== X-Gm-Message-State: ALoCoQkI6KeWU/Yprbv7P5t7uv7XmjMXIg6JcP62tdEA+l4dyrxu46yvF5JQoH5KrjodoGlDA8Tm X-Received: by 10.50.132.71 with SMTP id os7mr18203367igb.24.1432484548156; Sun, 24 May 2015 09:22:28 -0700 (PDT) Received: from unassigned.v6.your.org ([2001:4978:1:45:1dd:435:e677:4a9f]) by mx.google.com with ESMTPSA id fm3sm4068791igb.1.2015.05.24.09.22.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 May 2015 09:22:26 -0700 (PDT) From: Kevin Day Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Atom C2758 - loading aesni(4) reduces performance Message-Id: <6BA42026-C785-40B5-B9CF-DD4280693C41@dragondata.com> Date: Sun, 24 May 2015 11:22:25 -0500 To: freebsd-security@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.4\)) X-Mailer: Apple Mail (2.2070.4) 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 16:22:29 -0000 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 = 0x4d 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.01s Doing aes-256-cbc for 3s on 64 size blocks: 11444626 aes-256-cbc's in = 3.01s Doing aes-256-cbc for 3s on 256 size blocks: 3328753 aes-256-cbc's in = 3.02s Doing aes-256-cbc for 3s on 1024 size blocks: 866523 aes-256-cbc's in = 3.02s Doing aes-256-cbc for 3s on 8192 size blocks: 108891 aes-256-cbc's in = 3.00s 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 = bytes aes-256-cbc 176609.34k 243517.86k 281851.62k 293480.37k = 297345.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.03s Doing aes-256-cbc for 3s on 1024 size blocks: 425602 aes-256-cbc's in = 3.00s Doing aes-256-cbc for 3s on 8192 size blocks: 76495 aes-256-cbc's in = 3.00s 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 = bytes aes-256-cbc 4662.35k 17964.33k 59148.60k 145272.15k = 208882.35k Is this expected here, or is something broken? =E2=80=94 Kevin