<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Smörgåsbord &#187; benchmark</title>
	<atom:link href="http://smorgasbord.gavagai.nl/tags/benchmark/feed/" rel="self" type="application/rss+xml" />
	<link>http://smorgasbord.gavagai.nl</link>
	<description>Ambachtelijk bereide beschouwingen.</description>
	<lastBuildDate>Thu, 02 Sep 2010 08:17:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SheevaPlug hardware crypto</title>
		<link>http://smorgasbord.gavagai.nl/2010/02/sheevaplug-hardware-crypto/</link>
		<comments>http://smorgasbord.gavagai.nl/2010/02/sheevaplug-hardware-crypto/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 23:25:16 +0000</pubDate>
		<dc:creator>Wicher</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[en_GB]]></category>
		<category><![CDATA[sheevaplug]]></category>

		<guid isPermaLink="false">http://smorgasbord.gavagai.nl/?p=872</guid>
		<description><![CDATA[Some quick numbers for those looking for performance figures on the CESA crypto accelerator. Like I was, since my SheevaPlug has one. From the kernel config:

CRYPTO_DEV_MV_CESA
This driver allows you to utilize the Cryptographic Engines and Security Accelerator (CESA) which can be found on the Marvell Orion and Kirkwood SoCs, such as QNAP&#8217;s TS-209.
Currently the driver [...]]]></description>
			<content:encoded><![CDATA[<p>Some quick numbers for those looking for performance figures on the CESA crypto accelerator. Like I was, since my <a href="http://en.wikipedia.org/wiki/SheevaPlug">SheevaPlug</a> has one. From the kernel config:</p>
<blockquote><p>
CRYPTO_DEV_MV_CESA<br />
This driver allows you to utilize the Cryptographic Engines and Security Accelerator (CESA) which can be found on the Marvell Orion and Kirkwood SoCs, such as QNAP&#8217;s TS-209.<br />
Currently the driver supports AES in ECB and CBC mode without DMA.
</p></blockquote>
<p>Whether the accelerator will be used depends on whether an application uses the in-kernel crypto algorithms. OpenSSL does not unless it is explicitly enabled to use a certain accelerator, such as is the case with the Via Padlock engine. So this particular engine won&#8217;t let your SSH run faster. But it will speed up device mapper crypto if you use an AES cipher.</p>
<p>Right, let&#8217;s get on with it.<br />
<code><br />
#uname -a<br />
Linux sheeva 2.6.32-gentoo-r3 #3 Thu Feb 4 23:02:42 CET 2010 armv5tel Feroceon 88FR131 rev 1 (v5l) Marvell SheevaPlug Reference Board GNU/Linux<br />
</code></p>
<p>Quick &#038; oh-so-dirty way of getting a RAM-backed block device (that is, if you don&#8217;t have swap enabled):<br />
<code><br />
#mount -t tmpfs tmpfs /mnt/tmp/<br />
#dd if=/dev/zero of=/mnt/tmp/blob bs=1M count=224<br />
#losetup /dev/loop0 /mnt/tmp/blob<br />
#cryptsetup -c aes -h sha1 -d /dev/urandom create test /dev/loop0<br />
</code><br />
First we test without CESA.<br />
<code><br />
#dd if=/dev/zero of=/dev/mapper/test bs=1M count=224<br />
234881024 bytes (235 MB) copied, 41.858 s, 5.6 MB/s<br />
</code><br />
Only 5.6 MB/s and the <code>[kcryptd]</code> kernel process is having your CPU for lunch.<br />
Enter CESA:<br />
<code><br />
#dmsetup remove test<br />
#modprobe mv_cesa<br />
#cryptsetup -c aes -h sha1 -d /dev/urandom create test /dev/loop0<br />
#dd if=/dev/zero of=/dev/mapper/test bs=1M count=224<br />
234881024 bytes (235 MB) copied, 18.0525 s, 13.0 MB/s<br />
</code><br />
13.0 MB/s and there&#8217;s a new kernel process, <code>[mv_crypto]</code>. It&#8217;s eating about three times as much CPU as <code>[kcryptd]</code>. That means it&#8217;s offloading, which is good. The results are consistent over time so let&#8217;s say there&#8217;s a 2.5-fold performance gain.<br />
The loop device setup causes some overhead. Out in the wild you&#8217;ll get about 19 MB/s writing to USB HDD. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://smorgasbord.gavagai.nl/2010/02/sheevaplug-hardware-crypto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
