Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2259281rdb; Fri, 8 Dec 2023 03:08:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqjZhCfOrJNP4mu2WLIqibeoxgn1+4swqr7LA/j09O9n33G3Y9HEDoWaVczB/+gql7axPQ X-Received: by 2002:a05:6a20:c1a6:b0:187:fbe3:b4d7 with SMTP id bg38-20020a056a20c1a600b00187fbe3b4d7mr3963669pzb.9.1702033697337; Fri, 08 Dec 2023 03:08:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702033697; cv=none; d=google.com; s=arc-20160816; b=IVubmjTDC2MgeBOD6x7TRnH5aegZ85qWQ1Y24OhB37den0jaLEvhyAwytBUrqDIcTM GCH7hI+ouAtM+pQZBFQNofUvdthtN9tRB865VA2Gwt2vdlB3pQaQFNVBDmFkEM8B2ELN gkY5duwPSxET0gTpaMrw8mWWevpTHJOFA4CyOOw0dfhU/OZuCkDtEhFuB+thnOIFa+B9 C2FnX2At1aBjx79NgOuWLpTah79t/yyMuZnXWBU9BKqr2GlDOD54/mMcpmMfc++yvqGz 87jxx4rBXf83ncbKRq/3OnozQBOs7GoSM7ydrEu1QSTHBAOBr7eYlBNnNQxW9Fsz3E4I AgOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MZ68z0Zmw8ZgsbDmEzD6URQldfv+XNMK6DMNEIcDVTU=; fh=iYyEBcxbSBcNGli4Za5q7Dvg18EJkPwIZbME9nrdnK0=; b=l9PZqX3IySfE0B95qfyG67cHqgwAwTt7bK5HgQDVY4+x/0VucPvQ0zpmU5L8ljcUMh NRCd3PdkdGNobHTO/8TnhF+X2R7yBgVxoaQ3QL8/ckYD0L5iSAOMcePdXH7cb9ir8cb2 +QKB/PpbJJ7KYcdarlQdF13ZqFQUlK1V3K0miSUlm8Xn0FlY45q2dXHkK8yPLg/Eyqc0 eV09iGSzR2agibG96AdP+jKSxE5qgPW9uD0Ff9rtM4pj57hsG71s+0J+Bxnd3bhPZHtc 4iyxP0x1VIG8aR0/tlzRLZn8Lpo5yBaoq8RcPQcr6DJEYrD4C8skI+efr0p0epyF9ae0 mupQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VVfgRTVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id e9-20020a63e009000000b005c218df2842si1330992pgh.900.2023.12.08.03.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 03:08:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VVfgRTVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9B88B82C9D9C; Fri, 8 Dec 2023 03:08:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573714AbjLHLHq (ORCPT + 99 others); Fri, 8 Dec 2023 06:07:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232374AbjLHLHo (ORCPT ); Fri, 8 Dec 2023 06:07:44 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02D5B122 for ; Fri, 8 Dec 2023 03:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702033668; 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=MZ68z0Zmw8ZgsbDmEzD6URQldfv+XNMK6DMNEIcDVTU=; b=VVfgRTVEmjt5/W/rfuPGjVr0mhe+P+K3ZvtHwgTbd0BbvJV8+K+ggLoPJaff4DLpyp/ull z9HkWV46iV1trBZs3Igf2U58SBRe4ZwW0ZrY49Rr2Nzx/9VfJqBLjS2SzAF8MdpP8UrKxy kdWCrpAM9xrN0aiurngFb8RBsJawtCA= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-696-7PJmhRINPAOYbJsLYZ8_bg-1; Fri, 08 Dec 2023 06:07:46 -0500 X-MC-Unique: 7PJmhRINPAOYbJsLYZ8_bg-1 Received: by mail-vk1-f198.google.com with SMTP id 71dfb90a1353d-4b309d9aad0so534521e0c.1 for ; Fri, 08 Dec 2023 03:07:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702033666; x=1702638466; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MZ68z0Zmw8ZgsbDmEzD6URQldfv+XNMK6DMNEIcDVTU=; b=Op5Y9c6zp9qOvDjW9Ol2I+z6DK1D4R3j3e/+sYI8iUqBCyGXTU2BmPeYvKvsi+Irms efkZPNk1J2Yk+FWiVN/rVGUQ4V/9Fe+rS69r/q6WKu50U2QDpIcaHfXibz7fp8aCNZgj Njmgm3KhMxdbV+NM6+6EVeJzY6tH7VWN8dNh+tcu+bFbYvRy5fxMXk3z6vt/6pcWpJWI zGh+dc+OoUuL1Blw+zwpFPEs3l1CHXhCWXwOaF4vbBuqZiZKddQyAVmlaEErNJRXu4Es 4SGE+a2QaaxfaG6HDgxXyfzHYORiW5qD0hDG9aGRNA6cKN7BemjmKAp44J4YHGOVWSxL HCIA== X-Gm-Message-State: AOJu0YzUXYQNn7T2XekIDD4BuyPHqd04rfeuEwl+U1A5Q6DVbK6g2/p2 ZyztT4LpHhaAY03Yv8MXtIMXiI1aZZMjfbJOFWBi3oUO8LiW8EjH2rJg1tEuqxFhuyFl6zj2Z/S KNa8wey17mAy4yojwAjOupqGJAJa9LavwQFeYgOwN X-Received: by 2002:a05:6122:2a49:b0:4b2:891e:225a with SMTP id fx9-20020a0561222a4900b004b2891e225amr5351322vkb.11.1702033666412; Fri, 08 Dec 2023 03:07:46 -0800 (PST) X-Received: by 2002:a05:6122:2a49:b0:4b2:891e:225a with SMTP id fx9-20020a0561222a4900b004b2891e225amr5351317vkb.11.1702033666140; Fri, 08 Dec 2023 03:07:46 -0800 (PST) MIME-Version: 1.0 References: <20231207043118.118158-1-fengli@smartx.com> <6CB024E3-337C-41F9-9DA1-B54B6E19F78E@smartx.com> In-Reply-To: <6CB024E3-337C-41F9-9DA1-B54B6E19F78E@smartx.com> From: Paolo Bonzini Date: Fri, 8 Dec 2023 12:07:33 +0100 Message-ID: Subject: Re: [PATCH] virtio_blk: set the default scheduler to none To: Li Feng Cc: Ming Lei , Keith Busch , Jens Axboe , "Michael S. Tsirkin" , Jason Wang , Stefan Hajnoczi , Xuan Zhuo , "open list:BLOCK LAYER" , linux-kernel , "open list:VIRTIO BLOCK AND SCSI DRIVERS" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 03:08:14 -0800 (PST) On Fri, Dec 8, 2023 at 6:54=E2=80=AFAM Li Feng wrote: > > > Hi, > > I have ran all io pattern on my another host. > Notes: > q1 means fio iodepth =3D 1 > j1 means fio num jobs =3D 1 > > VCPU =3D 4, VMEM =3D 2GiB, fio using directio. > > The results of most jobs are better than the deadline, and some are lower= than the deadline=E3=80=82 I think this analysis is a bit simplistic. In particular: For low queue depth improvements are relatively small but we also have the worst cases: 4k-randread-q1-j1 | 12325 | 13356 | 8.37% 256k-randread-q1-j1 | 1865 | 1883 | 0.97% 4k-randwrite-q1-j1 | 9923 | 10163 | 2.42% 256k-randwrite-q1-j1 | 2762 | 2833 | 2.57% 4k-read-q1-j1 | 21499 | 22223 | 3.37% 256k-read-q1-j1 | 1919 | 1951 | 1.67% 4k-write-q1-j1 | 10120 | 10262 | 1.40% 256k-write-q1-j1 | 2779 | 2744 | -1.26% 4k-randread-q1-j2 | 24238 | 25478 | 5.12% 256k-randread-q1-j2 | 3656 | 3649 | -0.19% 4k-randwrite-q1-j2 | 17096 | 18112 | 5.94% 256k-randwrite-q1-j2 | 5188 | 4914 | -5.28% 4k-read-q1-j2 | 36890 | 31768 | -13.88% 256k-read-q1-j2 | 3708 | 4028 | 8.63% 4k-write-q1-j2 | 17786 | 18519 | 4.12% 256k-write-q1-j2 | 4756 | 5035 | 5.87% (I ran a paired t-test and it confirms that the improvements overall are not statistically significant). Small, high queue depth I/O is where the improvements are definitely significant, but even then the scheduler seems to help in the j2 case: 4k-randread-q128-j1 | 204739 | 319066 | 55.84% 4k-randwrite-q128-j1 | 137400 | 152081 | 10.68% 4k-read-q128-j1 | 158806 | 345269 | 117.42% 4k-write-q128-j1 | 47576 | 209236 | 339.79% 4k-randread-q128-j2 | 390090 | 577300 | 47.99% 4k-randwrite-q128-j2 | 143373 | 140560 | -1.96% 4k-read-q128-j2 | 399500 | 409857 | 2.59% 4k-write-q128-j2 | 175756 | 159109 | -9.47% At higher sizes, even high queue depth results have high variability. There are clear improvements for sequential reads, but not so much for everything else: 256k-randread-q128-j1 | 24257 | 22851 | -5.80% 256k-randwrite-q128-j1 | 9353 | 9233 | -1.28% 256k-read-q128-j1 | 18918 | 23710 | 25.33% 256k-write-q128-j1 | 9199 | 9337 | 1.50% 256k-randread-q128-j2 | 21992 | 23437 | 6.57% 256k-randwrite-q128-j2 | 9423 | 9314 | -1.16% 256k-read-q128-j2 | 19360 | 21467 | 10.88% 256k-write-q128-j2 | 9292 | 9293 | 0.01% I would focus on small I/O with varying queue depths, to understand at which point the performance starts to improve; queue depth of 128 may not be representative of common usage, especially high queue depth *sequential* access which is where the biggest effects are visibie. Maybe you can look at improvements in the scheduler instead? Paolo