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

From: jingrui
Date: Sun Jul 26 2020 - 23:14:43 EST


Cc Fangxiuning

On Fri 24-07-20 09:35:26, jingrui wrote:
>
> 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.

Could you be more specific please?

As I know, when user call sftp client to send files, the server will call pam-systemd.so lib to create session and cgroup.
We can skip call pam-systemd.so by config /etc/pam.d/password-auth drop the line " -session optional pam_systemd.so".
But this config is global, and will affect other services, such as ssh login. We don’t find a way just don’t create cgroup dir for sftp.

@Xiuning Would you please take a look and give some suggestion?

--
Michal Hocko
SUSE Labs