Odd disk speed limit with KVM when using encrypted disks and striped LVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi! I'm experimenting with KVM on my modest home server, and I ran
into a peculiar issue that I can't explain, so I'm now looking for
some insight.

The problem I see is that raw sequential disk read speed from within a
guest is somehow limited. I did some measurements and I don't really
understand the result.

My setup is as follows: Two SATA HDDs are set up with full disk
encryption (LUKS) and used as physical volumes in an LVM volume group.
On this VG I create a striped LV, and when measuring raw read speed on
this I get about 113MB/s. The decryption is handled by two threads,
each consuming about 50% of one CPU core. The raw disk speed for one
disk is around 60-70MB/s, so this is as expected.

When I instead connect these encrypted devices to a virtual machine
using virtio, and doing the same measurements, I get the same raw disk
speed when measuring only one disk, but when I measure on the striped
volume, I only get about half the speed I expect. I can still see that
the two kcryptd processes are running, but they now only consume about
25% CPU time each, and nothing else seem to be maxed out. The 'dd'
process on the guest is consuming 9% CPU, and the kvm process on the
host is using about 30% of one core.

All timing is measured like this: time dd </dev/vgfs/striped bs=256k
count=10000 >/dev/null

I'd be grateful for any insight, since it might help me understand
other bottlenecks I might stumble upon in the future. This disk speed
issue is not much of a problem really, but I think it's odd. Just tell
me if you want more details about the case.

// Anders
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux