The Inside Track on Firefox Development.

« About the Firefox "memory leak" | Main | Bye Bye Blackberry? »

February 17, 2006

More on Memory

Firefox's caching behavior is just one area of memory usage. I'm really glad that there's been such a lot of discussion in the previous post I made, since many people have raised specific issues, bugs have been filed, and people are looking at the things people are reporting. This sort of feedback system is one of the things that makes the open development model great. Firefox 2 will be much better because of your help!

Posted by ben at February 17, 2006 11:44 PM

Comments

[quote] This sort of feedback system is one of the things that makes the open development model great. Firefox 2 will be much better because of your help! [/quote]

Will it?

http://weblogs.mozillazine.org/ben/archives/009730.html#comments

For those who missed it.

Posted by: Fernando Franco at February 18, 2006 3:08 AM

Any chance of setting the RSS feed to "full"?

Posted by: Rick at February 18, 2006 8:06 AM

It's great to see a community that takes the time to point out the issues and a team that acknowledges them and fixes them. Good work everyone!!

Posted by: Thomas at February 18, 2006 8:38 AM

Fernando:
Your previous post shows that you can't understand the difference between a browser and an OS. It's simply impossible for Firefox to create such a search bar that integrates into any application or do the things that other specialized applications are supposed to do.

It also shows that you didn't bother to read about the upcoming "places" feature and how it will replace the existing bookmarks.

Posted by: Alfonso at February 18, 2006 12:57 PM

Sometimes Firefox is using over 70,000K (It's actually using 76, 108K as of now) of memory. These memory bugs really need to be fixed.

-Alex
My Blog

Posted by: Alex at February 19, 2006 9:58 AM

I'm currently at 77,192K myself, but it's fairly steady. I thought the issue was with cases where the mem usage *keeps* rising?

Posted by: MechR at February 19, 2006 6:23 PM

indeed. 70MB is hardly an issue. the issue is the fact that it gets up to 700MB (and above!)

Posted by: scratch at February 19, 2006 10:17 PM

For me the big issue is that Firefox doesn't give enough memory back. If Firefox starts with 20MB memory usage and has 20MB memory cache it should use about 40MB memory usage after browsing for an hour and closing all the tabs.

Posted by: Ferdinand at February 20, 2006 1:04 AM

I personally did not see any significant increase in memory use between FF 1.0 and 1.5, so I do not have issue with the cache feature. I have had an issue with FF memory usage since the first version I installed. At this point I do not believe that it is a “memory leak”, but a memory manager design flaw, at least under windows. I have not looked at the code but, if FF is trying to be very efficient about how much memory it allocates it could be shooting it’s self in the foot on the windows platform. By making many small allocations it could be tainting many (memory) pages that then cannot be released back to the OS. If FF instead allocated a specific large chunk of memory for each (Web) page/tab, then loaded resources for that page into that chunk, when the page is closed all (memory) pages in that chunk of memory could be released back to the OS.

Posted by: Kelly Anderson at February 20, 2006 8:02 AM

Yes, firefox is a memory hog, however I don't have a problem with it getting out of control that much. (and yes, opera 8.5 uses less and releases when unused)

What I find more of a problem is the CPU utilization which can climb to 100%, when you open several tabs, say 5 or more. (both on windows and linux) However this could be flash related. I've noticed when I stop the flash (unmark play) utilization drops down rapidly..

Posted by: mad-man at February 21, 2006 5:27 PM

It gets up to 120MB to me.. even when closing all tabs it still is somewhere near 114MB. I have to close and run Firefox 1.5.0.1 again in order to get things work properly :(

Posted by: Titanas at February 23, 2006 5:12 PM

"What I find more of a problem is the CPU utilization which can climb to 100%, when you open several tabs, say 5 or more. (both on windows and linux) However this could be flash related. I've noticed when I stop the flash (unmark play) utilization drops down rapidly.."

Exactly the same problem here, has caused my laptop to overheat a few times and go into hibernation mode.

Posted by: Lee Taylor at February 24, 2006 4:25 AM

"By making many small allocations it could be tainting many (memory) pages that then cannot be released back to the OS."

I've also reached the conclusion that heap fragmentation is at least part of the problem. Bug 130157 and Bug 327418 are apparently caused by fragmentation, for example.

But with fragmentation, the memory growth is probably bounded because memory is released into the heap and is available for reuse. What I seem to see is that although memory usage doesn't go down as much as it might (when closing a tab for example), at least memory usage stabilizes at a new level (when repeatedly opening and closing tabs for example). With a memory leak, memory usage grows without limit, and therefore is a much bigger problem to worry about. Therefore, I think memory leaks should be given priority for now, and fragmentation can be tackled later to help minimize memory usage.

Posted by: Steve Chapel at February 24, 2006 6:08 PM

I just want to say thanks for the second post on this acknowledging that there may be other issues with memory, and for all the hard work you do.

I posted in the other thread about my worst experience of out-of-control memory usage that happened a couple weeks ago, and how the issues have persisted since at latest 1.0PR, maybe earlier.

But I realize you need something reproducible and a formal bug report. So I'll try to take notice of the exact memory and cache figures if it happens again so we can figure out what's happening and file a bug or add to one.

Thanks again. I appreciate it.

Posted by: benthere at February 26, 2006 6:40 AM

I posted in the other thread about my worst experience of out-of-control memory usage that happened a couple weeks ago, and how the issues have persisted since at latest 1.0PR, maybe earlier.

Posted by: chy at March 7, 2006 10:01 PM

OK I made the change for fast back settings and it seemed ok for a few minutes. Now first time load pages that have nothing to do with the cache can't render at all! I'm opening up yahoo for crying out loud and it can't render the page. I made one change only, changed that -1 to a zero and now page after page (first time loads after clearing browser history not using back tab) can't render.
I'm sorry FF the security and stability you once offered is gone. I've been debating what to do for weeks and this clinches it, I'm changing to something else. I wish you guys the best and if you get it sorted and working again I'll consider coming back. Now where can I DL that IE7 (shiver, what has the world come to) BETA...

Posted by: guy at March 15, 2006 3:37 AM

Caching the web page disk cache to memory seems pretty retarded. Disk caching is the job of the operating system not a web browser.

Posted by: Eli at March 18, 2006 11:15 PM

Whether it is a memory leak or poor memory allocation, tt still seems Firefox does not take memory usage as seriously as it should. Firefox is currently consuming 366M of memory on my machine. IE is using 4M. What good is a fast memory cache if the overall memory profile leads to page swapping. Invariably, if my machine slows down, all I need to do is kill firefox to restore the system.

Posted by: Steve at April 24, 2006 12:36 PM

I use GNU/Linux, Mac OS X and Windows, and I have no memory leaks under Mac OS X - any reason for this?

Posted by: Philipp at April 25, 2006 9:30 AM