Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3022585iog; Mon, 27 Jun 2022 07:38:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sT2Zjrz5jlLi57c2gqQj8afqVQs689vflfCz6WesDwRECtKX9aKKLvl2+ZdoHgQsoQUV/m X-Received: by 2002:a63:a70d:0:b0:40c:a1e3:23c2 with SMTP id d13-20020a63a70d000000b0040ca1e323c2mr12901698pgf.84.1656340726060; Mon, 27 Jun 2022 07:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656340726; cv=none; d=google.com; s=arc-20160816; b=A/f22XH/Sdoj36NMY03lAuILF5Vi2JhhFJ0zL6qjyheqzMiYxj2cUtnz9QEp5h6iGL 4TVKtVletDU10/H3kKiNbWoodjwaAanvot3AIPE+j7wKMHe42HGj/iJsdTiYoB3//+Vb 6ul2YsHCbkKLu38wcF+5fGMoVQCUlBo1frhV5CV3tJXrrfLeV7/fpoYuOFXVbIDMwF7U tSMPkaQQzgaeKJpuokq6Sy4Sha3GS3zlZkt7d7rG/fD/LHX6SIFhT2TRfUNgfXUzYTg7 /MCbAYRJIgeGYfkXlrBLIIPN0Sy+a6oBNCp6QMzHqfDc+XSaSnf/ScbngMScfHMqButQ M4VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Sjw8Rq/SzvseVodDwQxp2+Q31Mr0tWQ4MKXsdJlU2cg=; b=Y2ImJRCtGqean/mpCl0O+Hx2BI4raPZXN/8Wq1tC8WHI3yQD25/vTmj0wQikg49Po/ srnyWiYRM2QWmiarJxBLC/6B5dA272ibyDhqAAJzkKSdVylug/8x0LoYh0f1uAaYHKNh heWtmxj5mCC4XKU/tIRLcedqQkmT4ahj3+40u5AR3QPwthfqz1PdfsB4QieaQp8MPF5B 7RBQwBtwIoCrIAnM8/ffNYIqPSJgNGDRebQWWUaX4Y44+YDmPD03TlkYpYxhrvjMZvCx Rv6CB91BiVQW0faJj1dr6CdrEZEAcZWCXXRinGUOa5eNqv/FbLGlI/PRqrQq8ZD9ujy5 c7tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FNybrAKv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e193-20020a6369ca000000b003fc2d55fef2si15924289pgc.714.2022.06.27.07.38.33; Mon, 27 Jun 2022 07:38:46 -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=@google.com header.s=20210112 header.b=FNybrAKv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236758AbiF0OIM (ORCPT + 99 others); Mon, 27 Jun 2022 10:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236749AbiF0OIJ (ORCPT ); Mon, 27 Jun 2022 10:08:09 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87E2E11448 for ; Mon, 27 Jun 2022 07:08:07 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id h187so14734406ybg.0 for ; Mon, 27 Jun 2022 07:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Sjw8Rq/SzvseVodDwQxp2+Q31Mr0tWQ4MKXsdJlU2cg=; b=FNybrAKvk56tbmhGsNSol/sAk2WPCD9f/EnbfNGtYtTRxuDjK5KtlipdfEkdZ15GfR 2ZVGGTdXYE8JCJ73vYP045eGq1ZtgwuqKnC0ysZD0ffk/M8eLDDCoTK1+7MXH1UF8v/h OmIFdtZQE8XN4VDlxAbc8cd3FHUJNWruSpWTHLSObfVxTcKInOj0mpwlSAwvhmGxXebU htw640mczpUob+epPmy+ZAgZAg+JzC04mGFtVp1P15GuAjDL9Th+UMRsWwSWJZoe9+Qs Q+mBhAat4RLw+HLV2uKp/c2ZKyCFZSW8QC8lGFgH/kagAIAnnCPkRitYGr0ZKOhtxwRN x7BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sjw8Rq/SzvseVodDwQxp2+Q31Mr0tWQ4MKXsdJlU2cg=; b=HFox9CTcv72EPhFWt9xd7U4E42Jywe21HThzeidpPMFzZsYgSklnuzK/18a1ryuRdl J0UcJ6dGAvLwMG2ZGLsUyWFLx8UCAlZLEGktFXz05MhdUcnsnqPTc+/1CwKIUwfZhPsy Vv9FpaJkrGCWDt/UV2MVSnziNeyKTc5T3MDDPJxv3U5zKqzfPgUASfyM5SmRlcSHedO2 a5rC3qBBZ09JVsV5qaIRc+HKXucFoxsY/SXX35POZlCgz0zL3Zmp9x8UgLP86vs+kIxC iZfWGFdgQ/vOVGgr+B18jLaeYytPTz7J5AjFXqbfVU+zas+Rrhr8gPPtLXFfNZUKt3YM i/vA== X-Gm-Message-State: AJIora8uIhpH3XqAgsFgWdl6Zc+rs+9DUh6W5BaLeDd3Imb4FVUkxr+Z GOvW056GjNBJJDdUri8KqmVAcTdeujrFNCuNs4Oo1w== X-Received: by 2002:a25:d957:0:b0:66c:9476:708f with SMTP id q84-20020a25d957000000b0066c9476708fmr10600680ybg.427.1656338886354; Mon, 27 Jun 2022 07:08:06 -0700 (PDT) MIME-Version: 1.0 References: <20220623185730.25b88096@kernel.org> <20220624070656.GE79500@shbuild999.sh.intel.com> <20220624144358.lqt2ffjdry6p5u4d@google.com> <20220625023642.GA40868@shbuild999.sh.intel.com> <20220627023812.GA29314@shbuild999.sh.intel.com> <20220627123415.GA32052@shbuild999.sh.intel.com> In-Reply-To: <20220627123415.GA32052@shbuild999.sh.intel.com> From: Eric Dumazet Date: Mon, 27 Jun 2022 16:07:55 +0200 Message-ID: Subject: Re: [net] 4890b686f4: netperf.Throughput_Mbps -69.4% regression To: Feng Tang Cc: Shakeel Butt , Linux MM , Andrew Morton , Roman Gushchin , Michal Hocko , Johannes Weiner , Muchun Song , Jakub Kicinski , Xin Long , Marcelo Ricardo Leitner , kernel test robot , Soheil Hassas Yeganeh , LKML , network dev , linux-s390@vger.kernel.org, MPTCP Upstream , "linux-sctp @ vger . kernel . org" , lkp@lists.01.org, kbuild test robot , Huang Ying , Xing Zhengjun , Yin Fengwei , Ying Xu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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, Jun 27, 2022 at 2:34 PM Feng Tang wrote: > > On Mon, Jun 27, 2022 at 10:46:21AM +0200, Eric Dumazet wrote: > > On Mon, Jun 27, 2022 at 4:38 AM Feng Tang wrote: > [snip] > > > > > > > > > > Thanks Feng. Can you check the value of memory.kmem.tcp.max_usage_in_bytes > > > > > in /sys/fs/cgroup/memory/system.slice/lkp-bootstrap.service after making > > > > > sure that the netperf test has already run? > > > > > > > > memory.kmem.tcp.max_usage_in_bytes:0 > > > > > > Sorry, I made a mistake that in the original report from Oliver, it > > > was 'cgroup v2' with a 'debian-11.1' rootfs. > > > > > > When you asked about cgroup info, I tried the job on another tbox, and > > > the original 'job.yaml' didn't work, so I kept the 'netperf' test > > > parameters and started a new job which somehow run with a 'debian-10.4' > > > rootfs and acutally run with cgroup v1. > > > > > > And as you mentioned cgroup version does make a big difference, that > > > with v1, the regression is reduced to 1% ~ 5% on different generations > > > of test platforms. Eric mentioned they also got regression report, > > > but much smaller one, maybe it's due to the cgroup version? > > > > This was using the current net-next tree. > > Used recipe was something like: > > > > Make sure cgroup2 is mounted or mount it by mount -t cgroup2 none $MOUNT_POINT. > > Enable memory controller by echo +memory > $MOUNT_POINT/cgroup.subtree_control. > > Create a cgroup by mkdir $MOUNT_POINT/job. > > Jump into that cgroup by echo $$ > $MOUNT_POINT/job/cgroup.procs. > > > > > > > > The regression was smaller than 1%, so considered noise compared to > > the benefits of the bug fix. > > Yes, 1% is just around noise level for a microbenchmark. > > I went check the original test data of Oliver's report, the tests was > run 6 rounds and the performance data is pretty stable (0Day's report > will show any std deviation bigger than 2%) > > The test platform is a 4 sockets 72C/144T machine, and I run the > same job (nr_tasks = 25% * nr_cpus) on one CascadeLake AP (4 nodes) > and one Icelake 2 sockets platform, and saw 75% and 53% regresson on > them. > > In the first email, there is a file named 'reproduce', it shows the > basic test process: > > " > use 'performane' cpufre governor for all CPUs > > netserver -4 -D > modprobe sctp > netperf -4 -H 127.0.0.1 -t SCTP_STREAM_MANY -c -C -l 300 -- -m 10K & > netperf -4 -H 127.0.0.1 -t SCTP_STREAM_MANY -c -C -l 300 -- -m 10K & > netperf -4 -H 127.0.0.1 -t SCTP_STREAM_MANY -c -C -l 300 -- -m 10K & > (repeat 36 times in total) > ... > > " > > Which starts 36 (25% of nr_cpus) netperf clients. And the clients number > also matters, I tried to increase the client number from 36 to 72(50%), > and the regression is changed from 69.4% to 73.7%" > This seems like a lot of opportunities for memcg folks :) struct page_counter has poor field placement [1], and no per-cpu cache. [1] "atomic_long_t usage" is sharing cache line with read mostly fields. (struct mem_cgroup also has poor field placement, mainly because of struct page_counter) 28.69% [kernel] [k] copy_user_enhanced_fast_string 16.13% [kernel] [k] intel_idle_irq 6.46% [kernel] [k] page_counter_try_charge 6.20% [kernel] [k] __sk_mem_reduce_allocated 5.68% [kernel] [k] try_charge_memcg 5.16% [kernel] [k] page_counter_cancel > Thanks, > Feng > > > > > > > Thanks, > > > Feng