Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4285322imm; Mon, 15 Oct 2018 12:06:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV61kXLIjLLNSF954lZzIXD3K0fBT2gFjP2K2fCz/sVnkFfjAENmgHzRAupU83MldeoxjeSJJ X-Received: by 2002:a63:e04d:: with SMTP id n13-v6mr17447564pgj.426.1539630377102; Mon, 15 Oct 2018 12:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539630377; cv=none; d=google.com; s=arc-20160816; b=pLB7aVd77gZuTo/Rio/ZEx33DIS2as3wVzHkVCJFh8cS7gnazbkqBQrZ+ID9H/wAn/ HavQIO3HAVX4D51lN6WVRf4YPQTzHVJlbCs5Cb7v/cYyvW0ECjGZyYjcDmOCaJgUryLL DP3bqAN8q+wTFSaL9Xl/YbtgDN8rnh766e8+EPiNCt2tEvple4XoTr5SbQjvcOXIdk70 K+aYtTqwbAh3BVD6Y6YGI4OToVJ3rWD0ToYFXstA2NOwT5ANRRfVmALxju6xOrYCeaPQ wIJ33QJIh9gh+MjD+uOB0F1FzfL6i7gnDGIFTBI+VjtQNWX1qkFVLo+hN9YF0o3dXdBY msbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fVvKHqAlZWT80+VnJu7ThyJEkjQjxxWSLABX2vx/gF8=; b=iH9aWoA9IXmtZfd3GoGPRWKUQIbZhel4lXgLzCQ6X1G2kk6yRthzUp+PUB8fE/kdGs KxJHZYrdPOTlWHKylh/Ve8L+1lXD0mgD0PmCMo5RFTGq5aYEjemJmhJPH5IOBnVN/J0+ 8t5iZ6E80J25gdh6nA8y/Of+iv2dJ5L4W4eaccO2TgI8f85c4g25qy4UdyizZM7bgc9L WH2k9kXgq5k4pYn9J3HwkLqTdeZtrtB6k3323nxsFLp2SLIRAF5ZYoSwonACv6wezFOT prznzorQCK3bZ3yI+xKv1SIB8co45RAg3S3TzZho2F5zsMhDqrZzvsJxJa008NYYjZme SR0A== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si11020533plt.4.2018.10.15.12.06.00; Mon, 15 Oct 2018 12:06:17 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbeJPCui (ORCPT + 99 others); Mon, 15 Oct 2018 22:50:38 -0400 Received: from mslow2.mail.gandi.net ([217.70.178.242]:41910 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726654AbeJPCui (ORCPT ); Mon, 15 Oct 2018 22:50:38 -0400 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 921473A2903; Mon, 15 Oct 2018 20:51:18 +0200 (CEST) X-Originating-IP: 212.92.120.238 Received: from localhost (unknown [212.92.120.238]) (Authenticated sender: amit@amitshah.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id E5E59FF802; Mon, 15 Oct 2018 18:51:15 +0000 (UTC) Date: Mon, 15 Oct 2018 20:51:15 +0200 From: Amit Shah To: Feng Li Cc: dgilbert@redhat.com, amit@kernel.org, virtualization@lists.linux-foundation.org, linux-kernel , qemu-discuss@nongnu.org, qemu-devel@nongnu.org, "linux-scsi@vger.kernel.org" Subject: Re: [Qemu-devel] virtio-console downgrade the virtio-pci-blk performance Message-ID: <20181015185115.GA3247@grmbl.mre> References: <20181001114146.GA2508@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (Thu) 11 Oct 2018 [18:15:41], Feng Li wrote: > Add Amit Shah. > > After some tests, we found: > - the virtio serial port number is inversely proportional to the iSCSI > virtio-blk-pci performance. > If we set the virio-serial ports to 2(" type='virtio-serial' index='0' ports='2'/>), the performance downgrade > is minimal. If you use multiple virtio-net (or blk) devices -- just register, not necessarily use -- does that also bring the performance down? I suspect it's the number of interrupts that get allocated for the ports. Also, could you check if MSI is enabled? Can you try with and without? Can you also reproduce if you have multiple virtio-serial controllers with 2 ports each (totalling up to whatever number that reproduces the issue). Amit > > - use local disk/ram disk as virtio-blk-pci disk, the performance > downgrade is still obvious. > > > Could anyone give some help about this issue? > > Feng Li 于2018年10月1日周一 下午10:58写道: > > > > Hi Dave, > > My comments are in-line. > > > > Dr. David Alan Gilbert 于2018年10月1日周一 下午7:41写道: > > > > > > * Feng Li (lifeng1519@gmail.com) wrote: > > > > Hi, > > > > I found an obvious performance downgrade when virtio-console combined > > > > with virtio-pci-blk. > > > > > > > > This phenomenon exists in nearly all Qemu versions and all Linux > > > > (CentOS7, Fedora 28, Ubuntu 18.04) distros. > > > > > > > > This is a disk cmd: > > > > -drive file=iscsi://127.0.0.1:3260/iqn.2016-02.com.test:system:fl-iscsi/1,format=raw,if=none,id=drive-virtio-disk0,cache=none,aio=native > > > > -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on > > > > > > > > If I add "-device > > > > virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 ", the virtio > > > > disk 4k iops (randread/randwrite) would downgrade from 60k to 40k. > > > > > > > > In VM, if I rmmod virtio-console, the performance will back to normal. > > > > > > > > Any idea about this issue? > > > > > > > > I don't know this is a qemu issue or kernel issue. > > > > > > It sounds odd; can you provide more details on: > > > a) The benchmark you're using. > > I'm using fio, the config is: > > [global] > > ioengine=libaio > > iodepth=128 > > runtime=120 > > time_based > > direct=1 > > > > [randread] > > stonewall > > bs=4k > > filename=/dev/vdb > > rw=randread > > > > > b) the host and the guest config (number of cpus etc) > > The qemu cmd is : /usr/libexec/qemu-kvm --device virtio-balloon -m 16G > > --enable-kvm -cpu host -smp 8 > > or qemu-system-x86_64 --device virtio-balloon -m 16G --enable-kvm -cpu > > host -smp 8 > > > > The result is the same. > > > > > c) Why are you running it with iscsi back to the same host - why not > > > just simplify the test back to a simple file? > > > > > > > Because my ISCSI target could supply a high IOPS performance. > > If using a slow disk, the performance downgrade would be not so obvious. > > It's easy to be seen, you could try it. > > > > > > > Dave > > > > > > > > > > > Thanks in advance. > > > > -- > > > > Thanks and Best Regards, > > > > Alex > > > > > > > -- > > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > > > > > > > -- > > Thanks and Best Regards, > > Feng Li(Alex) > > > > -- > Thanks and Best Regards, > Feng Li(Alex) Amit -- http://amitshah.net/