All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: Milan Broz <gmazyland@gmail.com>
Cc: dm-crypt <dm-crypt@saout.de>
Subject: Re: [dm-crypt] [ANNOUNCE] cryptsetup 1.6.0-rc1
Date: Wed, 2 Jan 2013 13:50:55 +0100	[thread overview]
Message-ID: <20130102125055.GA17370@citd.de> (raw)
In-Reply-To: <50DF7D3D.9030504@gmail.com>

On 30.12.2012 00:31, Milan Broz wrote:
> On 12/30/2012 12:15 AM, Matthias Schniedermeyer wrote:
> 
> > Are you sure (about AES-NI)?
> 
> I meant difference in ecryption/decryption speed, not real
> numbers (it was an example from virtual machine and
> in 32bit mode in fact).
> 
> Yes, speed should be much higher on recent systems.
> 
> At least it motivates people to try it :)
> 
> When you are playing with it: you can try to
> unload/blackist various kernel modules
> (aesni_intel, aes_x86_64, ...) and check difference.


This was tested on:
Core i7 2600 (Sandy Bridge), 4 cores, HT, no Overclocking
Kernel 3.7.1

First run is with everyting at maxium:
aesni, twofish AVX, serpent AVX:
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       371308 iterations per second
PBKDF2-sha256     215578 iterations per second
PBKDF2-sha512      88204 iterations per second
PBKDF2-ripemd160  355208 iterations per second
PBKDF2-whirlpool  147936 iterations per second
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  633,4 MiB/s  2172,0 MiB/s
 serpent-cbc   128b   80,2 MiB/s  301,7 MiB/s
 twofish-cbc   128b  181,8 MiB/s  336,7 MiB/s
     aes-cbc   256b  457,0 MiB/s  1639,0 MiB/s
 serpent-cbc   256b   78,7 MiB/s  301,0 MiB/s
 twofish-cbc   256b  181,8 MiB/s  332,3 MiB/s
     aes-xts   256b  1149,0 MiB/s  1160,0 MiB/s
 serpent-xts   256b  286,7 MiB/s  279,4 MiB/s
 twofish-xts   256b  298,4 MiB/s  301,4 MiB/s
     aes-xts   512b  1022,0 MiB/s  1020,0 MiB/s
 serpent-xts   512b  294,7 MiB/s  281,4 MiB/s
 twofish-xts   512b  304,0 MiB/s  303,4 MiB/s


Here are the differences after rmmod certain modules:

--- AES ---
aesni_intel:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  633,4 MiB/s  2172,0 MiB/s
     aes-cbc   256b  457,0 MiB/s  1639,0 MiB/s
     aes-xts   256b  1149,0 MiB/s  1160,0 MiB/s
     aes-xts   512b  1022,0 MiB/s  1020,0 MiB/s

After rmmod aesni_intel:
aes_x86_64:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  200,4 MiB/s  236,8 MiB/s
     aes-cbc   256b  157,7 MiB/s  178,6 MiB/s
     aes-xts   256b  230,3 MiB/s  231,8 MiB/s
     aes-xts   512b  175,1 MiB/s  175,6 MiB/s

After rmmod aes_x86_64
aes_generic:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  194,6 MiB/s  228,8 MiB/s
     aes-cbc   256b  154,0 MiB/s  172,7 MiB/s
     aes-xts   256b  232,3 MiB/s  228,0 MiB/s
     aes-xts   512b  175,8 MiB/s  155,0 MiB/s

--- Twofish ---
twofish_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  181,8 MiB/s  336,7 MiB/s
 twofish-cbc   256b  181,8 MiB/s  332,3 MiB/s
 twofish-xts   256b  298,4 MiB/s  301,4 MiB/s
 twofish-xts   512b  304,0 MiB/s  303,4 MiB/s

After rmmod twofish_avx_x86_64
twofish_x86_64_3way:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  179,6 MiB/s  219,0 MiB/s
 twofish-cbc   256b  183,3 MiB/s  223,8 MiB/s
 twofish-xts   256b  207,0 MiB/s  208,6 MiB/s
 twofish-xts   512b  207,6 MiB/s  208,0 MiB/s

After rmmod twofish_x86_64_3way
twofish_x86_64:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  151,0 MiB/s  171,7 MiB/s
 twofish-cbc   256b  147,6 MiB/s  171,7 MiB/s
 twofish-xts   256b  170,8 MiB/s  173,1 MiB/s
 twofish-xts   512b  174,7 MiB/s  176,0 MiB/s

After rmmod twofish_x86_64
twofish_generic:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  143,6 MiB/s  163,2 MiB/s
 twofish-cbc   256b  144,0 MiB/s  161,4 MiB/s
 twofish-xts   256b  161,4 MiB/s  162,5 MiB/s
 twofish-xts   512b  163,8 MiB/s  162,5 MiB/s


--- Serpent ---
serpent_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,2 MiB/s  301,7 MiB/s
 serpent-cbc   256b   78,7 MiB/s  301,0 MiB/s
 serpent-xts   256b  286,7 MiB/s  279,4 MiB/s
 serpent-xts   512b  294,7 MiB/s  281,4 MiB/s

After rmmod serpent_avx_x86_64:
serpent_sse2_x86_64:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,7 MiB/s  298,4 MiB/s
 serpent-cbc   256b   80,8 MiB/s  302,7 MiB/s
 serpent-xts   256b  274,5 MiB/s  265,7 MiB/s
 serpent-xts   512b  271,0 MiB/s  273,7 MiB/s

After rmmod serpent_sse2_x86_64
serpent_generic:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   74,9 MiB/s   82,8 MiB/s
 serpent-cbc   256b   73,2 MiB/s   79,8 MiB/s
 serpent-xts   256b   78,4 MiB/s   83,2 MiB/s
 serpent-xts   512b   79,8 MiB/s   83,6 MiB/s


With serpent_avx_x86_64 loaded and serpent_sse2_x86_64 removed
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,2 MiB/s  303,4 MiB/s
 serpent-cbc   256b   81,6 MiB/s  306,4 MiB/s
 serpent-xts   256b  289,0 MiB/s  278,7 MiB/s
 serpent-xts   512b  296,0 MiB/s  282,4 MiB/s

Seems the AVX version doesn't make much of a difference compared to the 
SSE version.




And last but not least the other benchmark mentioned:
cast5_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
   cast5-cbc   128b  103,3 MiB/s  302,0 MiB/s

After rmmod cast5_avx_x86_64
cast5_generic:
#  Algorithm | Key | Encryption | Decryption
   cast5-cbc   128b   95,1 MiB/s  107,5 MiB/s



I didn't average several runs, except for serpent the numbers differ 
enough that the accuracy is good enough(tm).
The few runs i tried had relativly stable numbers.


Btw. The encryption & decryption columns need to be 1 char wider, the 
aesni-numbers are too big. ;-)




-- 

Matthias

  reply	other threads:[~2013-01-02 12:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 21:40 [dm-crypt] [ANNOUNCE] cryptsetup 1.6.0-rc1 Milan Broz
2012-12-29 22:24 ` Matthias Schniedermeyer
2012-12-29 22:42   ` Milan Broz
2012-12-29 23:21     ` Matthias Schniedermeyer
2012-12-29 23:15 ` Matthias Schniedermeyer
2012-12-29 23:31   ` Milan Broz
2013-01-02 12:50     ` Matthias Schniedermeyer [this message]
2013-01-02 20:55       ` Milan Broz
2012-12-30  8:38 ` Arno Wagner
2012-12-30  8:56   ` Sven Eschenberg
2012-12-30 10:20     ` Arno Wagner
2012-12-30 11:40       ` Milan Broz
2013-01-06 12:16         ` Yves-Alexis Perez
2013-01-06 16:24           ` Milan Broz
2013-01-07  6:23             ` Yves-Alexis Perez
2013-01-07  8:53               ` Milan Broz
2013-01-07 11:21               ` Sven Eschenberg
2013-01-07 18:12                 ` Milan Broz
2013-01-07 19:20                   ` Sven Eschenberg
2013-01-21 21:01                 ` Yves-Alexis Perez
2012-12-30 11:47       ` Milan Broz
2013-01-05 19:47         ` Jonas Meurer
2012-12-30  9:03   ` Milan Broz
2013-01-04 11:50 ` [dm-crypt] Switch to XTS mode for LUKS in cryptsetup in 1.6.0 (Was Re: [ANNOUNCE] cryptsetup 1.6.0-rc1) Milan Broz
2013-01-04 11:53   ` Ralf Ramsauer
2013-01-04 12:18     ` Milan Broz
2013-01-04 16:26       ` Arno Wagner
2013-01-04 20:20         ` Heinz Diehl
2013-01-04 20:56           ` Milan Broz
2013-01-04 22:05             ` Arno Wagner
2013-01-04 22:39               ` Milan Broz
2013-01-05 17:20                 ` Arno Wagner
2013-01-05 18:25                   ` Milan Broz
2013-01-05 19:47                     ` Arno Wagner
2013-01-04 13:39   ` Christoph Anton Mitterer
2013-01-04 16:17   ` Arno Wagner
2013-01-04 17:36   ` Zdenek Kaspar
2013-01-04 18:55   ` Romain Francoise
2013-01-04 19:14     ` Milan Broz
2013-01-04 21:56       ` Arno Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130102125055.GA17370@citd.de \
    --to=ms@citd.de \
    --cc=dm-crypt@saout.de \
    --cc=gmazyland@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.