Re: newbie: Speed of loop-aes
Gisle Sælensminde <[email protected]>
| Newsgroups | gmane.linux.cryptography |
|---|---|
| Message-ID | <[email protected]> |
Markus Huehnerbein wrote: > Hi List, > > I did some performance tests using the benchmark bonnie++ to evaluate > different disk encryption possibilities. The results regarding loop-aes > are a bit strange for my understanding. I ran the tests on a notebook > with Debian Etch, 1GB RAM and a Linux 2.6.22.2 Kernel. > > Bonnie was startet with the following parameters: > bonnie++ -b -u root -s 4000 > > As a result loop-aes has a sequential input (block) of 29127 K/sec where > the sequential input with no encryption is 25123 K/sec. The same with > sequential output (block) (loop-aes: 27633 K/sec and no encryption: > 24267 K/sec). > > What I don't understand is how encrypted reads and writes per block > could be faster as plaintext reads / writes? Any comments are welcome! > > Now I know very little about the bonnie++ benchmark, but it says that 4MB is way to little to show anything. Factors like caching and process overhead (which benchmark did you run first?) and other similar factors will dominate. Try with at least 4GB. Since the bonnie program test for database-like access according to it's website, it will probably not make much sense before you test it with file sizes significantly larger than the main memory. If you have not set hdparm, sometimes DMA is not used by the kernel. This is the safest on some buggy (but common) mainboards, and may be the default on your system. If this is set, non-encrypted writing will be much slower than it need to be. Read the manual page for hdparm. With DMA enabled, the null cipher (that is no encryption) can be as slow as an encrypted filesystem, because what slows things down is that the block has to be copied into RAM. > Kind regards, > Markus > > P.S.: The bonnie++ output: > LOOP-AES: > ------Sequential Output------ --Sequential Input- --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP > 4000M 18554 59 27633 7 13696 3 18922 77 29127 4 102.3 0 > > NO ENCRYPTION: > ------Sequential Output------ --Sequential Input- --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- > Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP > 4000M 24085 77 24267 6 11978 3 24825 75 25123 3 103.9 0 > > > - > Linux-crypto: cryptography in and on the Linux system > Archive: http://mail.nl.linux.org/linux-crypto/ > > - Linux-crypto: cryptography in and on the Linux system Archive: http://mail.nl.linux.org/linux-crypto/