Closed Bug 646913 Opened 14 years ago Closed 13 years ago

Massive memory usage when viewing


(Core :: General, defect)

2.0 Branch
Windows Server 2008
Not set





(Reporter: bigig, Unassigned)


(Whiteboard: [MemShrink])

User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Build Identifier: 4.0 RTM

Just installed FF4 (RTM) a few days ago, running on Windows Server 2008R2sp1 on an intel core i7 with 9GB RAM. Whenever I open FF's memory usage goes through the roof. It climbs steadily for several minutes to about 1GB Private Bytes (in taskmanager), then it seems to stabilize there. But FF perf by then is noticably sluggish -- about 1/2 sec lag after most UI actions, making it borderline unusable.

Doing the same in FF 3.6.13 on a different machine does not show this behavior, memory quickly stabilizes around 85MB Private Bytes.

I've seen several memory bugs logged but none of them have specific repro, for me at least this simple repro is very consistent.

Have tried the repro in safe mode, the behavior is identical. 

Reproducible: Always

Steps to Reproduce:
1. Launch FF 4.0 (in safe mode if you like)
2. Navigate to
3. Open Task Manager or similar and watch firefox.exe memory usage.
Actual Results:  
Memory slowly climbs to an absurd level as described above. 

Expected Results:  
I'd expect more "reasonable" memory usage, closer to what FF3.6 exhibitsfor the same scenario.
OS: Other → Windows Server 2008
Version: unspecified → 4.0 Branch
Can you give Info of "about:memory" Content opening just about:blank and compare it with opening

Does disabling Plugins (e.g. Flash) - what are enabled in Safemode - make a Difference?
about:memory output with a single about:blank tab open
    Memory mapped: 38,797,312
    Memory in use: 33,782,048

    Other Information
    malloc/allocated: 33,786,680
    malloc/mapped: 38,797,312
    malloc/committed: 36,503,552
    malloc/dirty: 1,208,320
    win32/privatebytes: 64,131,072
    win32/workingset: 81,055,744
    js/gc-heap: 5,242,880
    js/string-data: 1,885,280
    js/mjit-code: 11,828
    gfx/d2d/surfacecache: 0
    gfx/d2d/surfacevram: 0
    gfx/surface/win: 32421,520
    images/chrome/used/raw: 0
    images/chrome/used/uncompressed: 368,740
    images/chrome/unused/raw: 0
    images/chrome/unused/uncompressed: 1,060
    images/content/used/raw: 22,505
    images/content/used/uncompressed: 47,440
    images/content/unused/raw: 0
    images/content/unused/uncompressed: 0
    storage/sqlite/pagecache: 2,584,808
    storage/sqlite/other: 953,360
    layout/all: 460,882
    layout/bidi: 0
    gfx/surface/image: 5,520

about:memory with open after about 30 minutes (not safe mode, all addons disabled but flash plugin enabled)
    Memory mapped: 1,557,135,360
    Memory in use: 1,494,544,582
    Other Information
    malloc/allocated: 1,494,548,510
    malloc/mapped: 1,557,135,360
    malloc/committed: 1,526,493,184
    malloc/dirty: 2,285,568
    win32/privatebytes: 1,566,642,176
    win32/workingset: 1,554,739,200
    js/gc-heap: 249,561,088
    js/string-data: 3,867,620
    js/mjit-code: 744,568
    gfx/d2d/surfacecache: 0
    gfx/d2d/surfacevram: 0
    gfx/surface/win: 32574,912
    images/chrome/used/raw: 0
    images/chrome/used/uncompressed: 371,848
    images/chrome/unused/raw: 0
    images/chrome/unused/uncompressed: 0
    images/content/used/raw: 394,407
    images/content/used/uncompressed: 13,928
    images/content/unused/raw: 0
    images/content/unused/uncompressed: 0
    storage/sqlite/pagecache: 10,769,560
    storage/sqlite/other: 1,127,032
    layout/all: 144,628,146
    layout/bidi: 0
    gfx/surface/image: 6,624
    shmem/allocated: 32,768
    shmem/mapped: 32,768
    content/canvas/2d_pixel_bytes: 180,000
about:memory output after running for 10 minutes with open in a single tab, in safe mode, with all plugins disabled:
    Memory mapped: 894,435,328
    Memory in use: 868,519,080
    Other Information
    malloc/allocated: 868,523,712
    malloc/mapped: 894,435,328
    malloc/committed: 886,784,000
    malloc/dirty: 3,338,240
    win32/privatebytes: 927,502,336
    win32/workingset: 917,815,296
    js/gc-heap: 143,654,912
    js/string-data: 1,798,654
    js/mjit-code: 0
    gfx/d2d/surfacecache: 0
    gfx/d2d/surfacevram: 0
    gfx/surface/win: 329,161,511
    images/chrome/used/raw: 0
    images/chrome/used/uncompressed: 500,356
    images/chrome/unused/raw: 0
    images/chrome/unused/uncompressed: 0
    images/content/used/raw: 407,819
    images/content/used/uncompressed: 8,456,863
    images/content/unused/raw: 7,932
    images/content/unused/uncompressed: 17,764
    storage/sqlite/pagecache: 8,749,648
    storage/sqlite/other: 1,250,768
    layout/all: 82,561,545
    layout/bidi: 0
    gfx/surface/image: 6,624
    content/canvas/2d_pixel_bytes: 180,000
Product: Firefox → Core
QA Contact: general → general
Version: 4.0 Branch → 2.0 Branch
That's pretty weird....  Looks like a huge amount of gc heap and layout memory in comment 2; a lot of it goes away in comment 3, but not nearly all.  And even so, those numbers only account for about a third of the allocated memory.

I see about 70MB of memory allocated total (50 in firefox, 20 in the Flash process) when I load  But that's on a 64-bit Mac system....

Reporter, if you create a new profile alongside your old one, do you still see the problem?
Sorry Boris, I'm not sure what you mean by "create a new profile alongside the old one." Could you elaborate, and I'll be happy to try it. should have instructions on doing that.  Please let me know if any of them don't make sense, ok?
Ok thanks. I created a new profile, and i do NOT see the problem when I launch with the new profile.

So the problem seems to be related to my upgraded profile. What could there be in the profile that's causing the problem?
Sorry for the lag here... This got lost, somehow.  :(

If you can still reproduce this, I'd try copying the prefs.js from the old profile to the new one and seeing whether that causes the problem.  If so, we can look for the specific pref responsible.  If not, I'll try to figure out what else to try.
Whiteboard: [MemShrink]
Ever confirmed: true
It's also worth noting that FF7 (currently in beta) has fixed tons of memory usage problems that were in FF4.  The output from about:memory is also much better.
In the MemShrink meeting we decided to close this, because heaps of memory problems have been fixed since FF4 and it doesn't appear to be reproducible.  bigig, please reopen if you can reproduce in FF7 (currently in beta) or later.
Closed: 13 years ago
Resolution: --- → FIXED
I forgot to mention I can't reproduce this in Firefox 8.0a2.
You need to log in before you can comment on or make changes to this bug.