lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH RFC 00/14] The new slab memory controller
    On Fri, Sep 20, 2019 at 1:22 AM Roman Gushchin <guro@fb.com> wrote:
    >
    > On Thu, Sep 19, 2019 at 10:39:18PM +0900, Suleiman Souhlal wrote:
    > > On Fri, Sep 6, 2019 at 6:57 AM Roman Gushchin <guro@fb.com> wrote:
    > > > The patchset has been tested on a number of different workloads in our
    > > > production. In all cases, it saved hefty amounts of memory:
    > > > 1) web frontend, 650-700 Mb, ~42% of slab memory
    > > > 2) database cache, 750-800 Mb, ~35% of slab memory
    > > > 3) dns server, 700 Mb, ~36% of slab memory
    > >
    > > Do these workloads cycle through a lot of different memcgs?
    >
    > Not really, those are just plain services managed by systemd.
    > They aren't restarted too often, maybe several times per day at most.
    >
    > Also, there is nothing fb-specific. You can take any new modern
    > distributive (I've tried Fedora 30), boot it up and look at the
    > amount of slab memory. Numbers are roughly the same.

    Ah, ok.
    These numbers are kind of surprising to me.
    Do you know if the savings are similar if you use CONFIG_SLAB instead
    of CONFIG_SLUB?

    > > For workloads that don't, wouldn't this approach potentially use more
    > > memory? For example, a workload where everything is in one or two
    > > memcgs, and those memcgs last forever.
    > >
    >
    > Yes, it's true, if you have a very small and fixed number of memory cgroups,
    > in theory the new approach can take ~10% more memory.
    >
    > I don't think it's such a big problem though: it seems that the majority
    > of cgroup users have a lot of them, and they are dynamically created and
    > destroyed by systemd/kubernetes/whatever else.
    >
    > And if somebody has a very special setup with only 1-2 cgroups, arguably
    > kernel memory accounting isn't such a big thing for them, so it can be simple
    > disabled. Am I wrong and do you have a real-life example?

    No, I don't have any specific examples.

    -- Suleiman

    \
     
     \ /
      Last update: 2019-09-19 23:10    [W:2.881 / U:1.852 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site