lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PROBLEM: cgroup cost too much memory when transfer small files to tmpfs
    On Tue, Jul 21, 2020 at 11:19:52AM +0000, jingrui wrote:
    > 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.

    CC Roman who had a patch series to free all this extended (percpu)
    memory upon cgroup deletion:

    https://lore.kernel.org/patchwork/cover/1050508/

    It looks like it never got merged for some reason.

    \
     
     \ /
      Last update: 2020-07-21 19:43    [W:6.544 / U:0.232 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site