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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 3153EC43460 for ; Wed, 7 Apr 2021 13:57:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ACADA6128D for ; Wed, 7 Apr 2021 13:57:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACADA6128D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B2766B007D; Wed, 7 Apr 2021 09:57:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 389E56B007E; Wed, 7 Apr 2021 09:57:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22ACD6B0080; Wed, 7 Apr 2021 09:57:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id 0B6E06B007D for ; Wed, 7 Apr 2021 09:57:06 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B72298248047 for ; Wed, 7 Apr 2021 13:57:05 +0000 (UTC) X-FDA: 78005722410.02.8BF743E Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf02.hostedemail.com (Postfix) with ESMTP id C7F6E40002C0 for ; Wed, 7 Apr 2021 13:56:56 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617803824; h=from:from:reply-to: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=pwO1DsR3SPZxNfUe3od4dUeQ81IfvuFB83507+tgJSo=; b=TqfScE0QVTZ5+ZdbtUGTHTiCO8/jJyFNR70Jx7Fe3iPxfmCROuP6POiD3jZspSl0W0Lzh6 uSTtT5AACi1E9QVY0iN5M2dUxkQApYMzlnLoTl04PRsZpqsJveetcL5fEcuchi7qtXGqvj cWiWcJ4pKHXEOmzZvYwWtld0qfaasPM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EA95CAE6D; Wed, 7 Apr 2021 13:57:03 +0000 (UTC) Date: Wed, 7 Apr 2021 15:57:02 +0200 From: Michal Hocko To: Bharata B Rao Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, aneesh.kumar@linux.ibm.com Subject: Re: High kmalloc-32 slab cache consumption with 10k containers Message-ID: References: <20210405054848.GA1077931@in.ibm.com> <20210407134342.GA1386511@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407134342.GA1386511@in.ibm.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C7F6E40002C0 X-Stat-Signature: gyayt93r88c1qbauids5crjnae4ycgi7 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617803816-590469 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 Wed 07-04-21 19:13:42, Bharata B Rao wrote: > On Wed, Apr 07, 2021 at 01:54:48PM +0200, Michal Hocko wrote: > > On Mon 05-04-21 11:18:48, Bharata B Rao wrote: > > > Hi, > > > > > > When running 10000 (more-or-less-empty-)containers on a bare-metal Power9 > > > server(160 CPUs, 2 NUMA nodes, 256G memory), it is seen that memory > > > consumption increases quite a lot (around 172G) when the containers are > > > running. Most of it comes from slab (149G) and within slab, the majority of > > > it comes from kmalloc-32 cache (102G) > > > > Is this 10k cgroups a testing enviroment or does anybody really use that > > in production? I would be really curious to hear how that behaves when > > those containers are not idle. E.g. global memory reclaim iterating over > > 10k memcgs will likely be very visible. I do remember playing with > > similar setups few years back and the overhead was very high. > > This 10k containers is only a test scenario that we are looking at. OK, this is good to know. I would definitely recommend looking at the runtime aspect of such a large scale deployment before optimizing for memory footprint. I do agree that the later is an interesting topic on its own but I do not expect such a deployment on small machines so the overhead shouldn't be a showstopper. I would be definitely interested to hear about the runtime overhead. I do expect some interesting finidings there. Btw. I do expect that memory controller will not be the only one deployed right? -- Michal Hocko SUSE Labs