Authentication with geom_eli

fluffles.net bsd at fluffles.net
Tue Jan 29 13:22:44 PST 2008


Cyrus Rahman wrote:
> Here are some timings related to different encryption and
> authentication algorithms.  Although the authentication involves extra
> copying and additional data being written to disk, it is clear the
> algorithm is also quite significant.
>
> The system is a quad processor Q6600 running at 2.4GHz with mid-range
> SATA disks.
>   

You method is testing seems wrong to me. DD is using blocking or
synchronous I/O (1 at a time, no parallelism), so your quadcore
processor will not be utilized fully. You should always check top and
gstat when benchmarking, to confirm there isn't an artifical bottleneck
somewhere.

You can use DD but you should not perform direct I/O but instead use the
UFS filesystem with enough read-ahead, example:

geli init ..
newfs -b 32768 /dev/blabla.eli
mount ..
dd if=/dev/zero of=/path/to/mount/zerofile.000 bs=1m count=4000

then you have measured write speed, for read speed you *NEED* to unmount
the volume first. This throws away the filecache, listed under "Inact"
in the top output. :
umount ..
mount ..
dd if=/path/to/mount/zerofile.000 of=/dev/null bs=1m

Then you have read speed. Also test with enough read ahead:
sysctl vfs.read_max=64
That will increase read ahead from 8 (default) to 64 blocks in my
example blocks of 32KB, but default is 16KB. Ofcourse before testing
this you should unmount again, or you'll get (partial) memory speed
results exceeding disk capability, such as below for "cached read". Also
make sure GELI is correctly configured to use all 4 cores:
sysctl kern.geom.eli.threads=0
(0 means one thread for each CPU core)

Confirm the load with top and see the throughput rise. :)



For comparison Core 2 Duo 3.0GHz (dual core):
tested using a malloc memory disk using mdconfig -a -t malloc -s 300m
tested under FreeBSD 7.0 RC1 GENERIC i386

GELI with two threads, UFS 32k throughput
read:
314572800 bytes transferred in 2.990616 secs (105186629 bytes/sec)
cached read:
314572800 bytes transferred in 0.134842 secs (2332896522 bytes/sec)
write:
314572800 bytes transferred in 2.788651 secs (112804650 bytes/sec)

GELI with one thread, UFS 32k throughput
read:
314572800 bytes transferred in 5.574472 secs (56430959 bytes/sec)
cached read:
314572800 bytes transferred in 0.137468 secs (2288337051 bytes/sec)
write:
314572800 bytes transferred in 4.984672 secs (63108023 bytes/sec)

Hope you found this interesting, i'm fond of benchmarking. :)
If you require any help or want more results be free to ask.

Fine regards,
Veronica



More information about the freebsd-geom mailing list