From: Brian Rak <brak@gameservers.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Server 2012R2 guest poor performance
Date: Mon, 15 Dec 2014 17:44:53 -0500 [thread overview]
Message-ID: <548F6465.8080706@gameservers.com> (raw)
I'm trying to track down some CPU usage issues we're having with some
virtual machines. Basically, when we run our application under KVM, we
see about 2x the CPU usage that we would see if we were running it on
bare metal.
kvm_stat shows me the following:
efer_reload 0 0
exits 120145461 54146
fpu_reload 23548805 10735
halt_exits 21716863 9688
halt_wakeup 21674988 9696
host_state_reload 30264874 14106
hypercalls 0 0
insn_emulation 4459351 2087
insn_emulation_fail 0 0
invlpg 0 0
io_exits 8608533 4178
irq_exits 4170903 1026
irq_injections 32551242 15819
irq_window 7779935 5332
I'm trying to figure out why I'm seeing such high numbers for VM exits,
but I haven't been able to track down the cause yet.
If I do:
# echo 1 >/sys/kernel/debug/tracing/events/kvm/enable; cat
/sys/kernel/debug/tracing/trace_pipe | head -100000 > trace.log ; echo 0
>/sys/kernel/debug/tracing/events/kvm/enable
# cat trace.log | grep kvm_exit | awk '{print $7}' | sort | uniq -c
4518 EXCEPTION_NMI
427 EXTERNAL_INTERRUPT
4048 HLT
1870 IO_INSTRUCTION
6819 MSR_WRITE
188 PAUSE_INSTRUCTION
1756 PENDING_INTERRUPT
1775 TPR_BELOW_THRESHOLD
I've uploaded a copy of the trace log to
https://dl.dropboxusercontent.com/u/50986796/trace.log.gz
What is causing the MSR_WRITE exits? Is there anything I can do to
optimize this?
I'm running:
qemu 2.2.0
'-cpu Haswell,+invtsc,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1000
-no-hpet'
virtio storage + network
Is there anything else that I can do to make this run more efficiently?
reply other threads:[~2014-12-15 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=548F6465.8080706@gameservers.com \
--to=brak@gameservers.com \
--cc=qemu-devel@nongnu.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.