Increasing GELI performance

Fluffles etc at fluffles.net
Fri Jul 27 20:42:44 UTC 2007


Dominic Bishop wrote:
> Another problem I've found is that if I use a sector size for GELI > 8192
> bytes then I'm unable to newfs the encrypted partition afterwards, it fails
> immediately with this error:
>
> newfs /dev/da0p1.eli
> increasing block size from 16384 to fragment size (65536)
> /dev/da0p1.eli: 62499.9MB (127999872 sectors) block size 65536, fragment
> size 65536
>         using 5 cylinder groups of 14514.56MB, 232233 blks, 58112 inodes.
> newfs: can't read old UFS1 superblock: read error from block device: Invalid
> argument
>
> The underlying device is readable/writeable however as dd can read/write to
> it without any errors.
>   

Newfs will use 512-byte sectors by default so if you're using an 8KB 
sector size you need:

newfs -S 8192 /dev/da0p1.eli

To view the sector size you can also use diskinfo -v <device>. You can 
never write or read below the sector size (thats right, not even the 
filesystem can do that!)

I can't help you with your GELI question. I'm assuming you run a 
quadcore 1.6GHz Xeon CPU? It should give you more performance than 
50MB/s especially with 4 threads. On my Athlon 64 X2 3800+ (2x 2.0GHz 
512KB) i got around 100 i believe. Do know that AMD processors perform 
relatively better in AES than Intel's line of CPUs, but with a quadcore 
i would have expected at least 160MB/s of thoughput. Maybe you should 
try geli on the raw device? Like:

geli onetime da0
dd if=/dev/da0.eli of=/dev/null bs=1m count=1000
dd if=/dev/zero of=/dev/da0.eli bs=1m count=1000

It goes without saying that you should unmount and make sure no geom 
layer is using the da0 device.

Good luck!

- Veronica


More information about the freebsd-geom mailing list