Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1009324imm; Wed, 18 Jul 2018 14:55:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe7xeoYYL7iw9O8DJLFVzmAAa/R+PL1gRVZW7xdiPEWg8iTzlcalzcyULz8Fz52PdV8q+3I X-Received: by 2002:a63:951e:: with SMTP id p30-v6mr7351751pgd.318.1531950903577; Wed, 18 Jul 2018 14:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531950903; cv=none; d=google.com; s=arc-20160816; b=jtuwnNetOe0ahzabz7eLD2pqecK1Vkxnp9bduuG3x3ElqOermFthvIMUPKDvqFww5/ WSHEIkVDQt8ZgCzzRBuebmKfbl/jEMlYcwkrnEZ44wnimykOeZ7oRTTvF8q9sBKaZSOM WSzYdeLFYQOTA4/3dUeof/PE8a/Fx8in0reNPafMO4h1shzdjfVQXObks1++/M/1IJ7e hWLG5pUERtug+bh0aAnO8UZlDp9gTjuFsSYwNXkfLt+ntgh5rsxbqDssbi45chtlMNWQ hHgmFzPjnFrkXsRzE7j1iZyPM3RW1+y+qb11cWXGzD5JESMtHl0Kmowi56g6usVvpua/ MrkQ== 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=97AZiZvtK6lsL3fru/ZpGGEtAAQ5rvikpgO5M2WEQLY=; b=eKbgWHOmtSnzPrgwmI0UJSM2mrg5oJJr5vShgI89HhVTJQthFv6inoAUoLhabLuDpS 3/AKLdT3eSRfhdoTQo6mcd3XLZy+k5YfViMy+5tSnHy8qVK3tAmR7bfYb86ladbiBz+r bS42OeulN3W9qkbLUDabiyPoUDxC8iMqDUFVYcgtHJRnoNLfJXGrfUIcj2ezsgcMF8ly ghV+ZbCH4qM2VscXfaMSj1F+9E0KWMnR7mYy5DVx9i6LK6uPSwQuTCMu7TwBo1xh0KiU U/NwUiVQxOvzlIaOuV3SMUmd8flvXg0NkrJs4+18xCNL4ebuTxiaGc4W6QMh1ZvVXtRH w/oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=cOQbwKhN; 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 p123-v6si3932902pfg.281.2018.07.18.14.54.48; Wed, 18 Jul 2018 14:55:03 -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=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=cOQbwKhN; 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 S1729594AbeGRWdw (ORCPT + 99 others); Wed, 18 Jul 2018 18:33:52 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:37717 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729134AbeGRWdw (ORCPT ); Wed, 18 Jul 2018 18:33:52 -0400 Received: by mail-yb0-f195.google.com with SMTP id r3-v6so2468265ybo.4 for ; Wed, 18 Jul 2018 14:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=97AZiZvtK6lsL3fru/ZpGGEtAAQ5rvikpgO5M2WEQLY=; b=cOQbwKhNq/HEGZyKB8wNjyAhCcmvzk5lptyZTs2+HOjnhPunJDnykUjHRybl84kZJf FiNt+HZo8pLQp+T2T/LGoQkZ94ro5XbE5k3XUKok3W15mYDDI/JCmtM9c1Czav/GdMy9 +3lEI2n5ywsU6ItSZLybGe9aEylVoyBRy1hMIKaYvvGDHiCCI/i5gCEU4Aawzbv3S9K0 mWGpJplcJGmix3S+7FC8lrBcNZsL2Uo3gJtDW7Gf+adIGwFb+R2K6zgZWAcL13SnvhQT bxgaJsaoMnRUOUXV1kb5/Qe7aMrVbVMXwIpV+hZ5NnAEoGulNidM++07Mm5UPXgsv1Fx a+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=97AZiZvtK6lsL3fru/ZpGGEtAAQ5rvikpgO5M2WEQLY=; b=KUXU43lDcyiyYXUOMTPp/lBlqlvljULcP/2576MTTwcPh/smmaR4USx7Yy8Ca9uoaW CgnqIAbQWNMFvXvnt+aHlFXiOF2rqSsJPjEtVsJkgq+jyYdl0r4MaLFEzMvYU5MyT3lr 6Bkl2zsJcaYxDt1Ok0xg2c3RUS0T2X/+M50fWDqmLK1tIF4C2iLkXVrcNNN3XKHh2wYb mv9rLhXQa+dn4oZnPW4dtAZVYWvbyEgQXEgLYCO7Us1YeK/ykcaoUpwta9awdGsRnUTU scF9Hf4BA3ujL22wA0pS8VyKf8u39Na7rAOkfsULkC4mXy39VW3cC1obpuLi8ZlbNdG4 BTIQ== X-Gm-Message-State: AOUpUlHEOB1QqD4hXuHTdkY+Ph5MsKoFtYa+TBdqCiW3FvFK0zpukNrm X3Ha3R2VpqiP7VzHR/w0KpTEqQ== X-Received: by 2002:a25:5a03:: with SMTP id o3-v6mr2862468ybb.196.1531950839166; Wed, 18 Jul 2018 14:53:59 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::2:7eca]) by smtp.gmail.com with ESMTPSA id 198-v6sm3474501ywh.59.2018.07.18.14.53.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Jul 2018 14:53:58 -0700 (PDT) Date: Wed, 18 Jul 2018 17:56:44 -0400 From: Johannes Weiner To: Peter Zijlstra Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , Tejun Heo , Suren Baghdasaryan , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180718215644.GB2838@cmpxchg.org> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-9-hannes@cmpxchg.org> <20180717100347.GD2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180717100347.GD2494@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 12:03:47PM +0200, Peter Zijlstra wrote: > This is still a scary amount of accounting; not to mention you'll be > adding O(cgroup-depth) to this in a later patch. > > Where are the performance numbers for all this? I benchmarked it using our two most scheduling sensitive workloads: memcache and webserver. They handle a ton of small requests - lots of wakeups and sleeps with little actual work in between - so they tend to be canaries for scheduler regressions. In the tests, the boxes were handling live traffic over the course of several hours. Half the machines, the control, ran with CONFIG_PSI=n. For memcache I used eight machines total. They're 2-socket, 14 core, 56 thread boxes. The test runs for half the test period, flips the test and control kernels on the hardware to rule out HW factors, DC location etc., then runs the other half of the test. For the webservers, I used 32 machines total. They're single socket, 16 core, 32 thread machines. During the memcache test, CPU load was nopsi=78.05% psi=78.98% in the first half and nopsi=77.52% psi=78.25%, so psi added between 0.7 and 0.9 percentage points to the CPU load, a difference of about 1%. As far as end-to-end request latency from the client perspective goes, we don't sample those finely enough to capture the requests going to those particular machines during the test, but we know the p50 turnaround time in this workload is 54us, and perf bench sched pipe on those machines show nopsi=5.232666 us/op and psi=5.587347 us/op, so this doesn't add much here either. The profile for the pipe benchmark shows: 0.87% sched-pipe [kernel.vmlinux] [k] psi_group_change 0.83% perf.real [kernel.vmlinux] [k] psi_group_change 0.82% perf.real [kernel.vmlinux] [k] psi_task_change 0.58% sched-pipe [kernel.vmlinux] [k] psi_task_change The webserver load is running inside 4 nested cgroup levels. The CPU load with both nopsi and psi kernels was indistinguishable at 81%. For comparison, we had to disable the cgroup cpu controller on the webservers because it added 4 percentage points to the CPU% during this same exact test. Versions of this accounting code now run on 80% of our fleet. None of our workloads have reported regressions during the rollout. [ Also note that the webservers that tested the nopsi kernel were during that time susceptible to swap storms, memory livelocks, and eventual hardresets because without psi they couldn't run our full resource isolation stack that would prevent that ;) ] Let me know if there are other tests I could run.