From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 437C0350A30 for ; Fri, 13 Feb 2026 12:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770984119; cv=none; b=hCqtAADuMeNKEPoWr1NCo6Uh4HHctkgRH/C/yaFhkblxNB9Qhyg8uqNmPQyzNtQVNjBi38X50pJVyv3QVYhUprPpWdBFu+ne6bToRqttvL3+ScWqIWlPqH7GCgSYVQvoSrjhZlELIWVcZINHD9YWiqyD+5XSeCFJUIi/FCF5MUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770984119; c=relaxed/simple; bh=24HytnqXY2IQ2pdZhMjqMPeei8eSC1wSFaCSqZdU8kg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BONiSBO5UJbc+jdTYCQiawxgK4+YuCuQGjyoIG/4hnk/BgavZD7DpFPKOaorm9tccEu1GjubIPj5SsvDyf2QMsK5MndrTDk2cMlfDNALVZB63RN/aRJ5U/joFistCYqyOWkwOjdwkum0dePV6h4OYxs0L0V7Y0FiL5DeSZ7K7z4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Px0oKfRD; arc=none smtp.client-ip=209.85.210.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Px0oKfRD" Received: by mail-pf1-f196.google.com with SMTP id d2e1a72fcca58-8231061d234so688249b3a.1 for ; Fri, 13 Feb 2026 04:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770984118; x=1771588918; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O3QccyLBzZLEl0LwWVPZnt4xrcGiKN2vu1maCig+39c=; b=Px0oKfRD/9R08gocex+A9C7rK1xDsjqZqV1ACf0x+LsR10iuw5357qNZAWsrFjTQBk vsk6MwUMXPo7KUsBhwmBWl9TF8lH62EiBGTHLN7/NWuR6kN1hwUdG9e1dNSApq9itaFV /D6uSZZaHlA+U9BeYipTNxxh1KYxHWhb+vcCb3K+pDWfWZxRNn8rJYGYQyJXUNH6WlPN MsFN8sroslIyXYPIFWwkyE2c5AXAqLEIKovRz0vRj6XVSe/QepBwy5UvNkB/gZofjKty 1RPo1mrv3LDvgDglhMnDMAvDIzVC08UjYZPys7Vql8HAuLU1Jp2lRM588Kah2VBb/6YP 636g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770984118; x=1771588918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=O3QccyLBzZLEl0LwWVPZnt4xrcGiKN2vu1maCig+39c=; b=n3X8mducyJnQJqmIRwsCDGtGmsaeqMM52i+vqyckNU9+1mftriYjg9FHEC1+0EuWyb o8CSq65606fmKRmsKahx7af1ZTE+Uz3v6PYWrDmhtc89Qqut6xZE9AtJTvsAgyBEf+Ei kZZp9zwg8eTWCwk1W+9U9RHZdmO0xY4CwhYPkBVFsQUXirrIZuYu8wQ6V2HZsQGQqMWS Px7ropFxWNfqFURMPfDhMOfaFaSX8UYj9l/Ys8mdqG05rHysaMMMT+BzaMSGO8u3MQ36 GjaU9ZRp98WBJAbNTs+ByuBAqkTwB6Bnh9UetuJV2OBBVYpSFWRln8vRKOw1PGx/PDu5 emcA== X-Forwarded-Encrypted: i=1; AJvYcCW8PCtVIOcVwxHBbk+8ZFht60T7RVQv9fav2Ip8dbVj8tXfE/GH2YN+KDXNpXyF/8Q+ee/UY3Vyp9WK8M0=@vger.kernel.org X-Gm-Message-State: AOJu0Yzb/yPV1M/BFDH1NRBbCh0HBXdoW2dlr8VFSCL9pQzLIN8ppqvX HTM+vxuz/nULTEVjyXIWBGA8z4dKGOMS/vHAz6x5EFgy/I0wigc7B5a4 X-Gm-Gg: AZuq6aL6vaP1VkIspDA8p0wOkXI/6/SBvbx5fIcw9zHXZJk70rXeHdZVPBYCLodikr0 WYjzYuy44kpfCRaHgCqguedU1O0CGW2ZSQx9dzdFaFHDKvBkOzk5/R7pKWfjz93ZNTnZBzpmuwi jSLWN8wi6ZUP2VFDGB2NR+mQy3ibSKEB98ivLP9mPxnrmLF47cgXx3LOyJzEa/eZLn3PhpE6xkq mWRatJgzk0frN/sjPk67Z1vBZixIdWCE3Mc36k49kPDwBh0cfkdPLG2PEMBNPLuQsO0T2ok3+yU hFeJUMjP3SCKd93cWfojDfCxlyWNtoAOXR57/nHl4Lsdq8Y/OjHa3zJZHjKbHwTFzuFJqWXNwK6 ZBhHgSf2wE44/rc+GHZVvLCCB2rxFIdAEHSq0G3CGEn6mIPHjT9Ogf2gchjsBt5f8XvSUmlziUS WEyo0FPW8DihUG2uVdnvhb7T2ENGxddww/gg== X-Received: by 2002:a05:6a00:4f87:b0:823:9c6:1985 with SMTP id d2e1a72fcca58-824c948163bmr1706633b3a.16.1770984117386; Fri, 13 Feb 2026 04:01:57 -0800 (PST) Received: from archwsl.localdomain ([223.166.78.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824c6a4316fsm3180723b3a.23.2026.02.13.04.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 04:01:56 -0800 (PST) From: Jialin Wang To: wjl.linux@gmail.com Cc: axboe@kernel.dk, cgroups@vger.kernel.org, josef@toxicpanda.com, lianux.mm@gmail.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org Subject: Re: [RFC PATCH] blk-iocost: introduce 'linear-max' cost model for cloud disk Date: Fri, 13 Feb 2026 20:01:47 +0800 Message-ID: <20260213120147.322797-1-wjl.linux@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260213094218.253536-1-wjl.linux@gmail.com> References: <20260213094218.253536-1-wjl.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, Feb 13, 2026 at 5:42 PM Jialin Wang wrote: > > This formula correctly models the dual-bucket behavior of cloud disks. > > It ensures that for any block size, the calculated cost aligns with the > > actual bottleneck (IOPS or BPS). This allows the system to reach close > > to the provisioned BPS/IOPS limits without premature throttling, while > > still maintaining the latency protection benefits of iocost. > > This model still has some limitations. Under workloads with mixed IO sizes and > vrate max at 100%, it fail to fully saturate the hardware performance. > However, it still demonstrates a clear improvement over the linear model. > > The following fio benchmarks were conducted with two cgroups assigned equal weights: > > Cgroup A: fio --bs=32k ... > Cgroup B: fio --bs=1M ... > > Results: > > Model | Cgroup A (32k) | Cgroup B (1M) | Total > ------------+------------------------+----------------------|---------------------- > linear | 1137 IOPS (35.5 MiB/s) | 79 IOPS (79.5 MiB/s) | 1216 IOPS 115.0 MiB/s > linear-max | 1781 IOPS (55.7 MiB/s) | 83 IOPS (83.9 MiB/s) | 1864 IOPS 139.6 MiB/s One potential long-term solution might be to separate the accounting for IOPS and BPS. By tracking two independent vtime counters (vtime_ios and vtime_bytes) with their own weights, we could apply throttling based on the specific resource being consumed. This would avoid cases where high-bandwidth requests unnecessarily eat up the IOPS budget, and vice versa. I would love to hear your thoughts on this idea. Is this a direction worth exploring, or would the added complexity be a concern? Thanks, Jialin Wang