Changeset range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=763ff2d737e7&tochange=1ad1fd67e97a
Changesets:
* http://hg.mozilla.org/mozilla-central/rev/2b2f584dc5fd
: Paul Biggar <pbi...@mozilla.com>, Jason Evans <jas...@canonware.com> and Dale Kim <dale...@illinois.edu> - Bug 414946 (part 1): Fix jemalloc on Mac, but leave disabled (r=pavlov)
Overwrite the OSX default zone allocator, taking into account the malloc_zone_t
version (supported versions are 3, 6, and 8) for Leopard, Snow Leopard and
Lion. jemalloc can be dynamically disabled for unknown malloc_zone_t versions,
for OSX 10.8 and beyond.
The changeset does not enable jemalloc, to allow for easy disabling if there's
a problem. It will be enabled in the next changeset.
This should be a 15-20% improvement in memory usage.
: http://bugzilla.mozilla.org/show_bug.cgi?id=414946
* http://hg.mozilla.org/mozilla-central/rev/1ad1fd67e97a
: Paul Biggar <pbi...@mozilla.com> - Bug 414946 (part 2): Enable jemalloc on Mac (r=pavlov)
: http://bugzilla.mozilla.org/show_bug.cgi?id=414946
> Regression :( Tp5 (RSS) increase 19.4% on MacOSX 10.5.8 Firefox
> ---------------------------------------------------------------
> Previous: avg 176938400.000 stddev 3183489.785 of 30 runs up to revision
> 763ff2d737e7
> New : avg 211186200.000 stddev 3133763.903 of 5 runs since revision
> 1ad1fd67e97a
> Change : +34247800.000 (19.4% / z=10.758)
> Graph : http://mzl.la/oX09g4
>
> Changeset range:
> http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=763ff2d737e7&tochange=1ad1fd67e97a
>
> Changesets:
> * http://hg.mozilla.org/mozilla-central/rev/2b2f584dc5fd
> : Paul Biggar <pbi...@mozilla.com>, Jason Evans <jas...@canonware.com>
> and Dale Kim <dale...@illinois.edu> - Bug 414946 (part 1): Fix jemalloc
> on Mac, but leave disabled (r=pavlov)
>
> Overwrite the OSX default zone allocator, taking into account the
> malloc_zone_t
> version (supported versions are 3, 6, and 8) for Leopard, Snow Leopard and
> Lion. jemalloc can be dynamically disabled for unknown malloc_zone_t
> versions,
> for OSX 10.8 and beyond.
>
> The changeset does not enable jemalloc, to allow for easy disabling if
> there's
> a problem. It will be enabled in the next changeset.
>
> This should be a 15-20% improvement in memory usage.
> : http://bugzilla.mozilla.org/show_bug.cgi?id=414946
>
> * http://hg.mozilla.org/mozilla-central/rev/1ad1fd67e97a
> : Paul Biggar <pbi...@mozilla.com> - Bug 414946 (part 2): Enable
> jemalloc on Mac (r=pavlov)
> : http://bugzilla.mozilla.org/show_bug.cgi?id=414946
>
> Bugs:
> * http://bugzilla.mozilla.org/show_bug.cgi?id=414946
> _______________________________________________
> dev-tree-management mailing list
> dev-tree-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tree-management
>
We expected a 15-20% improvement and got a 20% regression?
- Kyle
I only tested this on 10.6 I confess. I'll look at the 10.6 graphs
shortly to make sure that it did have the desired effect. It's pretty
easy to turn this off on 10.5 only.
Another possibility is that I'm aware of the RSS increase, but the
measure we actually care about isnt RSS. I remember something like
this from my notes, but I'll have to look again.
Paul
--
Paul Biggar
Compiler Geek
pbi...@mozilla.com
@paulbiggar
Just to clarify, I tested the 32-bit version on 10.6, not on 10.5. But
I dont think that's the problem, see below.
> Another possibility is that I'm aware of the RSS increase, but the
> measure we actually care about isnt RSS. I remember something like
> this from my notes, but I'll have to look again.
My notes on performance are at
https://bugzilla.mozilla.org/show_bug.cgi?id=414946#c101. In
particular, I noted at the time that jemalloc doesn't actively return
memory to the OS until it is asked to, which means that RSS doesn't go
down until something else asks for that memory. Does Tp5 have
something trying to reclaim that memory? If not, then this increase is
not a real problem, but a problem with how/what we measure (unless my
assumptions are wrong).
The raw numbers looked like this:
Number are in the form: Full load -> closed tabs ->
after a while
Mac, 32bit, Private mem: 464 -> 130 -> 120
jemalloc, 32bit, Private mem: 426 -> 288 -> 91
Mac, 32bit, Real mem: 579 -> 420 -> 402
jemalloc, 32bit, Real mem: 581 -> 446 -> 207
"Real mem" is RSIZE (which I'm pretty sure is RSS), "Private mem" is
RPRVT (RSIZE - shared memory).
The process to measure this was described in the comment, but in summary:
1. open a ton of tabs, then measure "Full load"
2. close those tabs and wait a short while, then measure "closed tabs"
3. Launch a background process which uses tons of memory, then measure
"after a while".
So what's apparent from this is that the memory usage only drops with
jemalloc after another process asks for it. Is the way I've measured
correct, and if so, should we ignore the Tp5 regression? (CCing njn
for a hopefully definitive answer).
Paul
PS Due to bug 670175 I think we'll be disabling jemalloc soon anyway.
But I'd love to figure this out definitively for when we (hopefully)
reenable it.
It would be instructive to compared Linux and Windows runs with and
without jemalloc enabled, to see if the same thing happens.
Nick
It sounds plausible; AIUI Tp5 (RSS) is measured at 20 second
intervals and then all the measurements are averaged, so if jemalloc
is holding onto things longer it could increase the measurements.
Nick
Backing out shortly.
On Fri, Jul 8, 2011 at 20:07, Nicholas Nethercote
<n.neth...@gmail.com> wrote:
> On Sat, Jul 9, 2011 at 1:06 PM, Nicholas Nethercote
> <n.neth...@gmail.com> wrote:
>>
>> It sounds plausible; AIUI Tp5 (RSS) is measured at 20 second
>> intervals and then all the measurements are averaged, so if jemalloc
>> is holding onto things longer it could increase the measurements.
>
> It would be instructive to compared Linux and Windows runs with and
> without jemalloc enabled, to see if the same thing happens.
>
> Nick
>
--