Skip to contentSkip to conversation

XP installation speed: KVM vs Xen

DISCUSSION Andrew Olney 5 participants 9 messages Feb 27, 2007 – Feb 28, 2007 5 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

I haven't clocked it, but for KVM it takes longer than realtime (by the XP install clock) and with Xen it takes less than realtime.

I assume that this is all file I/O related, which raises the question:
what file system setup optimizes KVM I/O, e.g. qcow vs. raw?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 1172609205.6539.9.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#2 lore raw
Quoted 10 lines · On Tuesday 27 February 2007 17:46:45 Andrew Olney wrote:

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

I haven't clocked it, but for KVM it takes longer than realtime (by the XP install clock) and with Xen it takes less than realtime.

I assume that this is all file I/O related, which raises the question:
what file system setup optimizes KVM I/O, e.g. qcow vs. raw?

I experienced very slow graphic performance with kvm, could that be related too?

For example, graphic grub boot splash is very slow, as is any form of frame buffer boot in linux.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 200702272105.18311.ahasenack-y7mWNqJcIDpfJ/[email protected]

#4 lore raw
Quoted 14 lines · Andreas Hasenack
Quoted 11 lines · On Tuesday 27 February 2007 17:46:45 Andrew Olney wrote:

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

I haven't clocked it, but for KVM it takes longer than realtime (by the XP install clock) and with Xen it takes less than realtime.

I assume that this is all file I/O related, which raises the question:
what file system setup optimizes KVM I/O, e.g. qcow vs. raw?

Quoted 6 lines

I experienced very slow graphic performance with kvm, could that be related too?

For example, graphic grub boot splash is very slow, as is any form of frame buffer boot in linux.

Graphic grub boot is different from the rest of graphics and should not be any worse than Xen.

Regards,

Anthony Liguori

Quoted 11 lines

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#5 lore raw
In reply to a message not in the archive
Quoted 11 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

I haven't clocked it, but for KVM it takes longer than realtime (by the XP install clock) and with Xen it takes less than realtime.

I assume that this is all file I/O related, which raises the question:
what file system setup optimizes KVM I/O, e.g. qcow vs. raw?

Xen should outperform KVM wrt disk performance. Xen is based on QEMU 0.8.2 and has a ton of patches including one that aggressive reports IO completions to the host asynchronously.

KVM uses a version of QEMU that is significantly closer to mainline QEMU (almost no changes that aren't KVM related). Eventually, all of the KVM changes should make it into mainline QEMU whereas that probably will never happen with Xen.

QEMU only got asynchronous IO support in 0.9.0. Unfortunately, the implementation actually results in a regression in performance. Some hacks can fix it though.

Of course, the SCSI emulation in 0.9.0 improves performance by quite a lot (to the point where it's better than Xen). However, some work is needed to make SCSI disks bootable and to expose SCSI command line options.

Regards,

Anthony Liguori

Quoted 11 lines

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#6 lore raw
In reply to a message not in the archive
Quoted 11 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

I haven't clocked it, but for KVM it takes longer than realtime (by the XP install clock) and with Xen it takes less than realtime.

I assume that this is all file I/O related, which raises the question:
what file system setup optimizes KVM I/O, e.g. qcow vs. raw?

The best file format is not a file, but a raw partition or lvm volume. Second best is a raw partition that has been prewritten using dd.

Pinning kvm to a cpu may help; try prefixing the command with 'taskset 1'.

Please report you experiences, especially about the last hack, as it indicate a serious problem.

Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#7 lore raw
In reply to a message not in the archive
Quoted 5 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

btw, as both Xen and kvm use qemu, Xen full virtualization images should work without change in kvm.

Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 45E52AEE.6030107-atKUWr5tajBWk0Htik3J/[email protected]

#9 lore raw

I'd almost swear that KVM is faster with an XP raw image that was installed by Xen, than it is with a raw image installed by KVM.

Quoted 13 lines · Avi Kivity
Quoted 5 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

btw, as both Xen and kvm use qemu, Xen full virtualization images should work without change in kvm.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 1172679377.5261.38.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#11 lore raw
Quoted 4 lines · Andrew Olney

I'd almost swear that KVM is faster with an XP raw image that was installed by Xen, than it is with a raw image installed by KVM.

That may well be. Perhaps the images have different HALs.

Compare the values under My Computer | Properties | Hardware | Device Manager | Computer. Maybe one uses the "Standard PC" HAL (faster) and the other the ACPI HAL (slower). You can also change HALs (required reboot).

Quoted 18 lines · Avi Kivity
Quoted 15 lines
Quoted 6 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen (3.03 xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

btw, as both Xen and kvm use qemu, Xen full virtualization images should work without change in kvm.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 45E5B07A.3040700-atKUWr5tajBWk0Htik3J/[email protected]

#13 lore raw

The Xen installed image is "Standard PC". I erased the KVM installed image unfortunately, so I can't check that easily.

The KVM installed image did require the -no-acpi flag, and the Xen image does not, so that is consistent with your explanation: the Xen install is a faster, non-acpi HAL.

The speed difference is quite noticeable on a core 2 1.66

Quoted 27 lines · Avi Kivity
Quoted 4 lines · Andrew Olney

I'd almost swear that KVM is faster with an XP raw image that was installed by Xen, than it is with a raw image installed by KVM.

That may well be. Perhaps the images have different HALs.

Compare the values under My Computer | Properties | Hardware | Device Manager | Computer. Maybe one uses the "Standard PC" HAL (faster) and
the other the ACPI HAL (slower). You can also change HALs (required reboot).

Quoted 7 lines · Avi Kivity
Quoted 6 lines
Quoted 3 lines · Andrew Olney

I've been migrating from Xen to KVM for a wide variety of reasons.

I've noticed, however, that XP installs much much faster with Xen

(3.03

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

xen-image-xen0-2.6.17-6-generic-xen0 ubuntu) than with KVM (14).

btw, as both Xen and kvm use qemu, Xen full virtualization images

Quoted 14 lines

should

Quoted 7 lines
Quoted 5 lines

work without change in kvm.

Signature · 1 line
error compiling committee.c: too many arguments to function

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV