Full allocation painfully slow in encrypted directories

General support for problems installing or using Deluge
Post Reply
ayurchen

Full allocation painfully slow in encrypted directories

Post by ayurchen »

Hi

I'm running Ubuntu 9.10 Karmic / Deluge 1.1.9 and using ecryptfs-encrypted home directory over ext3 filesystem. It took more than 20 minutes to fully allocate 1.7Gb torrent with deluge. During this allocation seeking on hard drive was so extreme that I could barely move a pointer. On the other hand:

Code: Select all

alex@bulldog:~$ time dd if=/dev/zero of=./test bs=1M count=1700
1700+0 records in
1700+0 records out
1782579200 bytes (1.8 GB) copied, 132.534 s, 13.5 MB/s

real	2m12.601s
user	0m0.012s
sys	1m16.149s
And the system stays fairly responsive (to the extent an old single-core ThinkPad laptop can be).

It looks like sparse file allocation uses file access patterns that don't play nice with file encryption, at least the way it is implemented in ecryptfs. Sequential writing, however, is not affected by encryption at all. Will it be possible to have another preallocation method that would just sequentially write the file to disk, like with dd example above?
Post Reply