Description of problem:
Huge memory used by X server process when firefox open several pages with 100+
images inside (I used locally created pages with photos collection). Even after
firefox closed tabs with this pages, X server still used tons of memory. Only
after full termination of firefox, X server frees memory.
For example now X used 400Mb VIRT/167Mb RES of memory.
Opened 3 pages in tabs each with ~100 of 1024x768 images.
Got more memory used by X (862/535Mb):
2150 root 20 0 862m 535m 8916 S 2 26.7 127:15.07 X
Closed tabs with that pages. The same result:
2150 root 20 0 865m 539m 8916 R 6 26.9 127:16.86 X
This is 100% memory leak.
The only way to avoid swapping is full restart of firefox.
Version-Release number of selected component (if applicable):
1) Create 5 local html pages with 100 images per page 1024x768 each.
2) Note memory used by X process.
3) Open all 5 pages in firefox tabs.
4) Note memory used by X process.
5) Close firefix tabs.
6) Note memory used by X process.
7) Exit firefox.
8) Note memory used by X process.
Overswap/system down when continuous using of firefox.
Firefox must free memory resources.
Tested same pages under Opera 9. No huge memory used when opened all pages (i.e.
Opera used different way to allocate X server resources?). Also X server
memory's goes lower after closing of Opera's tabs.
Not only X server memory problem. Firefox process leaks too:
189 VIRT/63 RES before open pages
328 VIRT/204 RES after open pages and the same after closing tabs with pages!
This is the browser cache keeping things in memory so it is very quick if you
want to go back to the same page you once visited. If you don't want this, you
can disable the feature. There are several preferences. Load up about:config
and search for 'cache' and you can tweak to your liking.
This is bad idea to keep cache for closed tabs!!! Most of users never use "Undo
closed tab" feature. So actually this is memory leak which don't allow continuos
using of firefox when surfing big pages.
So best solution will be cleaning cache for closed tab. IMHO ;)
This bug is *much* deeper.
Have just disabled memory cache (browser.cache.memory.enable=false)
firefox-bin process no more eats huge memory, it's ok
But X process still have problem. I opened 20 pages 100 images each, X grows to
~800Mb RES/1200Mb VIRT memory used even after I closed all tabs in browser!
Maybe there is some tool to view X resources allocated by process?
Seems firefox just not free some resources.
We just updated the Firefox version in Fedora/development from 2.0 to a 3.0
pre-release version, which improves performance, memory usage, and fixes many
bugs and crashes.
Closing as CANTFIX since we aren't fixing bugs filed against 2.0 now that 3.0 is
in. If this bug is still present in rawhide using a Firefox 3.0 version, please
re-open this bug.
Thanks and Happy Holidays