Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp523544rdg; Tue, 10 Oct 2023 18:49:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+gQFf1QnBSiBpE6p1A3CVwFSFOBkO8sOjt4NcFEcEDcKDjJnwckyWfzOxY8BpwwTLhm6S X-Received: by 2002:a05:6a20:d406:b0:171:eee6:f97a with SMTP id il6-20020a056a20d40600b00171eee6f97amr3243340pzb.55.1696988952541; Tue, 10 Oct 2023 18:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696988952; cv=none; d=google.com; s=arc-20160816; b=AlruyIvMDNar/Hr04q3fz3LtNxjfY2mRKPIHtmYHVVH7E7NrVV+TkEMF9Mmj12iNrS rGfmvnMx7XtWLkfFYnVj99O1/wr374vG4pwiqybSgCF7yuWtjVF4lc9zMiy1Ubv6THJE iiG9/zrN7zy3yHikYEWIwn1oseRiwoN85NP3w7dcc8M4bJjtYDHAwcLw2Ti72WkC7jrd lH4MkODpi9Z7u6g97tOezepCnmyCf/4AJxl/MIHYr6YEE5ZOsK0XXhZS+4jOt5C+Jow+ 72Puq8VZKSQ2zSC9Irg0bKzlANwbkfbpQgywK+WMub1AwuT5UJk6/ExIf52dFF5ilBTF upSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LgmTMfuU3cCeLGy5YhBbbvizhGvmrwNUjrSNHCgxSVM=; fh=xoUKUYwsHP88jVXv8iAtrUCIr9Fd+NLU74akQLg97ME=; b=Hu4QE4ODj5A9hzBLBj1NpHefnn318iH3zYlwgxKXIiCvmsIuQCbhO3PYr5dXP2wUdG 6xbsB4+B/yHWk5BDXzNGQbTZkKwgbJC7ZtkaH3HQ54zdO6wcKEGPKJysbXitVLHNAB9B 2Stcj0s6IZPBGiPNPZ6Zfy+t1XzuXQqgCnOHwbSBd9Da9qy7sZcLw6xZPwsodvhMt1iL SMmLeicJ4xRbUx0cUCkgTiR7TUHytsP9O7p8REqmetjZJotkVh7/Zz+fQ5kO4WKHOCyq h7ZRXLriHxG+HmmFF2XslpgDTcRmlK64GjO3Q0zV0y1BRB2pAePbAgDY22LM77XkSL/e exhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=r1m8eAQg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s63-20020a632c42000000b00578d71884b4si12879874pgs.194.2023.10.10.18.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 18:49:12 -0700 (PDT) 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=@google.com header.s=20230601 header.b=r1m8eAQg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 18369801C0A9; Tue, 10 Oct 2023 18:49:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344412AbjJKBs5 (ORCPT + 99 others); Tue, 10 Oct 2023 21:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344618AbjJKBsy (ORCPT ); Tue, 10 Oct 2023 21:48:54 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0095D94 for ; Tue, 10 Oct 2023 18:48:51 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9ba1eb73c27so489373866b.3 for ; Tue, 10 Oct 2023 18:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696988930; x=1697593730; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LgmTMfuU3cCeLGy5YhBbbvizhGvmrwNUjrSNHCgxSVM=; b=r1m8eAQgu1YxRdB3F9oK28HWMMvq/OJmOQokmNkjXMGb/csXzN5OLDAgbB6VykiMVx q/JqUfFFCBfFZnbCXgnn9ktZZ2TVNqC1pXzAVb3rBQNT1OdPbSG3gPi3k29pLJ5FU++J eyk/M2Vqx0W30Zrd2ogiAyjz8RySKxnTNkLYp8V+SpgSoh22o2zoeo8AEeKkSDN1z5rK EgMBMVjShbODqGGIS+UDwIrYdhGFAu2XWN/Dqutd5wdChGjiO89I4Qmy1NmfmM84AO9B xYVsQ2b09UAwPue2nGa7hF5qMiBF1ax32H+A8xcIw9G9HwvrchFsOnW/WTsbt3fFcvwG 40jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696988930; x=1697593730; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LgmTMfuU3cCeLGy5YhBbbvizhGvmrwNUjrSNHCgxSVM=; b=io826mH1VNZO3p9i/1z/ObrFChNRl3gfyMvSo3UVgnc/6AxUGVPHpBdY7Tijx1NRmu bcWk4c68sinf1rTAMDhI9HMabTksckZnZODz6hve41yooYoNX0opeAYfc9oaE1klHCY1 6zH6QLWP/djvGU7q8alUiQACTmaGN94RRgBKj8vmEQWbdzDT+XnJB6dYxR3Z63VR6lE4 wVITQL89kDIDukCXg54ywTjJam7UNZPS0GkIA5+B6iBEYG110Fm1S36MMUz3uz+xNtyX 9nNWE+YabXhs10TlQPCavaQDGUQvwZHtMr84cHQDrxIVPiyjXuGo+FOdQ16nSZ69htBl nWow== X-Gm-Message-State: AOJu0YwG5f/MDqb97qSi0XBbyq9LOgYf0VL9YUKN732OstcYPl9SHnfJ gcvib9C7SB/0Wx0zbmQNfD+ExO+fm+NTf48AoVbGsw== X-Received: by 2002:a17:906:32cb:b0:9ae:7622:eed9 with SMTP id k11-20020a17090632cb00b009ae7622eed9mr17959783ejk.50.1696988930108; Tue, 10 Oct 2023 18:48:50 -0700 (PDT) MIME-Version: 1.0 References: <20231010032117.1577496-1-yosryahmed@google.com> <20231010032117.1577496-4-yosryahmed@google.com> <20231011003646.dt5rlqmnq6ybrlnd@google.com> In-Reply-To: <20231011003646.dt5rlqmnq6ybrlnd@google.com> From: Yosry Ahmed Date: Tue, 10 Oct 2023 18:48:11 -0700 Message-ID: Subject: Re: [PATCH v2 3/5] mm: memcg: make stats flushing threshold per-memcg To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Ivan Babrou , Tejun Heo , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Waiman Long , kernel-team@cloudflare.com, Wei Xu , Greg Thelen , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no 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]); Tue, 10 Oct 2023 18:49:10 -0700 (PDT) On Tue, Oct 10, 2023 at 5:36=E2=80=AFPM Shakeel Butt = wrote: > > On Tue, Oct 10, 2023 at 03:21:47PM -0700, Yosry Ahmed wrote: > [...] > > > > I tried this on a machine with 72 cpus (also ixion), running both > > netserver and netperf in /sys/fs/cgroup/a/b/c/d as follows: > > # echo "+memory" > /sys/fs/cgroup/cgroup.subtree_control > > # mkdir /sys/fs/cgroup/a > > # echo "+memory" > /sys/fs/cgroup/a/cgroup.subtree_control > > # mkdir /sys/fs/cgroup/a/b > > # echo "+memory" > /sys/fs/cgroup/a/b/cgroup.subtree_control > > # mkdir /sys/fs/cgroup/a/b/c > > # echo "+memory" > /sys/fs/cgroup/a/b/c/cgroup.subtree_control > > # mkdir /sys/fs/cgroup/a/b/c/d > > # echo 0 > /sys/fs/cgroup/a/b/c/d/cgroup.procs > > # ./netserver -6 > > > > # echo 0 > /sys/fs/cgroup/a/b/c/d/cgroup.procs > > # for i in $(seq 10); do ./netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- > > -m 10K; done > > You are missing '&' at the end. Use something like below: > > #!/bin/bash > for i in {1..22} > do > /data/tmp/netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K & > done > wait > Oh sorry I missed the fact that you are running instances in parallel, my b= ad. So I ran 36 instances on a machine with 72 cpus. I did this 10 times and got an average from all instances for all runs to reduce noise: #!/bin/bash ITER=3D10 NR_INSTANCES=3D36 for i in $(seq $ITER); do echo "iteration $i" for j in $(seq $NR_INSTANCES); do echo "iteration $i" >> "out$j" ./netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K >> "out$j" & done wait done cat out* | grep 540000 | awk '{sum +=3D $5} END {print sum/NR}' Base: 22169 mbps Patched: 21331.9 mbps The difference is ~3.7% in my runs. I am not sure what's different. Perhaps it's the number of runs?