From: Michal Hocko <mhocko@kernel.org>
To: jingrui <jingrui@huawei.com>
Cc: "tj@kernel.org" <tj@kernel.org>, Lizefan <lizefan@huawei.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"vdavydov.dev@gmail.com" <vdavydov.dev@gmail.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
caihaomin <caihaomin@huawei.com>,
"Weiwei (N)" <wick.wei@huawei.com>
Subject: Re: PROBLEM: cgroup cost too much memory when transfer small files to tmpfs
Date: Fri, 24 Jul 2020 09:55:08 +0200 [thread overview]
Message-ID: <20200724075508.GF4061@dhcp22.suse.cz> (raw)
In-Reply-To: <2E04DD7753BE0E4ABABF0B664610AD6F2620CAF7@dggeml528-mbx.china.huawei.com>
On Tue 21-07-20 11:19:52, jingrui wrote:
[...]
> systemd related issue: https://github.com/systemd/systemd/issues/16499
Well, I would be really careful with one-off and short lived cgroups.
Firstly there are charges which cannot be easily reparented and secondly
even if the memory footprint is reduced there would be still memcgs
standing in the way.
[...]
> 1. Do we have any idea to descrease cgroup memory cost in this case?
Others have already commented on this.
> 2. When user remove cgroup directory, does it possible associated file memory to root cgroup?
We used to do that in the past but removed it by b2052564e66d ("mm:
memcontrol: continue cache reclaim from offlined groups"). Please read
through the changelog for the reasoning behind.
> 3. Can we provide an option that do not associate memory with cgroup in tmpfs?
What is the reason to run under !root cgroup in those sessions if you do
not care about accounting anyway? tmpfs is a persistent charge until the
file is removed. So if those outlive the session then you either want
them to be charged to somebody or you do not care about accounting at
all, no? Or could you explain your usecase some more?
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2020-07-24 7:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 11:19 jingrui
2020-07-21 14:45 ` Shakeel Butt
2020-07-21 17:41 ` Johannes Weiner
2020-07-21 18:49 ` Roman Gushchin
2020-07-21 19:12 ` Shakeel Butt
2020-07-21 19:27 ` Roman Gushchin
2020-07-24 7:55 ` Michal Hocko [this message]
2020-07-24 9:35 ` 答复: " jingrui
2020-07-24 11:35 ` Michal Hocko
2020-07-27 3:14 ` jingrui
2020-07-27 13:40 ` 答复: " Fangxiuning (Jack, EulerOS)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724075508.GF4061@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=caihaomin@huawei.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jingrui@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
--cc=vdavydov.dev@gmail.com \
--cc=wick.wei@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox