All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Farnum <gfarnum@redhat.com>
To: Sage Weil <sage@newdream.net>
Cc: Allen Samuels <Allen.Samuels@sandisk.com>,
	Jesse Williamson <jwilliamson@suse.de>,
	Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: Memory Pooling and Containers
Date: Fri, 30 Sep 2016 11:54:41 -0700	[thread overview]
Message-ID: <CAJ4mKGZSax+nCywtpowwubFt4iugVLEmt8Oi0PRWgWrjxStk4w@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1609301416270.19850@piezo.us.to>

On Fri, Sep 30, 2016 at 7:22 AM, Sage Weil <sage@newdream.net> wrote:
> On Wed, 28 Sep 2016, Allen Samuels wrote:
>> Boost::pool works very well when you're allocated "same" sized objects.
>> That's not our situation, we're allocating lots of different sized
>> objects -- some small, some large. The only way that Boost::pool
>> supports that situation is to use the "ordered_free" operation to keep
>> the freelist sorted (if you don't use it then you'll get fragmentation
>> that'll prevent allocation of large objects -- even though there's
>> plenty of free memory). The implementation of the sorted freelist is
>> O(N). Which should work well for small pools, but that's the exact
>> opposite of the desired use for Ceph, we're targeting large pools (think
>> 1GB).
>>
>> I didn't word it very well, but my proposal doesn't actually change the
>> underlying malloc/free algorithm, rather it's intended to put some
>> statistics around memory usage so that we can self-trim our memory
>> pools.
>
> We were doing some heap profiling yesterday and one interesting thing is
> that the utilized heap reported by tcmalloc is about 1/2 the RSS.  We
> probably want to consider creating separate pools for the handful of
> objects that are consuming the bulk of the heap.

Off-hand I'd say this is almost certainly the result of bumping the
thread cache sizes way up; I don't think it used to be the case. What
settings were being used?

> We did this a few years back in the MDS and IIRC it helped significantly
> with memory utilization there.

More than a "few" years, but yes.
-Greg

      parent reply	other threads:[~2016-09-30 18:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27 20:30 Memory Pooling and Containers Allen Samuels
2016-09-27 23:00 ` Gregory Farnum
2016-09-28  9:13   ` Allen Samuels
2016-09-28 13:16   ` Sage Weil
2016-09-28 13:27 ` Sage Weil
2016-09-28 13:34   ` Haomai Wang
2016-09-28 15:56     ` Allen Samuels
2016-09-28 19:39     ` Allen Samuels
2016-09-28 15:56   ` Allen Samuels
2016-09-28 21:16   ` Jesse Williamson
2016-09-28 21:31     ` Allen Samuels
2016-09-30 14:22       ` Sage Weil
2016-09-30 14:30         ` Allen Samuels
2016-09-30 21:47           ` Jesse Williamson
2016-09-30 18:54         ` Gregory Farnum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ4mKGZSax+nCywtpowwubFt4iugVLEmt8Oi0PRWgWrjxStk4w@mail.gmail.com \
    --to=gfarnum@redhat.com \
    --cc=Allen.Samuels@sandisk.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jwilliamson@suse.de \
    --cc=sage@newdream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.