Bug 461847 - lvm+luks eats cpu
lvm+luks eats cpu
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Zdenek Kabelac
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-10 17:54 EDT by Need Real Name
Modified: 2008-11-24 08:03 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-24 08:03:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2008-09-10 17:54:08 EDT
fedora rawhide install onto an msi wind u100, encrypted filesystem.

During a write to disk of an iso from a network drive using rsync I obtain a terrible transfer speed. Rsync says 2.5 megs a second. top shows a kcrypto eating cpu (>30%), i/o wait is low (<5%).
Comment 1 Milan Broz 2008-09-10 18:19:37 EDT
Sure - processor must encrypt all io. What's wrong with that?

Try some local big file copy - do you see better speed?
And rsync to unencrypted filesystem - what part os system causes this slowdown - network, encrypted fs, rsync, some combination?
Comment 2 Need Real Name 2008-09-11 16:00:20 EDT
> What's wrong with that?

The overhead of the encryption is so high that it is substantially limiting the speed of a copy from a network drive.

rsync was used only to determine the speed, i.e. this was not a checksum heavy operation.
Comment 3 Milan Broz 2008-09-11 16:14:48 EDT
Try another cipher.
If it is AES, be sure you use optimized kernel module. 

I cannot help here... the problem is then in speed of encryption process in kerenl crypto lib, maybe the processor need specific optimization (that's Atom right?)
Comment 4 Need Real Name 2008-09-11 16:22:37 EDT
Yep an Atom. MSI Wind U100.

What's the default cipher? I used that. Can I switch it live (i.e. is the cipher per block or file, or is it per partition?)
Comment 5 Zdenek Kabelac 2008-09-15 06:22:21 EDT
Could you please try to boot  with   nosmp  kernel boot parameter - to avoid usage of the second CPU - do you see any improvent in the transfer speed?
Comment 6 Need Real Name 2008-10-05 07:12:15 EDT
$ dd if=/dev/zero of=TEST bs=1k count=500k   # 524 megs

With smp: 60s, 8.6 MB/s
Without smp: 74s, 7.0 MB/s

Which is odd, because these are both significantly above the slow transfer speed I reported.

Before, I got the feeling that the ondemand governor wasn't allowing full use of the cpu. This time /proc/cpuinfo shows 1600 mhz (is this how to check?) so I guess the cpu isn't being kept scaled down any more.
Comment 7 Milan Broz 2008-11-24 08:03:34 EST
I think that run full encrypted systems on such configuration together with using network transfer must have high performance penalty.
Also Atom CPU probably need some special optimizations in kernel.

Anyway it is not lvm2 nor cryptsetup bug.

Note You need to log in before you can comment on or make changes to this bug.