From owner-freebsd-current@freebsd.org Tue Mar 8 20:37:19 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78625AC893C for ; Tue, 8 Mar 2016 20:37:19 +0000 (UTC) (envelope-from bounce+8f8a6f.851d16-freebsd-current=freebsd.org@0x7f.co) Received: from rs224.mailgun.us (rs224.mailgun.us [209.61.151.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E1718E7 for ; Tue, 8 Mar 2016 20:37:18 +0000 (UTC) (envelope-from bounce+8f8a6f.851d16-freebsd-current=freebsd.org@0x7f.co) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=0x7f.co; q=dns/txt; s=mx; t=1457469438; h=Content-Type: To: From: Subject: Message-ID: Date: MIME-Version: Sender; bh=n++kFP0WKVHXr1Zs1EjLZQDAXHNXdTpSxlHRSvPIy4Q=; b=cEhE8k+tzU6dmwBCBLYnhVOdtaeMUDVTefI9nM3ChjhrxpwAgEFPzg3dfCjwDTx5JZeEtzmk 46NILBSEY60l1LWRnbCwsOpAplCdH3ltyuTpVs92ZbmMV0Ps7njVulJMxsJBTU747vKVEzXC KLAUx3+9ULwCUXM1fqbZZpJxzAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=0x7f.co; s=mx; q=dns; h=Sender: MIME-Version: Date: Message-ID: Subject: From: To: Content-Type; b=rmrxwjkjoYLf/2W48LMzKmoi5nQriDHemvkKkIeH2LhY+XUitFwawS2gObZgBS6eHNDnOG xHYgCRmVBjjOFPH8nNevM9nYShqQ5opOlTwpvr2mCP9r1NcYUQuj8NSw3Nx4VBaFukx9NIDs F4GZOgdNLUD5E/jbiyHJZjjEPfrzI= Sender: freebsd@0x7f.co X-Mailgun-Sid: WyJkZGNmZCIsICJmcmVlYnNkLWN1cnJlbnRAZnJlZWJzZC5vcmciLCAiODUxZDE2Il0= Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mxa.mailgun.org with ESMTP id 56df35f3.7f1dfc6115f0-in6; Tue, 08 Mar 2016 20:28:35 -0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id l68so149101123wml.0 for ; Tue, 08 Mar 2016 12:28:35 -0800 (PST) X-Gm-Message-State: AD7BkJIlDUB+nNbv0Ufx4BzpnNdkw7G61ky8JN69bZ05bs9mMqJ0xE6b/8Xpq0Qb+ku4JRHX/xCoSr9XkXR6Sg== MIME-Version: 1.0 X-Received: by 10.194.23.37 with SMTP id j5mr30026449wjf.171.1457468914466; Tue, 08 Mar 2016 12:28:34 -0800 (PST) Received: by 10.28.174.145 with HTTP; Tue, 8 Mar 2016 12:28:34 -0800 (PST) Date: Tue, 8 Mar 2016 15:28:34 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: geli vs openssl, geli is much slower From: Anonymous To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 20:37:19 -0000 Hello All, The disk encryption on my NAS (RAIDZ1 + ZFS + GELI (aes-128-xts)) is running much slower than expected (80MB/S). It seems that GELI is much slower than openssl for aes-128-xts, the results might be similar for other cipher, but I only verified aes-128-xts and aes-128-cbc. My NAS is running 9.3, but I was able to replicate on FreeBSD 10.2 (recent VM image) on a different machine. OpenSSL w/o AES-NI: OPENSSL_ia32cap="~0x200000200000000" openssl speed -elapsed -evp aes-128-xts type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-xts 49702.86k 140889.72k 358413.11k 444357.17k 482859.72k OpenSSL w/ AES-NI (not relevant, for demonstration purpose): openssl speed -elapsed -evp aes-128-xts type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-xts 417564.07k 1253833.96k 2302266.40k 2993555.43k 3411513.42k w/ gzero: dd if=/dev/zero of=/dev/gzero.eli bs=1m count=1000 1000+0 records in 1000+0 records out 1048576000 bytes transferred in 13.107259 secs (79999640 bytes/sec) geli is only seing 76MB/s (4k sector) while openssl (even at 1k) is doing 433 MB/s. Am I comparing apples and oranges? Is this to be expected? NOTE: It should not be related to AES-NI since my processor (an X3450) doesn't support AES-NI, and I was seeing similar results. NOTE2: # uname -a FreeBSD 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 # openssl version OpenSSL 1.0.1p-freebsd 9 Jul 2015