Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp881100pxf; Wed, 7 Apr 2021 14:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjcbj79HHXQe8z10b5xrN2iZ782JI23/F7TvXSwRnt18TXOhFFuIRswQCdIAjhRQlVzwdp X-Received: by 2002:aa7:c455:: with SMTP id n21mr2773416edr.48.1617829365066; Wed, 07 Apr 2021 14:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829365; cv=none; d=google.com; s=arc-20160816; b=MoYxl9djt2OdwessT7Egd0YFipu+DDxyKepGP3ayJAzIB449OcxTZT8UpD5RFNh1bY CI9Qw8Ky6/6DOOAzhjJADTXgOkGP3tT4Dx0Nw+K8OIge+RkF18nzvdXFEaY8DNaP2GwB EBcmamAVQUNnGoZyKfeKsKRf40aerzXKJrvpWuRQwySgPR2j7b8NAyW3yn0uZNdRZRxk zPDr0Q0kzAvaKc1SpV89KUrHElAgCaAm+JdZw8j+RSGiOH9KOvsRLlEWjpa7oRyZdlp7 qV+ZZ4edYd/wGjuMDLeMu5MWMeQNZhwWBJiWZTEu32PHqfr3EirvqE5z+LGj6hq2tYsK cl+w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0F2QaGxq5xqnbrPGhQ07GBjpQrv7mKFJA6ZLIFHKAp4=; b=ssBup9sWp/GOg2/5csoeaSSPqqJQ8PYgxoM5+3u+1DsdWqZI4TnQJmT54g830IL8AB 91IHtOQ2jVQCZCydpqV85c6F7Je7Qb8kyRt0ZGIz5n0vXMnhU9o5lfGyM6Byyk2EnNkZ G83uKbT0n8f677EjmMa5pvlOBK8x6nrIh3dl+ewpsitgLusXDJVU7qNp4zjmItDAH4ky eNuN5Zq5of86nB9VdWiYPY2w6AToBGsgCVKhX6Kg9k+XgETpz92061rL71OpVmKlOBCK sOZ+gBdamKo7hNIp7JflEUQAar61xIWDDBdQ5PVMqA/05NMf+nqPrOGZfm/KcBz+YGlR R4gA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si19695873edp.405.2021.04.07.14.02.21; Wed, 07 Apr 2021 14:02:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245171AbhDGNcq (ORCPT + 99 others); Wed, 7 Apr 2021 09:32:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235738AbhDGNco (ORCPT ); Wed, 7 Apr 2021 09:32:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFA02601FB; Wed, 7 Apr 2021 13:32:32 +0000 (UTC) Date: Wed, 7 Apr 2021 15:32:30 +0200 From: Christian Brauner To: Michal Hocko , stgraber@ubuntu.com Cc: Bharata B Rao , 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: <20210407133230.6slrpyjjfrc34s7u@wittgenstein> References: <20210405054848.GA1077931@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Ccing Stéphane Graber who has experience/insight about stuff like this. Christian