Received: by 10.192.165.148 with SMTP id m20csp694166imm; Wed, 25 Apr 2018 06:19:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/PWH2nADQ3bAjg2HWwAJsVwFTXO7SrKx/qsVcxRIaMeT2yeCiFb5fmCv2EMtFH26RI2bPb X-Received: by 10.98.8.12 with SMTP id c12mr28124625pfd.77.1524662399839; Wed, 25 Apr 2018 06:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524662399; cv=none; d=google.com; s=arc-20160816; b=fsSpIo2rwe90xGG2fecn/GfaUmxcfMXNYpj3+Z9fwITrmj3+Qd0/VuJFsNHkYqqh/v RBcSsVp76p8Fwk7gDlxrKkjqrSZiSr4azC1ik0mr/ZyMGJL7FfzKBeW+x6uQan0J3/m+ tuRbF8db8RdHvoVpSjhQ34BRbYnYXKxKd+6pNI3N+VpO6q0SBtNCZzoDNG1wLME8eX8x R47+sMirV98t8uiRIzO73Ai/+4tl+c6i5ORHBqpJpe1+08x73WCFX3N6OEG4UMe4TbqO Krc4TmjOUJANePhQpswESd/mw21V+GYwzG7UKAbcytBestyHn4Z1yBU4dwcsfIhndZXn bZ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:arc-authentication-results; bh=bxQcBYlu7YliAhbf/HpFKbN49gB+F8qYSlZF+JEvx0s=; b=Vqg2x9XkcjtSMQ4tYYaye4FbJYgAYWcF3MPYTsa2ip3lskUBSamzacrSKiC7I6wk95 t0qkLZJu8kmRLAQMIknGfEKrEJNivMD/Or26gA6X1tLzTx/kszLCqpmzazA0nfnrdJc7 kkZK8/76vzK6dg3Wjh48A7zfHrOuBoyHLG4hEi48UGNA3m7tvluPIhqU5Ku0euQk9aof w/Zlouv4rYK9jnkt08ZaaK0OgAtwLqwta2LG5UaPJRMAVzRNeZpYgHfqAODTsBguIY5s 7yjMrCwkjld8OibIXQidWpZIVEchaAIeh/NQfIxLWJHOqMhdNbyxUOQnpjrBhwJPIS1U N1pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si16133521pfj.302.2018.04.25.06.19.44; Wed, 25 Apr 2018 06:19:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753885AbeDYNSi (ORCPT + 99 others); Wed, 25 Apr 2018 09:18:38 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752829AbeDYNSg (ORCPT ); Wed, 25 Apr 2018 09:18:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6955C406F88F; Wed, 25 Apr 2018 13:18:36 +0000 (UTC) Received: from redhat.com (unknown [10.33.36.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9C63202698A; Wed, 25 Apr 2018 13:18:35 +0000 (UTC) Date: Wed, 25 Apr 2018 14:18:33 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Qu Wenruo Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Linux Kernel Mailing List Subject: Re: [Qemu-devel] ridiculously slow VM memory performance on Ryzen CPU Message-ID: <20180425131833.GK30024@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 25 Apr 2018 13:18:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 25 Apr 2018 13:18:36 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'berrange@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|