Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2102537rdb; Thu, 7 Dec 2023 19:54:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IF30s26kbQlwx45KVI/063TK8io/HJGh2AhVyfIH2dbTny9UAS0Am7GX3847LaKU/lUaDUf X-Received: by 2002:a05:6871:7589:b0:1fb:1373:c889 with SMTP id nz9-20020a056871758900b001fb1373c889mr4122432oac.102.1702007670501; Thu, 07 Dec 2023 19:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702007670; cv=none; d=google.com; s=arc-20160816; b=OkmC+Dc8YQrkpd6BizosyGTqTLNLsGjejz47r3O9O3E7l6HsdAXUTNLIcbV4+xrTUW SwzZGDOi0QbXFtAkcODw6FtUWeomXfeGOQGxSLuPQx7LHD6havGHyP/MJuzA7MwJM9gy Prnimp11ZyaldOKGyaEE4JBu2NsP45FbLATqip0nUna71oOSz0kOQjxYZcrJYwhQ2bje 1PyGOOoUFAi1VHaT295LCc7w1WOPLyG+lCw13nncfjVfNeFG5F3U4LPjyLRK0bWlz3ul twm/C/T2xuYI71KwxOLqydAw10UWVFZSiDuze0kMZJf/j8cRdi5o631XRIxwnSpZjsP9 vS7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CMjgdK/2S1PdVSZgnJj0b95Jv4yCNX3anEehreiP6o4=; fh=Ereyw3CQt8eaMyAgsKLVNCEd1Ks1gjcvFmgk2d0/lM0=; b=XDkLdcKXIosqjHSz0Xjoh+XUy6IqCPqoQ4hFx9A9SGbLprSBPZ0MOPn7mPXuZJmwz2 sWHOTVmtJ+31TS42yT0cwKGolW6e0aj3Xj5SdDhjeQVP5lJ9uZeWlzfvkuP7MJZgRjab cxOYAZw2qEOVpmrT4J6DCrxzSJZhLP8he2u5g7uutpucatyaVoKkwFmvgfZqefroYNhN SAvS7HFNdRGbep3r1Z9MAo0rOd0kb3QvFKHDXbXN+svlWxtwAu+AmRw6Pl0qw3BY3ws6 6Q7VRkTXw82yrtC5gFNeM999byy2JWZKIaqp+IT4D3VNP+KU+u4a3HsFIM/rT31BT4WA 1wrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ku5vKAHL; 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 126-20020a630084000000b005c64505cbc2si835534pga.19.2023.12.07.19.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 19:54:30 -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=Ku5vKAHL; 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 F2020823B3EB; Thu, 7 Dec 2023 19:54:27 -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 S231892AbjLHDyO (ORCPT + 99 others); Thu, 7 Dec 2023 22:54:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjLHDyN (ORCPT ); Thu, 7 Dec 2023 22:54:13 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B69381706 for ; Thu, 7 Dec 2023 19:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702007658; 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: in-reply-to:in-reply-to:references:references; bh=CMjgdK/2S1PdVSZgnJj0b95Jv4yCNX3anEehreiP6o4=; b=Ku5vKAHLw7A9+G3pilAcUdwGZKK5kWaAqYHLE3Z1oT9+R3W6ve4YcWh6b16AN+y5up/tJi HaHMMRJ9RPUjsncWIAyfnHtE47XdGZwzAVj1sdUCNgZcfJVRKAZLTZMnyU8XYrFXZTIiqg D9q5WN76mpGN018/rD3bxRSnhjlAuDE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-455-v257SBM9Ou6VY-NkZGlbJw-1; Thu, 07 Dec 2023 22:54:14 -0500 X-MC-Unique: v257SBM9Ou6VY-NkZGlbJw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F0128057FD; Fri, 8 Dec 2023 03:54:14 +0000 (UTC) Received: from fedora (unknown [10.72.120.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05A5C2166B35; Fri, 8 Dec 2023 03:54:07 +0000 (UTC) Date: Fri, 8 Dec 2023 11:54:03 +0800 From: Ming Lei To: Keith Busch Cc: Li Feng , Jens Axboe , "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Xuan Zhuo , "open list:BLOCK LAYER" , open list , "open list:VIRTIO BLOCK AND SCSI DRIVERS" Subject: Re: [PATCH] virtio_blk: set the default scheduler to none Message-ID: References: <20231207043118.118158-1-fengli@smartx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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]); Thu, 07 Dec 2023 19:54:28 -0800 (PST) On Thu, Dec 07, 2023 at 07:44:37PM -0700, Keith Busch wrote: > On Fri, Dec 08, 2023 at 10:00:36AM +0800, Ming Lei wrote: > > On Thu, Dec 07, 2023 at 12:31:05PM +0800, Li Feng wrote: > > > virtio-blk is generally used in cloud computing scenarios, where the > > > performance of virtual disks is very important. The mq-deadline scheduler > > > has a big performance drop compared to none with single queue. In my tests, > > > mq-deadline 4k readread iops were 270k compared to 450k for none. So here > > > the default scheduler of virtio-blk is set to "none". > > > > The test result shows you may not test HDD. backing of virtio-blk. > > > > none can lose IO merge capability more or less, so probably sequential IO perf > > drops in case of HDD backing. > > More of a curiosity, as I don't immediately even have an HDD to test > with! Isn't it more useful for the host providing the backing HDD use an > appropriate IO scheduler? virtio-blk has similiarities with a stacking > block driver, and we usually don't need to stack IO schedulers. dm-rq actually uses IO scheduler at high layer, and early merge has some benefits: 1) virtio-blk inflight requests are reduced, so less chance to throttle inside VM, meantime less IOs(bigger size) are handled by QEMU, and submitted to host side queue. 2) early merge in VM is cheap than host side, since there can be more block IOs originated from different virtio-blk/scsi devices at the same time and all images can be stored in single disk, then these IOs become interleaved in host side queue, so sequential IO may become random or hard to merge. As Jens mentioned, it needs actual test. Thanks, Ming