答复: PROBLEM: cgroup cost too much memory when transfer small files to tmpfs

From: jingrui
Date: Fri Jul 24 2020 - 05:35:39 EST



On Friday, July 24, 2020 3:55 PM, Michal Hocko wrote:

> What is the reason to run under !root cgroup in those sessions if you do not care about accounting anyway?

The systemd not support run those sessions under root cgroup, disable
pam-systemd will not create session/cgroup, but this is not safe and make
systemd-logind not work.

> 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?

In some usecase, we dont have disk and keep files in memory, we treat tmpfs
just like disk, so dont care tmpfs accouting at all.

--
Jingrui
BR.