From: Jan Kiszka <jan.kiszka@web.de>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
kvm@vger.kernel.org, gleb@kernel.org, pbonzini@redhat.com,
abelg@il.ibm.com, nyh@il.ibm.com, oritw@il.ibm.com,
benami@il.ibm.com, muli@il.ibm.com
Subject: Re: nested KVM slower than QEMU with gnumach guest kernel
Date: Wed, 12 Nov 2014 00:42:52 +0100 [thread overview]
Message-ID: <54629EFC.1050307@web.de> (raw)
In-Reply-To: <20141111185515.GA16376@type.youpi.perso.aquilenet.fr>
[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]
On 2014-11-11 19:55, Samuel Thibault wrote:
> Hello,
>
> jenkins.debian.net is running inside a KVM VM, and it runs nested
> KVM guests for its installation attempts. This goes fine with Linux
> kernels, but it is extremely slow with gnumach kernels. I have
> reproduced the issue with my laptop with a linux 3.17 host kernel, a
> 3.16 L1-guest kernel, and an i7-2720QM CPU, with similar results; it's
> actually even slower than letting qemu emulate the CPU... For these
> tests I'm using the following image:
>
> http://people.debian.org/~sthibault/tmp/netinst.iso
>
> The reference test here boils down to running qemu -cdrom netinst.iso -m
> 512, choosing the "Automated install" choice, and waiting for "Loading
> additional components" step to complete. (yes, the boot menu gets
> mangled ATM, there's apparently currently a bug between qemu and grub)
>
> My host is A, my level1-KVM-guest is B.
>
> KVM:
> A$ qemu -enable-kvm -cdrom netinst.iso -m 512M
> takes ~1 minute.
>
> QEMU:
> A$ qemu -cdrom netinst.iso -m 512M
> takes ~7 minutes.
>
> KVM-in-KVM:
> B$ qemu -enable-kvm -cdrom netinst.iso -m 512M
> takes ~10 minutes, when it doesn't gets completely stuck, which is quite
> often, actually...
>
> QEMU-in-KVM:
> B$ qemu -cdrom netinst.iso -m 512M
> takes ~7 minutes.
>
> I don't see such horrible slowdown with a linux image. Is there
> something particular that could explain such a difference? What tools
> or counters could I use to investigate which area of KVM is getting
> slow?
You can try to catch a trace (ftrace) on the physical host.
I suspect the setup forces a lot of instruction emulation, either on L0
or L1. And that is slower than QEMU is KVM does not optimize like QEMU does.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-11-11 23:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 18:55 nested KVM slower than QEMU with gnumach guest kernel Samuel Thibault
2014-11-11 23:42 ` Jan Kiszka [this message]
2014-11-16 22:18 ` Samuel Thibault
2014-11-17 6:28 ` Jan Kiszka
2014-11-17 8:50 ` Samuel Thibault
2014-11-24 0:42 ` Samuel Thibault
2014-12-15 0:09 ` Samuel Thibault
2014-12-15 9:41 ` Paolo Bonzini
2014-11-17 8:58 ` Gleb Natapov
2014-11-17 9:03 ` Samuel Thibault
2014-11-17 9:04 ` Jan Kiszka
2014-11-17 9:10 ` Samuel Thibault
2014-11-17 9:21 ` Gleb Natapov
2014-11-17 9:37 ` Samuel Thibault
2014-11-17 9:38 ` Samuel Thibault
2014-11-23 21:50 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54629EFC.1050307@web.de \
--to=jan.kiszka@web.de \
--cc=abelg@il.ibm.com \
--cc=benami@il.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=nyh@il.ibm.com \
--cc=oritw@il.ibm.com \
--cc=pbonzini@redhat.com \
--cc=samuel.thibault@ens-lyon.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.