linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* PROBLEM: cgroup cost too much memory when transfer small files to tmpfs
@ 2020-07-21 11:19 jingrui
  2020-07-21 14:45 ` Shakeel Butt
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: jingrui @ 2020-07-21 11:19 UTC (permalink / raw)
  To: tj, Lizefan, hannes, hannes, mhocko, vdavydov.dev
  Cc: akpm, linux-mm, cgroups, linux-kernel, caihaomin, Weiwei (N)

Cc: Johannes Weiner <hannes@cmpxchg.org> ; Michal Hocko <mhocko@kernel.org>; Vladimir Davydov <vdavydov.dev@gmail.com>

Thanks.

---
PROBLEM: cgroup cost too much memory when transfer small files to tmpfs.

keywords: cgroup PERCPU/memory cost too much.

description:

We send small files from node-A to node-B tmpfs /tmp directory using sftp. On
node-B the systemd configured with pam on like below.

cat /etc/pam.d/password-auth | grep systemd
-session     optional      pam_systemd.so

So when transfer a file, a systemd session is created, that means a cgroup is
created, then file saved at /tmp will associated with a cgroup object. After
file transferred, session and cgroup-dir will be removed, but the file in /tmp
still associated with the cgroup object. The PERCPU memory in cgroup/css object
cost a lot(about 0.5MB/per-cgroup-object) on 200/cpus machine.

When lot of small files transferred to tmpfs, the cgroup/css object memory
cost become huge in this scenes to be used.

systemd related issue: https://github.com/systemd/systemd/issues/16499

kernel version: 4.19+

Problem:

1. Do we have any idea to descrease cgroup memory cost in this case?
2. When user remove cgroup directory, does it possible associated file memory to root cgroup?
3. Can we provide an option that do not associate memory with cgroup in tmpfs?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-27 13:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 11:19 PROBLEM: cgroup cost too much memory when transfer small files to tmpfs 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
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)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).