qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Qemu-devel] ridiculously slow VM memory performance on Ryzen CPU
Date: Wed, 25 Apr 2018 21:33:48 +0800	[thread overview]
Message-ID: <42c2c567-8bca-69db-c27d-6e0af4f0e20d@gmx.com> (raw)
In-Reply-To: <20180425131833.GK30024@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]



On 2018年04月25日 21:18, Daniel P. Berrangé wrote:
> On Wed, Apr 25, 2018 at 05:48:42PM +0800, Qu Wenruo wrote:
>> Hi,
>>
>> When testing IO heavy work on my VM backed by Ryzen 1700 CPU, I turned
>> to brd modules, but surprisingly, the speed is even slower than some HDD:
>>
>> ---
>> $ sudo modprobe brd rd_nr=1 rd_size=1048576
>> $ dd if=/dev/zero of=/dev/ram0 bs=1M count=1024
>> 1024+0 records in
>> 1024+0 records out
>> 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 9.9928 s, 107 MB/s
>> ---
>> 107MB is pretty lame...
>> Even some HDD could be faster than this.
> 
> You are sure that QEMU is actually using KVM, and not TCG emulation
> mode, as that could account for such terrible numbers. The QEMU
> argv would confirm this or can query it live with
> 
>    virsh qemu-monitor-command --hmp $GUESTNAME "info kvm"
> 
>> On host, it's much better:
>> ---
>> $ if=/dev/zero of=/dev/ram0 bs=1M count=1024
>> 1024+0 records in
>> 1024+0 records out
>> 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.754641 s, 1.4 GB/s
>> ---
>>
>> For host hardware:
>> CPU: Ryzen 1700 All cores @ 3.8G
>> Mem: DDR4 2400 dual channel (8G x 2)
>>
>> For host software:
>> Kernel:       4.16.3-1-ARCH
>> Qemu:         2.11.1-2
>> Distribution: Archlinux
>>
>> VM setup is mostly default setup done by libvirt.
> 
> Ideally please share the guest XML description from 'virsh dumpxml $GUESTNAME'
> and the corresponding QEMU argv from /var/log/libvirt/qemu/$GUESTNAME.log

It turns out that my debugging config (KASAN + lockdep, maybe something
else) is causing the problem.

With lockdep only, the guest degrades to about 50% of host memory
performance.
With lockde + KASAN, only 10% of host.

So, in short, I'm just an idiot.
Sorry for the trouble.

Thanks,
Qu

> 
> Regards,
> Daniel
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2018-04-25 13:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25  9:48 [Qemu-devel] ridiculously slow VM memory performance on Ryzen CPU Qu Wenruo
2018-04-25 13:18 ` Daniel P. Berrangé
2018-04-25 13:33   ` Qu Wenruo [this message]

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=42c2c567-8bca-69db-c27d-6e0af4f0e20d@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=berrange@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).