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 X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F26AC433B4 for ; Mon, 12 Apr 2021 15:22:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0978E61354 for ; Mon, 12 Apr 2021 15:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0978E61354 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7B3DD6B0036; Mon, 12 Apr 2021 11:22:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 763ED6B006E; Mon, 12 Apr 2021 11:22:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DD596B0070; Mon, 12 Apr 2021 11:22:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id 3D7A06B0036 for ; Mon, 12 Apr 2021 11:22:14 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D3EAD82499B9 for ; Mon, 12 Apr 2021 15:22:13 +0000 (UTC) X-FDA: 78024080946.22.3F06219 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by imf01.hostedemail.com (Postfix) with ESMTP id 982295001528 for ; Mon, 12 Apr 2021 15:22:12 +0000 (UTC) Received: by mail-qt1-f176.google.com with SMTP id h7so10185997qtx.3 for ; Mon, 12 Apr 2021 08:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ERqCI38M3BY/3SOC3pgh5AxFU4XWzgptnCfUipXNgug=; b=gYe5Up3OaU/+pnMLbIoo4fGw8EW/wVqIDfiJjiTGlAuevEjxM8fhcVcYjWLc0Hd4xP hA6vETqs5aigURkzuBOUUcrJ4MqW2iIZ5cg0KuyXY8cdfwDMzNf5JJD/gqlIeb9tz69t H243bX0LV289m2WtQZ/bQCHN7SztQEZBGdUaTI2tC9mBQleVY4txXKniVPtyH+OFYHXm ughPAw0w12CqzIGqmA21Axu1+8CSR2LvwYHJL81CVAbjVQY8aljszWj/80+/lOdtGUav b4tmg4wfnrQrNMktySbmYn6clgC6g+45rMuz+OqwSCpdRoCxHtc+G1Tu9EvbNDyffDjk 241Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ERqCI38M3BY/3SOC3pgh5AxFU4XWzgptnCfUipXNgug=; b=XjvIr2FDlq7ftYev69iX7XosVYLvLOgYcSBU2kcTvIQ1CT+4FwR+NWOfGCl0GWy7+F u2xDSoMlEYVQ78dShMyddtKxQRuORBHemzZTLxiTnRYXVPSU0EJjNKuS9bpaRTcuQdf2 /TfuG4cShq62BTVIITqGmPLoIsP6Wq0j5OLVyaLGDlYWDXgtZv0UrLT8atBy8y0uoZxc NSi+zo074+1mHkC4FfMfq47Ncv6O+PrDuQVd0M/qCuC6e8OeWecc0WnLv+lYF/qAa4sJ Xfk3faD+yMW50GoKcoTJfHSQb9aYa4HXa4NOLSlyxoSgixUESXiEXlGkyPmNNN2X+bJK wRoQ== X-Gm-Message-State: AOAM533XFs8rMxaNyUvGbNsro1TAjGISRq9OQOue01WNF8fR55mH5FvB SqXgxvLJK4opddHVGp6zXg== X-Google-Smtp-Source: ABdhPJymbpZZrzMCeOaHb6/natGXfsZNfOau++lTB9IrDdCmP1dtFXSCCOxYCzhxwTeeGtbH9vvDwQ== X-Received: by 2002:ac8:7fd0:: with SMTP id b16mr26146035qtk.91.1618240932927; Mon, 12 Apr 2021 08:22:12 -0700 (PDT) Received: from gabell (209-6-122-159.s2973.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [209.6.122.159]) by smtp.gmail.com with ESMTPSA id 62sm2469286qtg.70.2021.04.12.08.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 08:22:12 -0700 (PDT) Date: Mon, 12 Apr 2021 11:22:10 -0400 From: Masayoshi Mizuma To: Shakeel Butt Cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Vladimir Davydov , Cgroups , Linux MM Subject: Re: memcg: performance degradation since v5.9 Message-ID: <20210412152210.y5bizdfbn62sgeqg@gabell> References: <20210408193948.vfktg3azh2wrt56t@gabell> <20210409163539.5374pde3u6gkbg4a@gabell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 982295001528 X-Stat-Signature: ejsm5nmadxmh5cwnme315goy8g7d98fn Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf01; identity=mailfrom; envelope-from=""; helo=mail-qt1-f176.google.com; client-ip=209.85.160.176 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618240932-822269 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 Fri, Apr 09, 2021 at 09:50:45AM -0700, Shakeel Butt wrote: > On Fri, Apr 9, 2021 at 9:35 AM Masayoshi Mizuma wrote: > > > [...] > > > Can you please explain how to read these numbers? Or at least put a % > > > regression. > > > > Let me summarize them here. > > The total duration ('total' column above) of each system call is as follows > > if v5.8 is assumed as 100%: > > > > - sendto: > > - v5.8 100% > > - v5.9 128% > > - v5.12-rc6 116% > > > > - revfrom: > > - v5.8 100% > > - v5.9 114% > > - v5.12-rc6 108% > > > > Thanks, that is helpful. Most probably the improvement of 5.12 from > 5.9 is due to 3de7d4f25a7438f ("mm: memcg/slab: optimize objcg stock > draining"). > > [...] > > > > > > One idea would be to increase MEMCG_CHARGE_BATCH. > > > > Thank you for the idea! It's hard-corded as 32 now, so I'm wondering it may be > > a good idea to make MEMCG_CHARGE_BATCH tunable from a kernel parameter or something. > > > Hi! Thank you for your comments! > Can you rerun the benchmark with MEMCG_CHARGE_BATCH equal 64UL? Yes, I reran the benchmark with MEMCG_CHARGE_BATCH == 64UL, but it seems that it doesn't reduce the duration of system calls... - v5.12-rc6 vanilla syscall total (msec) --------- -------- sendto 3049.221 recvfrom 2421.601 - v5.12-rc6 with MEMCG_CHARGE_BATCH==64 syscall total (msec) --------- -------- sendto 3071.607 recvfrom 2436.488 > I think with memcg stats moving to rstat, the stat accuracy is not an > issue if we increase MEMCG_CHARGE_BATCH to 64UL. Not sure if we want > this to be tuneable but most probably we do want this to be sync'ed > with SWAP_CLUSTER_MAX. Thanks. I understand that. Waiman posted some patches to reduce the overhead [1]. I'll try the patch. [1]: https://lore.kernel.org/linux-mm/51ea6b09-b7ee-36e9-a500-b7141bd3a42b@redhat.com/T/#me75806a3555e7a42e793f099b98c42e687962d10 Thanks! Masa