qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences
@ 2010-02-08 13:46 Amit Shah
  2010-02-08 14:57 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 1 reply; 5+ messages in thread
From: Amit Shah @ 2010-02-08 13:46 UTC (permalink / raw)
  To: KVM List; +Cc: Marcelo Tosatti, qemu-devel

Hello,

In my testing of virtio-console, I found qemu-kvm.git introduces a lot
of overhead in thread scheduling compared to qemu.git.

My test sends a 260M file from the host to a guest via a virtio-console
port and then computes the sha1sum of the file on the host as well as on
the guest, compares the checksum and declares the result based on the
checksum match. The test passes in all the scenarios listed below,
indicating there's no unsafe data transfer.


Repo               Time taken
-----              ----------
qemu.git             < 1 m (typically 30s)
qemu-kvm.git         > 16m
qemu-iothread        ~ 5m


The guest remains the same in all cases.

I went back upto Oct 2009 in the git history to check if this was a
regression; it is not. The qemu-kvm.git results are reproducible on
qemu-kvm-0.12.git as well.

The slowdown with qemu-iothread was reproduced by virtio-net as well:
netperf results were better on qemu.git with iothread disabled than on
qemu.git with iothread enabled.


The virtio-console code currently puts only one buffer in the in_vq,
meaning the host can only transfer 4k at a time before a guest consumes
the data and makes the buffer available for subsequent transfers.
Increasing the number of buffers available to 128 though "fixes" this --
qemu-kvm.git performance is much better in this case.


I have some gprof results comparing qemu.git and qemu-kvm.git (30% of
time in qemu-kvm.git is spent in main_loop_wait()), which I'm still
analyzing and also going over the code paths that are different.

I just thought I'd put out the observations out here so that others who
have an idea can chime in or validate these results with other
workloads.

		Amit

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-09 19:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 13:46 [Qemu-devel] Slowdowns comparing qemu-kvm.git to qemu.git: vcpu/thread scheduling differences Amit Shah
2010-02-08 14:57 ` [Qemu-devel] " Anthony Liguori
2010-02-08 17:35   ` Amit Shah
2010-02-08 20:28     ` Anthony Liguori
2010-02-09 19:12       ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).