Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp368230rwe; Thu, 25 Aug 2022 01:36:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR66J8y9jd+3F/frRJuoJW3v+3H0/sXZo12mko7OsFfDozd+wzwvrn0u1PJRtZk/MN1meDfv X-Received: by 2002:a17:902:aa01:b0:172:b0dc:ba40 with SMTP id be1-20020a170902aa0100b00172b0dcba40mr2828756plb.101.1661416569571; Thu, 25 Aug 2022 01:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661416569; cv=none; d=google.com; s=arc-20160816; b=tIi96pH+6Wi7ikiC3Hv1c4IoOqFkeiLJoCYGQWzxJPXh9T7jjCtq0QFjqi0YGgQEZr TybYS6/lx5Sk2KDzElK9mkIyskHJNjjSGhnyJFTJYjbZNBOKNh2qtyAhs+whBjraXUlY k/eYxTf1UnFw1UzmBXXBbmZ0Ji3gamcDK1Zqtv0wBpU/OkQ3ghz5WQQYZ2dxVYAENcml H1smUID4zAXcpA/5NTMAycpEkwBX+oaZq+a1kf2HpNJjYIZGGNhLs4/fYKKrfJSBjrSC d82PQhMS6Y54+y5ItugvGNsEAf19g6tLOuMQjLjRLiCKwGfWgABIE1gWPLedqCHMlkUg fXyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=9JreSlxKXQR3ziGAdiDnXffdkc+9SIm7IIEFiG45Z3U=; b=ebXHHvc70pZ4X/t5kPRWrnDeSYaw4F6RNDr/KEekiaWgP5KJoFk7xUGxhTXYm/XRnK RHDUGWEI3fCgdd9/VGwSvIzdIc8WCon8WHmY0Fzqq/O5n0InPgVQ/IlOXSiJD/F7/G7D KCKKSPSvS0PCZeARrDrA1+irdDrB0EQ85KXGrcRXaDqKudITDG01+40ZhP+VhrLkffK7 dm5e5QaotJx1bgHMAj/RTNrbxy6mpFtvobmxYMXcYjUF2+sh0xgK0DYnOdNKEc4r4uhX CwIS/tCawhCSGLN5ILhYPnpH5WNOnSOaRYFeUojbxCB8ASeLypqYFzkWZRWKQ6ssAHtU q6Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WhXhEqkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 95-20020a17090a09e800b001f511fb9430si2957394pjo.105.2022.08.25.01.35.59; Thu, 25 Aug 2022 01:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WhXhEqkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236770AbiHYIbO (ORCPT + 99 others); Thu, 25 Aug 2022 04:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiHYIbK (ORCPT ); Thu, 25 Aug 2022 04:31:10 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEE18A5983; Thu, 25 Aug 2022 01:31:05 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.