Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2692113rwa; Mon, 22 Aug 2022 11:55:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4GS62uDNYu2NPY+flJrc5BOxG49U42pof0zx79Gcrld3ygk1FOx+SwQq+RCMjNcKf/eFag X-Received: by 2002:a63:2605:0:b0:429:e7f0:a92d with SMTP id m5-20020a632605000000b00429e7f0a92dmr17542946pgm.188.1661194518494; Mon, 22 Aug 2022 11:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661194518; cv=none; d=google.com; s=arc-20160816; b=Y7rQqOXCu2aDLlJipdDSeSRq4LRe8z9vVvmmy6BaXuTv6NpfzrJrSVJkOVO6Hufvcf ywoz9DwRJc4K1Wt/Fgoj3DagB8mH7LLHCqJfg7zt2SFx+L7eICYkUkQoN0bUGWaoU8wL FvTJWsKwpPAStcin7YWS6qfsM6wyqxhG3K9hrJr3L+dOmh1JkQmXqVRNCj6l40yFnu4+ qutPVRiDMIVJirX9P6Yjt5UeFtDz+rDLN9kBwPV1omiL4BTj+/o8UVjti7Hwjx3AxdjN 7+pywguZ9i7Fz+rqOZDEUTWU34CBJH5Qo3xei+KRtXBoHM1Qtm6ONxv64AlrgEo3jXpI C8VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=3icLRlffoR+2bh6AZBpCk9+vi7OPaMiHjmut8kzqVHM=; b=MpDCbRXYYQFV4O61yXJFQWQYC2xChJpXeLpSKSAF6hskPohwvNcyDEZcN1Hyn8+LTJ LLXkGhiR8/Cwdb52FDm7Bb06Ba6ZzThi90AMqC21uFWmVKAwgCzoPQ8uc3mArvggoacB DOyAfQg+LgeoVFMQKlmgWojS5+oEFEqeAuVo0YFfUhy5a9T5zJ2i+2ZN4rXNNLHZoGeD by2TMLcMTJGEFBOhqpARps5XwhYaeEOY/hDYHGE+FyMOlx68qiSmTqYMMPIbYWVjW8CL QIyecncmuFheOoc+Sz4+fgxxuybXbbxGZVs9Oc6zsxLUVKlyigcgeVerE5SdtvKNtL+Z omDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=HbWlYxX1; 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 i18-20020a170902cf1200b0016c049f656asi10453997plg.54.2022.08.22.11.55.07; Mon, 22 Aug 2022 11:55:18 -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=HbWlYxX1; 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 S237319AbiHVSiW (ORCPT + 99 others); Mon, 22 Aug 2022 14:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbiHVSho (ORCPT ); Mon, 22 Aug 2022 14:37:44 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1444248E93; Mon, 22 Aug 2022 11:37:38 -0700 (PDT) Date: Mon, 22 Aug 2022 11:37:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1661193456; 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: in-reply-to:in-reply-to:references:references; bh=3icLRlffoR+2bh6AZBpCk9+vi7OPaMiHjmut8kzqVHM=; b=HbWlYxX1EJmz75AZbYDPBp74453btzjOhTRWKtlJOGuc1jQO24pHe/hVo32YJuG3ao8+iO ZKgUv+hqXTU6VWEGEungqgWleeZt4YEED0xXWrB3WsujuUR2ZsuOFwGTRy18nWJVgzW3fD YRJ16tZfmzfWWnGq3Ow3YE7Ru4ZjXyg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Muchun Song , Michal =?iso-8859-1?Q?Koutn=FD?= , Eric Dumazet , Soheil Hassas Yeganeh , Feng Tang , Oliver Sang , Andrew Morton , lkp@lists.01.org, cgroups@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] memcg: increase MEMCG_CHARGE_BATCH to 64 Message-ID: References: <20220822001737.4120417-1-shakeelb@google.com> <20220822001737.4120417-4-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220822001737.4120417-4-shakeelb@google.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Aug 22, 2022 at 12:17:37AM +0000, 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. > > To evaluate the impact of this optimization, on a 72 CPUs machine, we > ran the following workload in a three level of cgroup hierarchy with top > level having min and low setup appropriately. More specifically > memory.min equal to size of netperf binary and memory.low double of > that. > > $ 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 pretty significant! Acked-by: Roman Gushchin I wonder only if we want to make it configurable (Idk a sysctl or maybe a config option) and close the topic. Thanks!