From owner-freebsd-questions@freebsd.org Fri Nov 20 18:03:34 2015 Return-Path: Delivered-To: freebsd-questions@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 9E644A34183 for ; Fri, 20 Nov 2015 18:03:34 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv157.fwdcdn.com (frv157.fwdcdn.com [212.42.77.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E341A23 for ; Fri, 20 Nov 2015 18:03:34 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=xCsdGJVq86q3RQh3oZo9n/5xhnf3a8Y4RFjcnoUGLCg=; b=r8m1KFbEos1qul4esMViLFg5M7E0DIeMmx67shgm2VG7ETG0wOWicvdwax5uNFU9QpPiio/miVcvLGid2j6v9d+gsjqyXTSsr3mgku34gbB5ZCYb6wEkIWudWAD+K5zZf7FB5KIdJuPdml6+8y67l3fvmdFHS+w68NBBFWJugy0=; Received: from [178.137.225.202] (helo=nonamehost.local) by frv157.fwdcdn.com with esmtpsa ID 1Zzq1t-000Br7-TW for freebsd-questions@freebsd.org; Fri, 20 Nov 2015 20:03:26 +0200 Date: Fri, 20 Nov 2015 20:03:25 +0200 From: Ivan Klymenko To: freebsd-questions@freebsd.org Subject: cryptodev HW (aesni) vs software Message-ID: <20151120200325.2baade9c@nonamehost.local> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=178.137.225.202; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 18:03:34 -0000 Hello everybody. What's happening? root@nonamehost:/ # openssl speed -evp aes-128-cbc -elapsed -engine cryptodev engine "cryptodev" set. You have chosen to measure elapsed time instead of user CPU time. Doing aes-128-cbc for 3s on 16 size blocks: 94143620 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 64 size blocks: 25440888 aes-128-cbc's in 3.01s Doing aes-128-cbc for 3s on 256 size blocks: 6442164 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 1626351 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 8192 size blocks: 202870 aes-128-cbc's in 3.01s OpenSSL 1.0.2d-freebsd 9 Jul 2015 built on: date not available options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: clang The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 502099.31k 541329.23k 549731.33k 555127.81k 552531.46k root@nonamehost:/ # openssl engine -c -t (cryptodev) BSD cryptodev engine [RSA, DSA, DH] [ available ] (dynamic) Dynamic engine loading support [ unavailable ] root@nonamehost:/ # kldload aesni root@nonamehost:/ # openssl engine -c -t (cryptodev) BSD cryptodev engine [RSA, DSA, DH, AES-128-CBC, AES-192-CBC, AES-256-CBC] [ available ] (dynamic) Dynamic engine loading support [ unavailable ] root@nonamehost:/ # openssl speed -evp aes-128-cbc -elapsed -engine cryptodev engine "cryptodev" set. You have chosen to measure elapsed time instead of user CPU time. Doing aes-128-cbc for 3s on 16 size blocks: 1645919 aes-128-cbc's in 3.01s Doing aes-128-cbc for 3s on 64 size blocks: 1675783 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 256 size blocks: 1398129 aes-128-cbc's in 3.00s Doing aes-128-cbc for 3s on 1024 size blocks: 824381 aes-128-cbc's in 3.01s Doing aes-128-cbc for 3s on 8192 size blocks: 173487 aes-128-cbc's in 3.00s OpenSSL 1.0.2d-freebsd 9 Jul 2015 built on: date not available options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(idx) compiler: clang The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 8755.43k 35750.04k 119307.01k 280657.83k 473735.17k root@nonamehost:/ # Thanks!