All of lore.kernel.org
 help / color / mirror / Atom feed
* aesni-intel slower than aes-x86_64
@ 2010-04-11 22:52 john terragon
  2010-04-12 12:41 ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: john terragon @ 2010-04-11 22:52 UTC (permalink / raw)
  To: linux-crypto

Hi.
My system has a core i5 520M and supports AES-NI. I wanted to do a
rude performance test and so I ran these commands on a small (4GB) partition and on the dm-crypt device backed by it:

1) using the aesni-intel module: dd if=/dev/dev/mapper/vol of=/dev/null bs=4k
2) using only the generic aes-x86_64 module: dd if=/dev/dev/mapper/vol
of=/dev/null bs=4k
3) dd if=/dev/sda4 of=/dev/null bs=4k 

What I got kind of surprised me:
1) ~ 67 MB/sec, with a low cpu load by kcryptd
2) ~ 79 MB/sec, with a higher cpu load by kcryptd
3) ~ 81 MB/sec

So aesni-intel seems to be quite slower than the generic aes-x86_64 (although with a lower cpu load). 
Is this to be expected? Am I missing something?

The kernel is the "official" 2.6.32.something (AMD64) from debian sid.

Thanks

John




      

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: aesni-intel slower than aes-x86_64
  2010-04-11 22:52 aesni-intel slower than aes-x86_64 john terragon
@ 2010-04-12 12:41 ` Milan Broz
  2010-04-12 17:09   ` john terragon
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2010-04-12 12:41 UTC (permalink / raw)
  To: john terragon; +Cc: linux-crypto

On 04/12/2010 12:52 AM, john terragon wrote:
> My system has a core i5 520M and supports AES-NI. I wanted to do a
> rude performance test and so I ran these commands on a small (4GB) partition and on the dm-crypt device backed by it:
> 
> 1) using the aesni-intel module: dd if=/dev/dev/mapper/vol of=/dev/null bs=4k
> 2) using only the generic aes-x86_64 module: dd if=/dev/dev/mapper/vol
> of=/dev/null bs=4k
> 3) dd if=/dev/sda4 of=/dev/null bs=4k 
> 
> What I got kind of surprised me:
> 1) ~ 67 MB/sec, with a low cpu load by kcryptd
> 2) ~ 79 MB/sec, with a higher cpu load by kcryptd
> 3) ~ 81 MB/sec

Just curious  - is it the same if you add iflag=direct? Also try larger block size bs=1M etc.

Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: aesni-intel slower than aes-x86_64
  2010-04-12 12:41 ` Milan Broz
@ 2010-04-12 17:09   ` john terragon
  0 siblings, 0 replies; 3+ messages in thread
From: john terragon @ 2010-04-12 17:09 UTC (permalink / raw)
  To: Milan Broz; +Cc: linux-crypto



--- On Mon, 4/12/10, Milan Broz <mbroz@redhat.com> wrote:

> From: Milan Broz <mbroz@redhat.com>
> Subject: Re: aesni-intel slower than aes-x86_64
> To: "john terragon" <terragonjohn@yahoo.com>
> Cc: linux-crypto@vger.kernel.org
> Date: Monday, April 12, 2010, 5:41 AM
> On 04/12/2010 12:52 AM, john terragon
> wrote:
> > My system has a core i5 520M and supports AES-NI. I
> wanted to do a
> > rude performance test and so I ran these commands on a
> small (4GB) partition and on the dm-crypt device backed by
> it:
> > 
> > 1) using the aesni-intel module: dd
> if=/dev/dev/mapper/vol of=/dev/null bs=4k
> > 2) using only the generic aes-x86_64 module: dd
> if=/dev/dev/mapper/vol
> > of=/dev/null bs=4k
> > 3) dd if=/dev/sda4 of=/dev/null bs=4k 
> > 
> > What I got kind of surprised me:
> > 1) ~ 67 MB/sec, with a low cpu load by kcryptd
> > 2) ~ 79 MB/sec, with a higher cpu load by kcryptd
> > 3) ~ 81 MB/sec
> 
> Just curious  - is it the same if you add
> iflag=direct? Also try larger block size bs=1M etc.
> 

With iflag=direct I get about 1.2 MB/sec more or less in all the three cases. With bs=1M I get slightly better results in all the three cases
however the increase for aesni is proportionally less than the other two cases. So the performance differences are even slightly larger with bs=1M. I don't get it. As it is, it seems that the  aes new instructions are practically useless (with my core i5 520M, at least).

John

 


      
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-12 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-11 22:52 aesni-intel slower than aes-x86_64 john terragon
2010-04-12 12:41 ` Milan Broz
2010-04-12 17:09   ` john terragon

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.