From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E288C388F9 for ; Wed, 11 Nov 2020 12:40:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5901C20659 for ; Wed, 11 Nov 2020 12:40:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W4mom3FF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5901C20659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcpQK-0004QX-21 for qemu-devel@archiver.kernel.org; Wed, 11 Nov 2020 07:40:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcpOU-0003D0-Mo for qemu-devel@nongnu.org; Wed, 11 Nov 2020 07:38:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kcpOR-0007my-1P for qemu-devel@nongnu.org; Wed, 11 Nov 2020 07:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605098309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FoSZStS9KrzSAcpwfKbSGuZmBATdGECBeQe8KyizGMA=; b=W4mom3FFA6TzO2AVDecmll+PCKOmgrG+goRf/yZNi6Q9OrSLbEwM0pndW4traoj3vboWJ+ Ufi+OLAEcPsQ/4sYGv8cGlvLvNlD9QKuCStHCjpnN+HYwcCp9hvs36sDwHKjxbJhalSHpE AncaBo5LLxvAO6PWeCLGpzRIAo/0HkE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-dOi0dEM9MXK7j-bdDKjRoA-1; Wed, 11 Nov 2020 07:38:27 -0500 X-MC-Unique: dOi0dEM9MXK7j-bdDKjRoA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 085A1186DD4F; Wed, 11 Nov 2020 12:38:26 +0000 (UTC) Received: from gondolin (ovpn-113-72.ams2.redhat.com [10.36.113.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C4701A925; Wed, 11 Nov 2020 12:38:18 +0000 (UTC) Date: Wed, 11 Nov 2020 13:38:15 +0100 From: Cornelia Huck To: Michael Mueller Subject: Re: [PATCH 1/1] virtio-blk-ccw: tweak the default for num_queues Message-ID: <20201111133815.10b8f3b7.cohuck@redhat.com> In-Reply-To: References: <20201109154831.20779-1-pasic@linux.ibm.com> <20201109170616.6875f610.cohuck@redhat.com> <20201109195303.459f6fba.pasic@linux.ibm.com> <4a3d24e0-399f-f509-9a5c-c66c57b2d28a@linux.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=216.205.24.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/11 01:49:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Hildenbrand , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 11 Nov 2020 13:26:11 +0100 Michael Mueller wrote: > On 10.11.20 15:16, Michael Mueller wrote: > >=20 > >=20 > > On 09.11.20 19:53, Halil Pasic wrote: =20 > >> On Mon, 9 Nov 2020 17:06:16 +0100 > >> Cornelia Huck wrote: > >> =20 > >>>> @@ -20,6 +21,11 @@ static void=20 > >>>> virtio_ccw_blk_realize(VirtioCcwDevice *ccw_dev, Error **errp) > >>>> =C2=A0 { > >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VirtIOBlkCcw *dev =3D VIRTIO_BLK_CCW(= ccw_dev); > >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DeviceState *vdev =3D DEVICE(&dev->vd= ev); > >>>> +=C2=A0=C2=A0=C2=A0 VirtIOBlkConf *conf =3D &dev->vdev.conf; > >>>> + > >>>> +=C2=A0=C2=A0=C2=A0 if (conf->num_queues =3D=3D VIRTIO_BLK_AUTO_NUM_= QUEUES) { > >>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 conf->num_queues =3D MIN= (4, current_machine->smp.cpus); > >>>> +=C2=A0=C2=A0=C2=A0 } =20 > >>> > >>> I would like to have a comment explaining the numbers here, however. > >>> > >>> virtio-pci has a pretty good explanation (use 1:1 for vqs:vcpus if > >>> possible, apply some other capping). 4 seems to be a bit arbitrary > >>> without explanation, although I'm sure you did some measurements :) = =20 > >> > >> Frankly, I don't have any measurements yet. For the secure case, > >> I think Mimu has assessed the impact of multiqueue, hence adding Mimu = to > >> the cc list. @Mimu can you help us out. > >> > >> Regarding the normal non-protected VMs I'm in a middle of producing so= me > >> measurement data. This was admittedly a bit rushed because of where we > >> are in the cycle. Sorry to disappoint you. =20 > >=20 > > I'm talking with the perf team tomorrow. They have done some=20 > > measurements with multiqueue for PV guests and I asked for a comparison= =20 > > to non PV guests as well. =20 >=20 > The perf team has performed measurements for us that show that a *PV > KVM guest* benefits in terms of throughput for random read, random write > and sequential read (no difference for sequential write) by a multi > queue setup. CPU cost are reduced as well due to reduced spinlock > contention. Just to be clear, that was with 4 queues? >=20 > For a *standard KVM guest* it currently has no throughput effect. No > benefit and no harm. I have asked them to finalize their measurements > by comparing the CPU cost as well. I will receive that information on=20 > Friday. Thank you for checking! >=20 > Michael >=20 >=20 > >=20 > > Michael > > =20 > >> > >> The number 4 was suggested by Christian, maybe Christian does have som= e > >> readily available measurement data for the normal VM case. @Christian: > >> can you help me out? > >> > >> Regards, > >> Halil > >> =20 > > =20 >=20 >=20