On Mon, Jun 02, 2008 at 02:51:04PM +0200, Milan Broz wrote:
> Patch for 2.6.24 kernel
> Add cond_resched() to prevent stuck in big bio processing.
This patch actual has lead to performance _gain_.
Test Result, performance gain:
aes-cbc-essiv:sha256, keysize 128: 2.53%
aes-xts-plain, keysize 256: 0.26%
aes-xts-plain, keysize 512: 9.31%
Test kernel:
AMD64 2.6.24 from Debian Etch-and-a-half
Test command:
# dd if=/dev/zero of=/dev/mapper/open_device bs=500M count=100
This would write 50G zero data to an open LUKS raw device (no
filesystem overhead here), as 500M per block. This will stress mainly
the cryptographic and dm code, with little overhead. During the test,
the CPU usage was always full, thus HD speed was not bottleneck.
The count is 10 times bigger than my initial plan. Any by doing this
I found that, on my server, all the encryption methods has triggered
soft lockup for at least one time. So this problem is universal, not
only with XTS or LRW operation mode.
With patched kernel, soft lockup _no longer_ occurred.
This server has 2G memory, Intel Xeon Duo @ 1.86GHz.
The command will be run for 3 times, and average speed of last two
runs will be taken as result score.
Device was synced (luksClose ; sync ; luksOpen) between tests.
With my test script (Makefile), calculation spreadsheet and raw test
result attached.
--
Li, Yan