From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BEFEC3F6B0 for ; Thu, 25 Aug 2022 08:31:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2634940008; Thu, 25 Aug 2022 04:31:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD58D940007; Thu, 25 Aug 2022 04:31:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9D8A940008; Thu, 25 Aug 2022 04:31:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A7B03940007 for ; Thu, 25 Aug 2022 04:31:06 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6A1901419C1 for ; Thu, 25 Aug 2022 08:31:06 +0000 (UTC) X-FDA: 79837444932.20.E5C4C37 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf17.hostedemail.com (Postfix) with ESMTP id CB0A240005 for ; Thu, 25 Aug 2022 08:31:05 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1661416263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9JreSlxKXQR3ziGAdiDnXffdkc+9SIm7IIEFiG45Z3U=; b=WhXhEqkbiX1TKDvyv9ByY4wFjR+PslXkJm1X1zFtwOHG+RWLsu2KluUQkTqA5aYnhVpRRD lOGVOgpLskeEqjQIYBICwBS3/Kbho1OSJhYob4VUfH5fdlJTDhTBDKIUpUCFvfag6qTigX vPAT6fwpRLN0nC2K/hWDCoI98nmX++Q= MIME-Version: 1.0 Subject: Re: [PATCH v2 3/3] memcg: increase MEMCG_CHARGE_BATCH to 64 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20220825000506.239406-4-shakeelb@google.com> Date: Thu, 25 Aug 2022 16:30:48 +0800 Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , =?utf-8?Q?Michal_Koutn=C3=BD?= , Eric Dumazet , Soheil Hassas Yeganeh , Feng Tang , Oliver Sang , Andrew Morton , lkp@lists.01.org, cgroups@vger.kernel.org, Linux MM , netdev , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <4A0F7B38-2701-486D-A847-DCC4B49F8EAF@linux.dev> References: <20220825000506.239406-1-shakeelb@google.com> <20220825000506.239406-4-shakeelb@google.com> To: Shakeel Butt X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661416266; a=rsa-sha256; cv=none; b=1Dzw03nuiNw8bOmw4LXuU5hgz2yeOOt4q35OoxNxcKHDJqPY5egok/51sF2mf/0BLz3jJ1 fMFxsxYcVghLqAliv6rgMTmKUlHIgCsbUOAjeoDmDKGkFUmCL8iShyu5rN8GkoYaubWjaA nTMa2VI44CVMkQwSoriAJKZ95qJfGNk= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WhXhEqkb; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf17.hostedemail.com: domain of muchun.song@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=muchun.song@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661416266; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9JreSlxKXQR3ziGAdiDnXffdkc+9SIm7IIEFiG45Z3U=; b=aW5NZI4t+ncHixTrOd4wfsXB3OfHAUGDtpuOAGfBvK/yTwLSwxQ19dgtB6cgE7QMfcnNTb rTtITJ9sG74a69vTEC1d67UpN7MwqUb6T99Lxr1DAO3l7m2udi7cCEfID7+7wbWcrMJtyO aQG/4w1ccsf5xlqEEJ7GbnnQ8ZQT9hE= X-Stat-Signature: 1ipu5ujpd9sp9di4yikjkx3616mjxse7 X-Rspamd-Queue-Id: CB0A240005 X-Rspam-User: X-Rspamd-Server: rspam11 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=WhXhEqkb; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf17.hostedemail.com: domain of muchun.song@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=muchun.song@linux.dev X-HE-Tag: 1661416265-12705 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Aug 25, 2022, at 08:05, Shakeel Butt wrote: > > For several years, MEMCG_CHARGE_BATCH was kept at 32 but with bigger > machines and the network intensive workloads requiring througput in > Gbps, 32 is too small and makes the memcg charging path a bottleneck. > For now, increase it to 64 for easy acceptance to 6.0. We will need to > revisit this in future for ever increasing demand of higher performance. > > Please note that the memcg charge path drain the per-cpu memcg charge > stock, so there should not be any oom behavior change. Though it does > have impact on rstat flushing and high limit reclaim backoff. > > To evaluate the impact of this optimization, on a 72 CPUs machine, we > ran the following workload in a three level of cgroup hierarchy. > > $ netserver -6 > # 36 instances of netperf with following params > $ netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K > > Results (average throughput of netperf): > Without (6.0-rc1) 10482.7 Mbps > With patch 17064.7 Mbps (62.7% improvement) > > With the patch, the throughput improved by 62.7%. This is very impressive. > > Signed-off-by: Shakeel Butt > Reported-by: kernel test robot > Acked-by: Soheil Hassas Yeganeh > Reviewed-by: Feng Tang > Acked-by: Roman Gushchin Acked-by: Muchun Song Thanks.