Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp151625imm; Mon, 1 Oct 2018 07:59:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV63eZ2Kv1bKmJCPW7ejpOjvbe9vQflZx4UGfh92fk741hlpudq5eTu5wxx8iOa32kVL8C2O2 X-Received: by 2002:a63:291:: with SMTP id 139-v6mr10291339pgc.365.1538405951848; Mon, 01 Oct 2018 07:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538405951; cv=none; d=google.com; s=arc-20160816; b=c4bLXzOxBOxe8FXTX5SlqEya2QWKAaEQ+zK183JWKJHzJA36NFA0ET3U1uTy6lZ/q3 o6eWIjAspVtupV6cR/sNYqKXCsV72RyA3JGDNybBaqh14XyLXvDmWVYert+awD3++0T6 guRHXPYFomjc5wB1E1oLWhOvtjfj8J7CY6hlLnao6LkrEcdpGPiwrB/YbdXFtbh64CON 2lxBy5UB53CORfUdPdnGViqgveN78m5nVuo9ol/u9FB0E9Y2CQ+qSmEArJXeZP5vktTg 2S2OlqDT3e2rTubO4djttE+HCCZnMLd3lWedJZllXiwlHU7RxrzMB65GoVYIRsYirqFC GO4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LfX5y/UenWFFDugMPSOvK602wZw/iRfKgOKWp0QWGtw=; b=r0e7Nqy2zACT3kdEY2o4n5RfhvgvsXWutI17CyiT/KvO92kpuQhpT+2I41ZlOUW+Hx tPNpwsVQ0nnCbflIsUI2x4Bst68gVFHqlcJk1p7i/+DDq+TYUtMbcSaiVsjTJp1OdJz4 ha5dgiO61VKtewP95ZHgt08lmWJih33lgnihz8Rq0sYkL2p/hCwLLo+PVkbjECSc6goX NY+Qo60F6kCh1Aurq8Kw7fdWBUfibjO6U32dGqz6LklcS4uS+pkQG1TpLPz3H0AfuhtG m2uiR+5we8DD4aHiK+kil0tWQhV076CVpRIZWRbHwnaj7cuAzd73YmM1Do3+3Kl6iaYc GmDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mZSeov/N"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185-v6si13355418pfl.134.2018.10.01.07.58.57; Mon, 01 Oct 2018 07:59:11 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mZSeov/N"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729504AbeJAVhE (ORCPT + 99 others); Mon, 1 Oct 2018 17:37:04 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:38322 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbeJAVhE (ORCPT ); Mon, 1 Oct 2018 17:37:04 -0400 Received: by mail-pf1-f177.google.com with SMTP id x17-v6so9410684pfh.5; Mon, 01 Oct 2018 07:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LfX5y/UenWFFDugMPSOvK602wZw/iRfKgOKWp0QWGtw=; b=mZSeov/NLwY3KZOvXpwgDlpxZO9zNdkzuPaphqkHFxJSZdqwk2HBNGjIGR8gTLBJGF tLbpT12/DkjyNUDbdifH/5SQzbqB4BRKVa3UFFKQnYUDXhkUdRA5Uf/uZ7cta3aocbV1 h8ugDS8z6xwgQrIn1pvsOsYwW4wa/bF0uZZ0kI9A5ap4LpU+9v96dR8Vf+tmT0uofvig ucLJcVucFC+ua78O5Yyh10HUdsKuugTsRHUYqSlVcxxmCf08U7B/b2hrsluhKdmB/oMK gWG1owC70JZd4EJJNCPCyjqOk8ACTC+tr9RjPAwPpf5TZpIfux540zMnkPoWZjrifVTS lj4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LfX5y/UenWFFDugMPSOvK602wZw/iRfKgOKWp0QWGtw=; b=MsxRk85zmXcRaG/8hFF4s+B/1RfIp2Fl6+0hWs90c0bVjjlgbe7vkVYWGuUIUq7wN+ +jZxd0DjDZoWdyr7ibsWo8jgBTesfW7mVM2/frTwMEcKcGcmhDw7+gbnKSVO0GdjTSH0 CC60TCd6xx57DPdi1b3cLamd0Tz8CEhj6WSdCzwP6FAcpA7UPsVmhdVyDiURIPla+vY6 2TZ7/69CAXKR6pBTXUkY/lVxC6+EFcwh6rL2gxg4RBPxeIROHUQ7bJg36R3Wz835+SfW DWMLgDkve2gU7xHK74b5v9A9bnwe6nW0oLES7V/xkhV30CbE0bJTXAUEhXgqTp8XZ2gf PLIw== X-Gm-Message-State: ABuFfojq8tTROuY3OSfZqJnmPNhLR6DlAqvWil+PobyYnUVPwW5ihX9o ruqHBH946fTQm+j02Ax50RrDRmyNPgnD4865AedUwKo5zfrWUQ== X-Received: by 2002:a62:2056:: with SMTP id g83-v6mr11922213pfg.165.1538405931087; Mon, 01 Oct 2018 07:58:51 -0700 (PDT) MIME-Version: 1.0 References: <20181001114146.GA2508@work-vm> In-Reply-To: <20181001114146.GA2508@work-vm> From: Feng Li Date: Mon, 1 Oct 2018 22:58:24 +0800 Message-ID: Subject: Re: [Qemu-devel] virtio-console downgrade the virtio-pci-blk performance To: dgilbert@redhat.com Cc: linux-kernel , qemu-discuss@nongnu.org, qemu-devel@nongnu.org, "linux-scsi@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, My comments are in-line. Dr. David Alan Gilbert =E4=BA=8E2018=E5=B9=B410=E6=9C= =881=E6=97=A5=E5=91=A8=E4=B8=80 =E4=B8=8B=E5=8D=887:41=E5=86=99=E9=81=93=EF= =BC=9A > > * 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=3Discsi://127.0.0.1:3260/iqn.2016-02.com.test:system:fl-isc= si/1,format=3Draw,if=3Dnone,id=3Ddrive-virtio-disk0,cache=3Dnone,aio=3Dnati= ve > > -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-= virtio-disk0,id=3Dvirtio-disk0,bootindex=3D1,write-cache=3Don > > > > If I add "-device > > virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x5 ", the vi= rtio > > 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=3Dlibaio iodepth=3D128 runtime=3D120 time_based direct=3D1 [randread] stonewall bs=3D4k filename=3D/dev/vdb rw=3Drandread > 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 --=20 Thanks and Best Regards, Feng Li(Alex)