Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3669453imm; Tue, 29 May 2018 11:15:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpX+PdpqIOvgDwUJcC0yMm8QS/rdE/JEaUWZQa+BmXit1o4U4xHG3dhFaeR2fjM8VTwE6qE X-Received: by 2002:a63:6807:: with SMTP id d7-v6mr14683188pgc.332.1527617702771; Tue, 29 May 2018 11:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527617702; cv=none; d=google.com; s=arc-20160816; b=dZDarX1ndpPR71G3c4C7gnWZ/9M98l5DWzgU94Fy3VeNsHG/Qhw7oTQfIYT/PRmo1d uh3kgVw+H2n2a/W/2GlP1xGp5P87jo8Dk1NsCFZ1kChTSnSot9lkpUdAnsdMkU0d2rpa ELrYu4MTKBiuk5GNnPS8prFRp/BDs/g4H34JO6FiNUKc3LRqJPj+LPGelLZMhEgrnh0V Sp7rpKmKxkAqV42/vjZAPVVCY0YesbwHu+1WCCQ/QnfBufc+Czwa0KS7td1pwBvQd9Tb Vtoxft5nYNS/xtyHaWmoXe93KJo7ToDJ8ePod56MS+vcieXE713M+8nsRnvJ6W/bJB1o f9VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=whWvLs0+hrwq+rOR/CziIi4kC9JeSbwYxZfV4UMdwLY=; b=lKVyzKeNYt5WJGr4wgUwEi6+3/8wqQm2gCFzSnzIKbILgDE6zTWFrFyusX2vbTZHsJ GskXk+aJlKiHd3PNllIVMylj6Xf9ze8QE+Gmastt+m7zo8h62DOCeKFEZMtsvBfag6V9 9hH/wh/ngMoAYTfS2xmaZYsn/v/uFiBByr04sd36+vpB+PPODcHHFgvEWXLmMu+Y+UGP +7W+LV+Ov/kdcZRpYS59S87G94aIs3Pvw67JjinUoKQ0DYE4EbFN3GjJAorwZr/TnDC7 K80SdYmYQ+IaH8vJI1R+w/sIIst+4/LC2mtGnp3gsC76DCZANCqBLuIu9AGuqo1/jeiI 0fnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=AneIPeL2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v66-v6si26196746pgv.344.2018.05.29.11.14.48; Tue, 29 May 2018 11:15:02 -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; dkim=fail header.i=@cmpxchg.org header.s=x header.b=AneIPeL2; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965787AbeE2SOO (ORCPT + 99 others); Tue, 29 May 2018 14:14:14 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:52622 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936850AbeE2SON (ORCPT ); Tue, 29 May 2018 14:14:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=whWvLs0+hrwq+rOR/CziIi4kC9JeSbwYxZfV4UMdwLY=; b=AneIPeL2W1AMXQjHxUgk/mkbUb cgpSYr4omCrAHw1KL88QgzYAV1GjA2MUR5j/fCE5rhpq0j0uLDJOPsnlNcBFrGqIeCCO/4UJ7oqnn GEFZQkj7GxVo7SdqWfmUQQFtDvdENJ0IXmselJY2u7UdHJM66M0/I7kI8b7AS9aPeMKU=; Date: Tue, 29 May 2018 14:16:16 -0400 From: Johannes Weiner To: Suren Baghdasaryan Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, cgroups@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andrew Morton , Tejun Heo , Balbir Singh , Mike Galbraith , Oliver Yang , Shakeel Butt , xxx xxx , Taras Kondratiuk , Daniel Walker , Vinayak Menon , Ruslan Ruslichenko , kernel-team@fb.com Subject: Re: [PATCH 0/7] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180529181616.GB28689@cmpxchg.org> References: <20180507210135.1823-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Suren, On Fri, May 25, 2018 at 05:29:30PM -0700, Suren Baghdasaryan wrote: > Hi Johannes, > I tried your previous memdelay patches before this new set was posted > and results were promising for predicting when Android system is close > to OOM. I'm definitely going to try this one after I backport it to > 4.9. I'm happy to hear that! > Would it make sense to split CONFIG_PSI into CONFIG_PSI_CPU, > CONFIG_PSI_MEM and CONFIG_PSI_IO since one might need only specific > subset of this feature? Yes, that should be doable. I'll split them out in the next version. > > The total= value gives the absolute stall time in microseconds. This > > allows detecting latency spikes that might be too short to sway the > > running averages. It also allows custom time averaging in case the > > 10s/1m/5m windows aren't adequate for the usecase (or are too coarse > > with future hardware). > > Any reasons these specific windows were chosen (empirical > data/historical reasons)? I'm worried that with the smallest window > being 10s the signal might be too inert to detect fast memory pressure > buildup before OOM kill happens. I'll have to experiment with that > first, however if you have some insights into this already please > share them. They were chosen empirically. We started out with the loadavg window sizes, but had to reduce them for exactly the reason you mention - they're way too coarse to detect acute pressure buildup. 10s has been working well for us. We could make it smaller, but there is some worry that we don't have enough samples then and the average becomes too erratic - whereas monitoring total= directly would allow you to detect accute spikes and handle this erraticness explicitly. Let me know how it works out in your tests. Thanks for your feedback.