XU4 / cryptsetup benchmark results

Post Reply
User avatar
Korben_Dalls
Posts: 8
Joined: Fri Aug 07, 2015 3:10 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

XU4 / cryptsetup benchmark results

Unread post by Korben_Dalls » Sat Aug 15, 2015 12:31 am

Here are the cryptsetup benchmarks from an XU4 running the official Ubuntu 14.04 server image in case anyone out there is curious:

Code: Select all

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       200109 iterations per second
PBKDF2-sha256     127254 iterations per second
PBKDF2-sha512      38325 iterations per second
PBKDF2-ripemd160  184608 iterations per second
PBKDF2-whirlpool   31659 iterations per second
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b   239.4 MiB/s   203.0 MiB/s
 serpent-cbc   128b    34.8 MiB/s    37.1 MiB/s
 twofish-cbc   128b    45.9 MiB/s    47.3 MiB/s
     aes-cbc   256b   186.3 MiB/s   166.5 MiB/s
 serpent-cbc   256b    35.3 MiB/s    37.4 MiB/s
 twofish-cbc   256b    46.8 MiB/s    47.1 MiB/s
     aes-xts   256b    48.5 MiB/s    43.3 MiB/s
 serpent-xts   256b    35.8 MiB/s    36.8 MiB/s
 twofish-xts   256b    47.3 MiB/s    47.3 MiB/s
     aes-xts   512b    39.0 MiB/s    35.9 MiB/s
 serpent-xts   512b    37.0 MiB/s    36.8 MiB/s
 twofish-xts   512b    48.1 MiB/s    47.3 MiB/s
Not bad for such a power-sipping little device! ;)

- Korben
I'm just some guy... you know?

User avatar
rooted
Posts: 7121
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 381 times
Been thanked: 102 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by rooted » Sat Aug 15, 2015 2:37 am

Nice name, love that movie.

Thanks for sharing your results.

User avatar
meveric
Posts: 10638
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 25 times
Been thanked: 193 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by meveric » Sat Aug 15, 2015 5:16 am

i also really love that movie :D

btw: i get slightly different results:

Code: Select all

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       206412 iterations per second
PBKDF2-sha256     128501 iterations per second
PBKDF2-sha512      38325 iterations per second
PBKDF2-ripemd160  187245 iterations per second
PBKDF2-whirlpool   25600 iterations per second
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b   430.8 MiB/s   425.9 MiB/s
 serpent-cbc   128b    37.1 MiB/s    38.3 MiB/s
 twofish-cbc   128b    53.7 MiB/s    51.9 MiB/s
     aes-cbc   256b   419.0 MiB/s   436.0 MiB/s
 serpent-cbc   256b    36.8 MiB/s    38.2 MiB/s
 twofish-cbc   256b    51.0 MiB/s    51.5 MiB/s
     aes-xts   256b    40.4 MiB/s    43.3 MiB/s
 serpent-xts   256b    38.3 MiB/s    38.1 MiB/s
 twofish-xts   256b    52.1 MiB/s    51.2 MiB/s
     aes-xts   512b    31.9 MiB/s    33.7 MiB/s
 serpent-xts   512b    38.5 MiB/s    38.4 MiB/s
 twofish-xts   512b    51.9 MiB/s    51.2 MiB/s
probably a different cpu governor?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
Korben_Dalls
Posts: 8
Joined: Fri Aug 07, 2015 3:10 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by Korben_Dalls » Sat Aug 15, 2015 10:20 pm

You guys would probably appreciate my Zorg-esque haircut too then, haha!
meveric wrote:
...probably a different cpu governor?
Wow, your results blow mine out of the water - nice! I haven't messed with any CPU governor stuff on my XU4 yet so I'm gonna read up on it before I start tinkering. What did you tweak yours to?

- Korben
I'm just some guy... you know?

User avatar
meveric
Posts: 10638
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 25 times
Been thanked: 193 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by meveric » Sat Aug 15, 2015 11:24 pm

just set it to performance.. since the new kernel sets them by default "on demand" which means they are all at only 200MHz if not requested more.. it also takes a while for them to clock up to maximum speed.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
Korben_Dalls
Posts: 8
Joined: Fri Aug 07, 2015 3:10 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by Korben_Dalls » Sun Aug 16, 2015 12:45 am

That's great info - many thanks!

- Korben
I'm just some guy... you know?

User avatar
Korben_Dalls
Posts: 8
Joined: Fri Aug 07, 2015 3:10 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by Korben_Dalls » Mon Aug 17, 2015 11:02 am

I played around with my governor settings a bit and here's what I'm seeing now with my clock floor set to 800 Mhz:

Code: Select all

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       198593 iterations per second
PBKDF2-sha256     128501 iterations per second
PBKDF2-sha512      38325 iterations per second
PBKDF2-ripemd160  184608 iterations per second
PBKDF2-whirlpool   31356 iterations per second
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b   429.0 MiB/s   413.0 MiB/s
 serpent-cbc   128b    36.6 MiB/s    38.6 MiB/s
 twofish-cbc   128b    49.0 MiB/s    49.5 MiB/s
     aes-cbc   256b   397.1 MiB/s   394.1 MiB/s
 serpent-cbc   256b    38.1 MiB/s    39.0 MiB/s
 twofish-cbc   256b    49.3 MiB/s    49.8 MiB/s
     aes-xts   256b    50.7 MiB/s    45.1 MiB/s
 serpent-xts   256b    38.1 MiB/s    38.3 MiB/s
 twofish-xts   256b    50.0 MiB/s    49.5 MiB/s
     aes-xts   512b    41.1 MiB/s    37.3 MiB/s
 serpent-xts   512b    38.3 MiB/s    38.3 MiB/s
 twofish-xts   512b    50.2 MiB/s    49.8 MiB/s
Thanks again for the tip!

- Korben
I'm just some guy... you know?

Catscrash
Posts: 39
Joined: Tue Mar 26, 2013 9:45 pm
languages_spoken: english, german
ODROIDs: Odroid U2
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by Catscrash » Tue Jan 12, 2016 5:36 am

Hi,

I must've done something wrong when building my kernel, I used a 4.4 mainline with the default configuration from https://github.com/tobetter/linux, and I'm only getting

Code: Select all

root@odroid:~# sudo cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1        68624 iterations per second
PBKDF2-sha256      47836 iterations per second
PBKDF2-sha512      21991 iterations per second
PBKDF2-ripemd160   63627 iterations per second
PBKDF2-whirlpool    5336 iterations per second
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b    16.4 MiB/s    17.8 MiB/s
 serpent-cbc   128b     9.5 MiB/s    10.7 MiB/s
 twofish-cbc   128b    15.3 MiB/s    16.6 MiB/s
     aes-cbc   256b    13.2 MiB/s    14.0 MiB/s
 serpent-cbc   256b     9.5 MiB/s    10.6 MiB/s
 twofish-cbc   256b    15.4 MiB/s    16.6 MiB/s
     aes-xts   256b    17.6 MiB/s    17.5 MiB/s
 serpent-xts   256b     9.8 MiB/s    10.4 MiB/s
 twofish-xts   256b    16.1 MiB/s    16.0 MiB/s
     aes-xts   512b    13.9 MiB/s    13.7 MiB/s
 serpent-xts   512b     9.9 MiB/s    10.6 MiB/s
 twofish-xts   512b    16.2 MiB/s    16.0 MiB/s

any idea why that might be?

Thanks!

Catscrash
Posts: 39
Joined: Tue Mar 26, 2013 9:45 pm
languages_spoken: english, german
ODROIDs: Odroid U2
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by Catscrash » Tue Jan 12, 2016 4:48 pm

I have double-checked and CONFIG_HW_RANDOM_EXYNOS is enabled, is there anything else that needs to be enabled? With the standard image I can't run the benchmark since modules are missing - I'm guessing you must have a different kernel as well?

mad_tom
Posts: 1
Joined: Tue Jan 12, 2016 5:21 pm
languages_spoken: english
ODROIDs: Odroid xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by mad_tom » Tue Jan 12, 2016 5:34 pm

Hi, i came here, since Catscrash posted something here.

thats my output

Code: Select all

odroid@odroidNAS:~$ sudo cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1        67216 iterations per second
PBKDF2-sha256      48188 iterations per second
PBKDF2-sha512      21918 iterations per second
PBKDF2-ripemd160   63627 iterations per second
PBKDF2-whirlpool    5328 iterations per second
Required kernel crypto interface not available.
Ensure you have algif_skcipher kernel module loaded.
one time this happens:

Code: Select all

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       131730 iterations per second
i have no idea how to set govenor to performance on 4.4. so i think it works with ondemand.
looks like its the same speed like your system, did you change the governor?
While i installed cryptsetup, i got this:

Code: Select all

update-initramfs: Generating /boot/initrd.img-3.10.92
so, i think i can't help you

christian667
Posts: 5
Joined: Fri Feb 03, 2017 8:26 am
languages_spoken: english german
ODROIDs: xu4 c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by christian667 » Fri Feb 03, 2017 8:45 am

Hi there,

I recently got my xu4 and made some benchmarks with an external usb3 drive.. it was really ugly when it came to the encryption permformance:

My c1+ had ~30MByte/s aes-xts-256 encryption speed with an usb2 drive, new drive new odroid and the xu4 came out with <20MB/s..
Thanks to you guys I didn't give up, compiled the kernel found here:
http://odroid.com/dokuwiki/doku.php?id= ... ing_kernel

(c1+ is running archlinux, xu4 runs the official android 16.04)

I choose the newest 4.8 branch of the kernel fork and added some crypto parts for dm_crypt (https://wiki.gentoo.org/wiki/Dm-crypt/de) and the performance made a jump up to ~57MByte/s. This post here http://forum.odroid.com/viewtopic.php?f=77&t=3951 made me curiuos, I checked all compiled modules and realized not all of them where loaded (maybe not needed or compatible, but aes_arm sounded important ;) ) After some testing and a look into /lib/modules/4.8.0+/kernel/arch/arm/crypto/ I found those quite usefull:

Code: Select all

aes-arm-bs
aes-arm
sha1-arm-neon
sha1-arm
sha256-arm
sha512-arm
..added them to startup in rc.local:

Code: Select all

modprobe aes-arm-bs
modprobe aes-arm
modprobe sha1-arm-neon
modprobe sha1-arm
modprobe sha256-arm
modprobe sha512-arm
(I'm grateful for any better solution as initramfs seems to be ignored..)
Now take a look at my not that bad benchmark:

Code: Select all

# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       278876 iterations per second
PBKDF2-sha256     187245 iterations per second
PBKDF2-sha512     121362 iterations per second
PBKDF2-ripemd160  236165 iterations per second
PBKDF2-whirlpool   28248 iterations per second
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b    70.3 MiB/s    87.3 MiB/s
 serpent-cbc   128b    40.4 MiB/s    41.2 MiB/s
 twofish-cbc   128b    56.3 MiB/s    59.7 MiB/s
     aes-cbc   256b    53.6 MiB/s    68.6 MiB/s
 serpent-cbc   256b    40.4 MiB/s    41.2 MiB/s
 twofish-cbc   256b    56.3 MiB/s    59.6 MiB/s
     aes-xts   256b    94.4 MiB/s    86.0 MiB/s
 serpent-xts   256b    40.5 MiB/s    40.9 MiB/s
 twofish-xts   256b    57.9 MiB/s    59.1 MiB/s
     aes-xts   512b    75.5 MiB/s    67.6 MiB/s
 serpent-xts   512b    40.5 MiB/s    40.9 MiB/s
 twofish-xts   512b    57.5 MiB/s    58.8 MiB/s

Code: Select all

dd if=/dev/zero of=/crypt/testfile bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 16.976 s, 63.3 MB/s
Same test without encrpytion showed a writespeed at about ~80MB/s.

elatllat
Posts: 1627
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 26 times
Been thanked: 84 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by elatllat » Tue Jun 13, 2017 6:44 pm

66.6 MiB/s is about USB2 speed. The Up1 ($89) can do 221.2 MiB/s (666.1 MiB/s for the up^2), so I hope the upcoming 2 Odroid boards stay competitive and include hardware accelerated encryption.

BTW I managed to get 68.7 after

Code: Select all

find /lib/modules/$(uname -r) -type f -name \*.ko | grep -P "aes|sha" | perl -pe 's/.*\//modprobe /g;s/\.ko/;/g' | bash
Last edited by elatllat on Mon Jun 19, 2017 10:28 pm, edited 2 times in total.

User avatar
meveric
Posts: 10638
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 25 times
Been thanked: 193 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by meveric » Tue Jun 13, 2017 7:25 pm

christian667 wrote:

Code: Select all

     aes-xts   512b    75.5 MiB/s    67.6 MiB/s
It seems a little bit faster than what you pointed out.

The UP board is not an ARM board but an Intel x86 board.
Also the UP board SUCKS when it comes to I/O, means, what does it matter that it can encrypt with over 200MiB/sec, if the storage doesn't even deliver that much? It seems to be limited to USB 2.0 speed maybe even way less.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

elatllat
Posts: 1627
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 26 times
Been thanked: 84 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by elatllat » Tue Jun 13, 2017 7:59 pm

meveric wrote: [up] seems to be limited to USB 2.0 speed maybe even way less.
the specs say usb3(otg) for up1 and usb3(a) for up2, I'll see if I can find a usb benchmark...

elatllat
Posts: 1627
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 26 times
Been thanked: 84 times
Contact:

Re: XU4 / cryptsetup benchmark results

Unread post by elatllat » Wed Jun 21, 2017 10:47 pm

I wonder if one of these requirements are not met;

Code: Select all

> cat ./Documentation/devicetree/bindings/crypto/samsung-sss.txt
Samsung SoC SSS (Security SubSystem) module

The SSS module in S5PV210 SoC supports the following:
-- Feeder (FeedCtrl)
-- Advanced Encryption Standard (AES)
-- Data Encryption Standard (DES)/3DES
-- Public Key Accelerator (PKA)
-- SHA-1/SHA-256/MD5/HMAC (SHA-1/SHA-256/MD5)/PRNG
-- PRNG: Pseudo Random Number Generator

The SSS module in Exynos4 (Exynos4210) and
Exynos5 (Exynos5420 and Exynos5250) SoCs
supports the following also:
-- ARCFOUR (ARC4)
-- True Random Number Generator (TRNG)
-- Secure Key Manager

Required properties:

- compatible : Should contain entries for this and backward compatible
  SSS versions:
  - "samsung,s5pv210-secss" for S5PV210 SoC.
  - "samsung,exynos4210-secss" for Exynos4210, Exynos4212, Exynos4412, Exynos5250,
		Exynos5260 and Exynos5420 SoCs.
- reg : Offset and length of the register set for the module
- interrupts : interrupt specifiers of SSS module interrupts (one feed
		control interrupt).

- clocks : list of clock phandle and specifier pairs for all clocks  listed in
		clock-names property.
- clock-names : list of device clock input names; should contain one entry
		"secss".

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests