Closed
Bug 252694
Opened 20 years ago
Closed 16 years ago
222+ MB memory usage on single text page
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: juy0gy802, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040722 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040722 Firefox/0.9.1+
My problem (bug?) is a large-ish text url (all tables stuff) that totally
crapsout FF (FireFox). The page is about 6 MB of text and links
and comsumes more than 222 MB of memory. Due to my memory constraints
FF gets totally IO bound thrashing in swap. I have captured a few snap-
shots of top loading this page locally with some comments interspersed.
I can open and use fine in Lynx and Links.
I think this is the show stopper showing what many others are seeing
opening many tabs etc. I hope this simple example will help with a
fix.
snapshots-
--------start couple of xterms (rxvt) Vi and Top--------
top - 11:30:54 up 4 min, 1 user, load average: 0.02, 0.08, 0.04
Tasks: 28 total, 1 running, 27 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.3% system, 0.0% nice, 99.7% idle
Mem: 58356k total, 49716k used, 8640k free, 4284k buffers
Swap: 256960k total, 0k used, 256960k free, 25752k cached
--------start FF-------
top - 11:32:06 up 5 min, 1 user, load average: 0.31, 0.14, 0.06
Tasks: 39 total, 3 running, 36 sleeping, 0 stopped, 0 zombie
Cpu(s): 12.5% user, 3.0% system, 0.0% nice, 84.5% idle
Mem: 58356k total, 57076k used, 1280k free, 2368k buffers
Swap: 256960k total, 720k used, 256240k free, 23336k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP Command
2635 mung 9 0 23884 22m 12m S 0.0 39.2 0:07.14 1024 firefox-bin
2638 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.00 1024 firefox-bin
2639 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.01 1024 firefox-bin
2642 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.01 1024 firefox-bin
2643 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.00 1024 firefox-bin
2644 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.00 1024 firefox-bin
2645 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.00 1024 firefox-bin
2646 mung 9 0 23884 22m 12m S 0.0 39.2 0:00.01 1024 firefox-bin
--------load URL (FF totally IO bound in swap)--------
top - 11:43:05 up 16 min, 1 user, load average: 0.80, 0.89, 0.51
Tasks: 36 total, 1 running, 35 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.0% user, 3.0% system, 0.0% nice, 95.1% idle
Mem: 58356k total, 57104k used, 1252k free, 384k buffers
Swap: 256960k total, 193144k used, 63816k free, 6124k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP Command
2635 mung 10 0 222m 46m 4800 S 0.0 81.9 2:37.95 175m firefox-bin
2638 mung 9 0 222m 46m 4800 S 0.0 81.9 0:00.00 175m firefox-bin
2639 mung 9 0 222m 46m 4800 S 0.0 81.9 0:00.01 175m firefox-bin
2643 mung 9 0 222m 46m 4800 S 0.0 81.9 0:00.06 175m firefox-bin
2648 mung 9 0 222m 46m 4800 S 0.0 81.9 0:00.01 175m firefox-bin
--------Click on first link (giving up after one hour of thrashing, writing this
in Vi with no problem)--------
--------FF - File -> quit--------
--------half an hour later... still writing this in Vi with no problem, FF
still thrashing trying to shut down...--------
top - 12:33:12 up 1:06, 1 user, load average: 1.21, 1.15, 1.06
Tasks: 35 total, 1 running, 34 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7% user, 3.6% system, 0.0% nice, 95.7% idle
Mem: 58356k total, 56660k used, 1696k free, 240k buffers
Swap: 256960k total, 188816k used, 68144k free, 1644k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP Command
2635 mung 13 0 217m 45m 28 D 0.3 80.7 3:06.43 171m firefox-bin
2638 mung 8 0 217m 45m 28 S 0.0 80.7 0:00.00 171m firefox-bin
2639 mung 9 0 217m 45m 28 S 0.0 80.7 0:00.02 171m firefox-bin
2643 mung 9 0 217m 45m 28 S 0.0 80.7 0:00.14 171m firefox-bin
--------KILL -9 FF (I don't have hours to see if it will ever quit)--------
top - 12:35:14 up 1:08, 1 user, load average: 0.71, 1.05, 1.03
Tasks: 29 total, 2 running, 27 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% user, 0.3% system, 0.0% nice, 99.3% idle
Mem: 58356k total, 11032k used, 47324k free, 376k buffers
Swap: 256960k total, 12968k used, 243992k free, 3524k cached
--------Have to shut down X windows to free swap. The above swap does not
show up under any program in swap column in top.--------
Bottom line, why does a 6 MB text page require FF to eat 200 MB+ memory.
Regards,
-MaxM
Reproducible: Always
Steps to Reproduce:
1.enter url: http://www.fda.gov/cvm/index/ade/1999_ade.html - wait 30 seconds
2. click on first link
3.Firefox is FRIED
Actual Results:
See details above. 222+ MB memory used. Firefox wildly thrashing - unresponsive.
must kill -9
Expected Results:
Quietly display the page?
uname -a:
Linux mung.net 2.4.21-0.30MYmdk #2 Sun Jul 4 20:11:03 EDT 2004 i686 unknown
unknown GNU/Linux
top at beginning:
start couple of xterms (rxvt) Vi and Top
top - 11:30:54 up 4 min, 1 user, load average: 0.02, 0.08, 0.04
Tasks: 28 total, 1 running, 27 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% user, 0.3% system, 0.0% nice, 99.7% idle
Mem: 58356k total, 49716k used, 8640k free, 4284k buffers
Swap: 256960k total, 0k used, 256960k free, 25752k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP Command
2623 mung 14 0 968 968 784 R 0.3 1.7 0:00.06 0 top
1 root 9 0 496 496 448 S 0.0 0.8 0:05.24 0 init
2 root 9 0 0 0 0 S 0.0 0.0 0:00.03 0 [keventd]
3 root 18 19 0 0 0 S 0.0 0.0 0:00.00 0 [ksoftirqd_CPU0]
4 root 9 0 0 0 0 S 0.0 0.0 0:00.00 0 [kswapd]
5 root 9 0 0 0 0 S 0.0 0.0 0:00.00 0 [bdflush]
6 root 9 0 0 0 0 S 0.0 0.0 0:00.00 0 [kupdated]
7 root 9 0 0 0 0 S 0.0 0.0 0:00.01 0 [kjournald]
141 root 9 0 1120 1120 696 S 0.0 1.9 0:00.12 0 devfsd /dev
346 root 9 0 0 0 0 S 0.0 0.0 0:00.00 0 [kjournald]
1244 root 9 0 580 580 484 S 0.0 1.0 0:00.15 0 syslogd -m0
1252 root 9 0 1280 1280 440 S 0.0 2.2 0:00.34 0 klogd -2
2148 root 9 0 864 864 712 S 0.0 1.5 0:00.00 0 xinetd
-stayalive -reuse -pidfile /var/run/xinetd.pi
2216 root 9 0 596 596 524 S 0.0 1.0 0:00.01 0 crond
2251 root 9 0 2176 2176 1192 S 0.0 3.7 0:00.36 0
/usr/local/sbin/powertweakd
2264 root 9 0 532 532 476 S 0.0 0.9 0:00.01 0 gpm -m
/dev/mouse -t imps2
2273 root 9 0 408 408 364 S 0.0 0.7 0:00.00 0
/sbin/mingetty tty1
2274 root 9 0 1280 1280 1032 S 0.0 2.2 0:00.08 0 login -- mung
2275 root 9 0 408 408 364 S 0.0 0.7 0:00.00 0
/sbin/mingetty tty3
2484 mung 9 0 1560 1560 1096 S 0.0 2.7 0:00.11 0 -bash
2520 mung 8 0 612 612 540 S 0.0 1.0 0:00.12 0 fluxbox
/usr/X11R6/bin/startfluxbox
2534 root 16 0 12996 8640 1836 S 0.0 14.8 0:02.55 4356 /etc/X11/X
:0
2542 mung 9 0 3464 3460 2572 S 0.0 5.9 0:00.89 4 fluxbox
2550 mung 10 0 1372 1372 1120 S 0.0 2.4 0:00.15 0
/usr/X11R6/bin/rxvt.bin -T RXVT (en_US) -menu -fn
2556 mung 12 0 1556 1556 1088 S 0.0 2.7 0:00.12 0 bash
2585 mung 10 0 1384 1384 1120 S 0.0 2.4 0:00.17 0
/usr/X11R6/bin/rxvt.bin -T RXVT (en_US) -menu -fn
2591 mung 9 0 1576 1576 1096 S 0.0 2.7 0:00.11 0 bash
2622 mung 13 0 3828 3824 2748 S 0.0 6.6 0:00.22 4 vi crash
Comment 1•20 years ago
|
||
*** Bug 252695 has been marked as a duplicate of this bug. ***
Comment 2•20 years ago
|
||
Well, here the url's testcase consumes appr. 170MB memory, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040722
Firefox/0.9.1+
(In reply to comment #2)
> Well, here the url's testcase consumes appr. 170MB memory, using:
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040722
> Firefox/0.9.1+
You guys are fast! I hope this and other buglets get squashed so Firefox can
become the worlds browser. Let me know if I can be of any more help.
Comment 4•20 years ago
|
||
All text on page is in many large tables.
Bernd, Boris: -> Layout: Tables?
For comparsion "well know" numbers on this page, all on W2K:
Firefox 0.9.x, Mozilla 1.8a2, Netscape 7.1
-> 243 - 274 MB
MSIE 6.0 SP 1 -> 122 MB
MSIE 5.5 -> 82 MB
Opera 7.53 -> 106 MB
Opera 7.00 -> 100 MB
Opera 6.05 -> 61 MB
NN 4.8 -> 40 MB
Bug 54542 and bug 148338 should be related.
OS: Linux → All
Comment 5•20 years ago
|
||
If I set display:none on the <body>, I get about 95MB memory usage. So that's
how much space the DOM objects take (well, minus the 20MB for the Mozilla binary
itself). Without that display:none, I get about 210MB memory usage.
I did try eliminating most of the inter-tag whitespace in the file, which
reduced memory usage for the DOM by about 10MB and reduced total memory usage by
about 30MB (??? this is really odd... we don't create frames for ignorable
whitespace.....)
It'd be nice if someone could break this testcase down a bit (for example, is
our table memory usage generally larger than IE by a factor of 2, or is it
something about this page in particular?)
this bug is not related to firefox only
Mozilla 1.7.2 on WinNT4.0
URL/HTML-Code: 6MB
in Memory (Application only)
While loading 270 MB
When finished: 148 MB
Total:( Application plus System) 368 MB
remarable:
it did not crash.
please have a look at http://bugzilla.mozilla.org/show_bug.cgi?id=247222 also
rgds
Martin
Comment 7•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
win XP 1gb ram
wow that's a LARGE page
286mb usage with a peak of 307mb for me
And 695 mb when view/source...
Actually IE 6 SP2 renders it far more slowly than firefox, and the memory usage
is inferior
(In reply to comment #7)
> Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
> win XP 1gb ram
>
> wow that's a LARGE page
> 286mb usage with a peak of 307mb for me
> And 695 mb when view/source...
>
> Actually IE 6 SP2 renders it far more slowly than firefox, and the memory usage
> is inferior
THIS is a common unacceptable answer to many Firefox bugs - Well IE does the
same or worse. I nor anyone else care much what IE does as it is broken and
a major security risk! This is why we are using Firefox and want the BIG BUGS
squashed. Do a search on memory at bugzilla.mozilla.org. At the moment there
are 180 hits. Most are in status UNCONFIRMED even thought this memory sucking
is a BIG PROBLEM! So much a problem for me that I used Links instead of Firefox
to search here. Just browsing the bugzilla reports was using 120 MB of memory
and had my machine crawling.
Look at the reports! Just leaving Firefox sitting doing nothing eats memory on
ALL OS's. Everything done in Firefox eats memory that NEVER GETS RETURNED!!!
The same can be said of Thunderbird as far as eating and not returning memory.
THIS IS A MAJOR BUG AND NEEDS TO BE LOOKED INTO AND FIXED! IT IS A SHOW STOPPER!
Just to compare to IE and say that they are both memory hogs is only doing a
disservice to existing and future Firefox users.
Best regards,
MaxM
>This is why we are using Firefox and want the BIG BUGS squashed.
Then please do one of the following:
a) fix this bug, looking at the sheer number of big letters you should go for
this solution
b) donate money to mozilla.org so that mozilla can pay somebody to fix this bug
or
c) if the above are not feasible do at least what comment 5 asked for.
But in any case follow the bugzilla etiquette
http://bugzilla.mozilla.org/page.cgi?id=etiquette.html. If none of the
solutions applies to you, probably point 1.1 of the bugzilla etiquette applies.
Comment 10•20 years ago
|
||
If anybody wanna fight with this bug (see Boris' comment #5), maybe table
generator should help:
http://www.alenka.cz/test/table.php
Moving to Core.
Assignee: firefox → general
Component: General → DOM
Product: Firefox → Core
QA Contact: firefox.general → ian
Version: unspecified → Trunk
Reporter | ||
Comment 11•20 years ago
|
||
(In reply to comment #9 and #10)
Sorry about the bad "hare" day in reference to my comment #8. Had a lot of
other things on my mind.
Re: comment #9
Thanks Bernd for the leadership.
"a) fix this bug, looking at the sheer number of big letters you should go for
this solution"
This is unlikely, but will give it my best shot. The exclamation points should
have been more of a clue than the "big letters."
"b) donate money to mozilla.org so that mozilla can pay somebody to fix this bug
or"
Gladly, except the funds do not exist at the moment. Food and water might
become a rare commodity in the near future.
c) if the above are not feasible do at least what comment 5 asked for.
This is a good recommendation! Been doing some playing and might be on to
something. Using "Adam Hauner (CZilla)" (comment #10) table generator,
I think I might have been able to give a test case can point toward what
might be happening. This might help one of the developers find and repair
a BIG memory leak.
TEST CASE:
goto url: http://www.alenka.cz/test/table.php
Change columns to 5000. Wait... memory will go up close to what I would expect.
Close tab - memory will not change. Closing FireFox will return memory to OS.
This test is much less likely to totally consume lessor machines such as mine.
Thanks Bernd and Adam for the guidance.
Hope this helps!,
-MaxM
Comment 12•20 years ago
|
||
in principle no changes for this with moz.suite 1.8alpha6
(allthough this version seems to work better with its memory)
abt 160mb peak on load
abt 110mb when loaded
and:
unload is functioning - memory is freed on closing window.
martin
Comment 13•20 years ago
|
||
IE MOZ
real virt total real virt total overh oh %
unconf1 155896 145420 301316 249100 239088 488188 186872 62,0
unconf2 301316 201608 191712 393320 92004 30,5
google1 17388 7552 24940 68900 60184 129084 104144 417,6
gogole2 24940 22524 12968 35492 10552 42,3
unconf = bugzilla list of all unconfirmed bugs
google = google homepage
1 = with history file (35megs)
2 = 0 history file
soooo, if you do any tests, be sure you delete your history file first ;)
Comment 14•16 years ago
|
||
page is not found and no atttached testcase, so
=> icomplete
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•