More aggressive page purging

Mike Hommey mh+jemalloc at glandium.org
Fri May 11 21:56:24 PDT 2012


On Fri, May 11, 2012 at 06:26:55PM -0700, Justin Lebar wrote:
> On May 11, 2012 5:16 PM, "Jason Evans" <jasone at canonware.com> wrote:
> >
> > On May 10, 2012, at 11:55 AM, Justin Lebar wrote:
> > >>> In summary, I don't think there's a problem here to fix.  Am I missing
> > >>> something?
> > >>
> > >> We could use RSS - number of madvised pages, for sure, but that doesn't
> > >> quite help with people looking at their task manager ans seeing memory
> > >> usage 1GB higher than what it actually is. (And it doesn't help to make
> > >> the numbers Firefox itself reports believable)
> > >
> > > Yeah, the perception problem ("I looked at the task manager and
> > > Firefox sux!") is a real one that, from MemShrink's perspective, we
> > > need to solve.
> >
> > It's unfortunate that the operating systems don't expose statistics that
> provide clarity here.  I don't want to make aggressive purging default
> behavior,
> 
> To be clear, what we do at moment is purge only right before we query the
> OS for our RSS. In practice, this happens whenever we load about:memory or
> run a telemetry ping, which happens every few (five?) minutes when the
> browser is idle.
> 
> Its not ideal from the standpoint of a user looking at the task manager,
> but at least our stats are correct.

I think we could also (or at least try to) run it after some GCs.

> I think we'd want the same behavior, purging only upon a malctl, rather
> than automatically.

That's what I was suggesting, using the existing arenas.purge control.

Mike



More information about the jemalloc-discuss mailing list