Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp434963imm; Mon, 2 Jul 2018 14:28:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIeR1NeF3LD5hkwj7IFWD3b4JvMsp3aGJqFgxzYZYs7wxS9O7E2lyrvLioG2LLKZzdi9ACv X-Received: by 2002:a17:902:7d82:: with SMTP id a2-v6mr27379107plm.202.1530566928614; Mon, 02 Jul 2018 14:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530566928; cv=none; d=google.com; s=arc-20160816; b=K7Z90LZE2en9Rv07bLprTWGFfsMGw04vEtceVyPHaMWlNZQ4dY/G2mb0BCQJdtHWyj XEKB09WiYyWqFXUvLtagLrdSiNN7Z8QyTqppsuicpdPFFk8XgW3lnoOGCNiCEVcIrDGN kzi37zzZOmz4kcf9bAgIfBCFM7BtV2vEv4DterJJO9aP30HxsU3UpNXuRbJYrwWKEGbE NYQ8ta5xZP2N3OeCpqDlYkFaIn4FB2Zt4VB1rZq24tMhdLO07UlJUk/WKKLIQ6gnwYEp 2cpXUe9q/bfMc2IA0s5MVo78aZ9UsjqmTSBMLzN89qamXzQB2FNRqxQIKOuPeZVf8Ncr WiRA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=+B32VMtlsheK8e0eczv1AA5j0Dw5Q6FObVNbathADMo=; b=bOFvhZBZa5S6/GYBjGvv48Q/9+cvpCYQ8PpCKfIuoxlKu9jYqImwK9D5swvUaLt90r SlmN93V7ZnTkwGgrpJ+nHMfXVpiWLz4Q7BT+OJozQP+UVnBJ97sSU5fx3Etw8oUcrmqv vgAHcKBw8+uQ7u/QYOFJ+vS4CuuSw7nLnxGlxHZFYDXv9V0ZoDWGK69YPMW8nRQl+l/X bJ7QSAeQAE5nU/oLz6I/X2ZG86AF22gSbsQfBsNFDeRmMjfx/hww0odsj/sxwLNFka1Q 9+Yz7PNRlP6xpB9cEhDs6SHxbyuZyhuPgogYibziKcIO2AiaPfe5+u5PLS84cAm+M/Fq wXXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si14181856pgc.351.2018.07.02.14.28.33; Mon, 02 Jul 2018 14:28:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932126AbeGBV0n (ORCPT + 99 others); Mon, 2 Jul 2018 17:26:43 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36656 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068AbeGBV0l (ORCPT ); Mon, 2 Jul 2018 17:26:41 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BADBACC7; Mon, 2 Jul 2018 21:26:40 +0000 (UTC) Date: Mon, 2 Jul 2018 14:26:39 -0700 From: Andrew Morton To: Josef Bacik Cc: axboe@kernel.dk, kernel-team@fb.com, linux-block@vger.kernel.org, hannes@cmpxchg.org, tj@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 00/14][V5] Introduce io.latency io controller for cgroups Message-Id: <20180702142639.752759da566fd9074cf8edfe@linux-foundation.org> In-Reply-To: <20180629192542.26649-1-josef@toxicpanda.com> References: <20180629192542.26649-1-josef@toxicpanda.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jun 2018 15:25:28 -0400 Josef Bacik wrote: > This series adds a latency based io controller for cgroups. It is based on the > same concept as the writeback throttling code, which is watching the overall > total latency of IO's in a given window and then adjusting the queue depth of > the group accordingly. This is meant to be a workload protection controller, so > whoever has the lowest latency target gets the preferential treatment with no > thought to fairness or proportionality. It is meant to be work conserving, so > as long as nobody is missing their latency targets the disk is fair game. > > We have been testing this in production for several months now to get the > behavior right and we are finally at the point that it is working well in all of > our test cases. With this patch we protect our main workload (the web server) > and isolate out the system services (chef/yum/etc). This works well in the > normal case, smoothing out weird request per second (RPS) dips that we would see > when one of the system services would run and compete for IO resources. This > also works incredibly well in the runaway task case. > > The runaway task usecase is where we have some task that slowly eats up all of > the memory on the system (think a memory leak). Previously this sort of > workload would push the box into a swapping/oom death spiral that was only > recovered by rebooting the box. With this patchset and proper configuration of > the memory.low and io.latency controllers we're able to survive this test with a > at most 20% dip in RPS. Is this purely useful for spinning disks, or is there some applicability to SSDs and perhaps other storage devices? Some discussion on this topic would be useful. Patches 5, 7 & 14 look fine to me - go wild. #14 could do with a couple of why-we're-doing-this comments, but I say that about everything ;)