Skip to contentSkip to conversation

Poor write- and overall performance

DISCUSSION Arne Kepp 4 participants 7 messages Dec 14, 2008 – Dec 20, 2008 KVM

lore
Share & tools
lore

Arne Kepp

author
#0 lore raw

Hi,

I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The guest is running straight from an LVM volume and is assigned 4 Gb RAM and 4 virtual CPUs.

KVM does well reading from disk (300 Mbyte/s according to IOZone, virtually the same as native) and computational tasks like OpenSSL signing. But writing ends up at 30 Mbyte/s (native does 150 Mbyte/s) and kernel compilation times are roughly double that of native. KVM 79 exhibited the same behavior for disk IO, but froze while compiling the kernel.

So, short of using the virtio drivers (which I think would require a custom kernel since RHEL 5.2 uses 2.6.18), are there any easy tweaks I should try to make KVM fare better ?

The host is quad core Intel with 8 Gb RAM and a SAS RAID 5 configuration. Let me know if you'd like to see the results here.

Sincerely,
-Arne

Signature · 3 lines
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers
#1 lore raw
Quoted 3 lines · Arne Kepp

Hi,

I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The guest is running straight from an LVM volume and is assigned 4 Gb RAM and 4 virtual CPUs.

I suggest trying scsi in kvm-81, or setting cache=writeback if you want to keep using IDE (but be aware of the potential for severe data loss with the latter option).

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#2 lore raw

mån 2008-12-15 klockan 08:38 +0200 skrev Avi Kivity:

Quoted 9 lines
Quoted 7 lines · Arne Kepp

Hi,

I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The guest is running straight from an LVM volume and is assigned 4 Gb RAM and 4 virtual CPUs.

Quoted 4 lines

I suggest trying scsi in kvm-81, or setting cache=writeback if you want to keep using IDE (but be aware of the potential for severe data loss with the latter option).

Now I haven't tried kvm-81 but scsi with 4GB of RAM or more is severely broken in QEMU for all other tested KVM versions (80 and downwards).

/Henrik Holst

#3 lore raw
Quoted 3 lines · Henrik Holst

Now I haven't tried kvm-81 but scsi with 4GB of RAM or more is severely broken in QEMU for all other tested KVM versions (80 and downwards).

kvm-81 contains this:

Quoted 5 lines

Add 40-bit DMA support to LSI scsi emulation (Ryan Harper)

This patch fixes Linux machines configured with > 4G of ram and
using a
SCSI device.

Which should fix the problem.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw

mån 2008-12-15 klockan 12:26 +0200 skrev Avi Kivity:

Quoted 8 lines
Quoted 3 lines · Henrik Holst

Now I haven't tried kvm-81 but scsi with 4GB of RAM or more is severely broken in QEMU for all other tested KVM versions (80 and downwards).

kvm-81 contains this:

Quoted 8 lines
Quoted 5 lines

Add 40-bit DMA support to LSI scsi emulation (Ryan Harper)

This patch fixes Linux machines configured with > 4G of ram and
using a
SCSI device.

Which should fix the problem.

Now this is good news indeed!

/Henrik Holst

author
#5 lore raw
In reply to Avi Kivity
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Arne Kepp

Hi,

I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The guest is running straight from an LVM volume and is assigned 4 Gb RAM and 4 virtual CPUs.

I suggest trying scsi in kvm-81, or setting cache=writeback if you want to keep using IDE (but be aware of the potential for severe data loss with the latter option).

Thanks for the tip. I tested with the SCSI driver and 81, unfortunately write performance was approximately the same as before.

Keep up the good work,
-Arne

Signature · 3 lines
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers
#6 lore raw
Quoted 10 lines · Arne Kepp
Quoted 9 lines · Avi Kivity
Quoted 7 lines · Arne Kepp

Hi,

I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The guest is running straight from an LVM volume and is assigned 4 Gb RAM and 4 virtual CPUs.

Quoted 7 lines
Quoted 4 lines

I suggest trying scsi in kvm-81, or setting cache=writeback if you want to keep using IDE (but be aware of the potential for severe data loss with the latter option).

Thanks for the tip. I tested with the SCSI driver and 81, unfortunately write performance was approximately the same as before.

Yeah, currently the scsi emulation doesn't queue up writes, rather it waits for each one to complete which means one cannot take advantage of the aio infrastructure. I'm currently working on fixing this; stay tuned.

Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]