MozillaZine

Can you help figure out source of Firefox 4.0.1 memory leak?

User Help for Mozilla Firefox
c627627_
Guest
 

Post Posted June 5th, 2011, 8:54 am

VanillaMozilla,

Can you ask the moderators to edit post #1 of this thread inserting a quote of my post above because it resolves the problem and would save people time because otherwise they would have to read four or five pages before getting to it.


Also see what you can do about asking them to unlock my account here.

mightyglydd

User avatar
 
Posts: 9516
Joined: November 4th, 2006, 7:07 pm
Location: Hollywood Ca.

Post Posted June 5th, 2011, 9:31 am

Have your tests confirmed this doesn't screw up something else?

I see no confirmation or comment where you've posted the same 'resolution' elsewhere.
#KeepFightingMichael

DanRaisch
Moderator

User avatar
 
Posts: 121910
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted June 5th, 2011, 9:57 am

Your account is not locked. Try logging in again.

VanillaMozilla
 
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Post Posted June 5th, 2011, 10:09 am

Thanks for following up on this, C627627_. Much appreciated. I'll try to remember to edit the Knowledge Base to cover this.

c627627

User avatar
 
Posts: 578
Joined: April 3rd, 2005, 12:58 pm
Location: Kansas

Post Posted June 5th, 2011, 3:21 pm

mightyglydd wrote:Have your tests confirmed this doesn't screw up something else?

I see no confirmation or comment where you've posted the same 'resolution' elsewhere.


For personal notes I would write that Firefox 4 "bug" solution has now been found. Thread topic problem of course is no bug as such since Mozilla did this intentionally. I understand that people may (will) vehemently disagree on this but my personal opinions are:

1. Firefox 4 can be crashed and this can be replicated on any system anywhere but only using Firefox 4 and not any other browser, even Firefox 3 cannot replicate this because Firefox 3.x releases used up RAM within seconds.

2. I speculated this was because Firefox 4 had a dirty secret: Unlike other browsers, it did not release used up RAM back in seconds. It kept the used up RAM locked for several minutes so that Firefox 4 appeared faster when users clicked on Back/Forward or were Reloading pages. The speculation was that this (in my opinion dirty) trick would help Mozilla make gains in the browser wars.


Tested solution which resolves this problem is most definitely:


1. type about:config in the address bar of Firefox 4

2. Scroll down to
image.mem.min_discard_timeout_ms

3. Simply change the default value from 120000 to 10000


This makes Firefox 4 release used up RAM back in seconds just like other browsers. I have re-installed Firefox 4 and will now ditch Firefox 3.6 because this modification resolves the issue because I knew what the issue was and the above posted modification directly addresses it.


Firefox 4 holds data in RAM for 120000 milliseconds (that's 2 minutes even though I actually measured Firefox 4 to lock the used up RAM for over 3 minutes on my system). I once again want to acknowledge the explanation as to why this is: The default settings do make the browser appear to be faster. You may not notice problems during regular use. Only when opening large number of tabs or windows in less than 3-4 minutes each of which contains enough data to fill up your RAM, would you even notice this problem when using web pages with specific content which decompresses to fill up your RAM fast.


So once again the solution simply controls when Firefox releases used up RAM so that freed up RAM can be used for new data coming in. All other browsers I tested, all of them from IE6 to Firefox 3.x to Chrome released RAM in seconds. *Only* Firefox 4 did not. Only Firefox 4 locks it in there for 2 or more minutes. When you adjust the setting from 120000 ms to 10000ms you are telling Firefox 4 to release the data from RAM quicker. 'Responsible' thing to do is to have data cached up on hard drive in my opinion. It should not be hogging up RAM for 2-4 minutes, preventing it from being used by the new incoming data. But Mozilla figured hey, most people will not be visiting web pages with content decompressing to quickly fill up all your RAM. The benefit would be that things would appear faster to them and so they made Firefox 4 default behavior be to not release RAM space in seconds, like everything else does.

The modification does not break anything else.
Open the pod bay doors, Cortana.

squeaky

User avatar
 
Posts: 355
Joined: August 14th, 2005, 11:07 am
Location: Sunny Suffolk

Post Posted June 5th, 2011, 5:09 pm

Brilliant :)
Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Calvin & Hobbes

boxner1
Guest
 

Post Posted June 18th, 2011, 8:28 pm

This appears to have worked for me. I run FF all day and usually around 6 or 7pm it finally sucks my RAM and CPU dry and freezes up. This has been going on reliably for months. I made the suggested change earlier today. RAM usage has stayed below 500mb all day. No freezing up and no restart required.

Many, many thanks!

VanillaMozilla
 
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Post Posted June 19th, 2011, 6:22 am

500 is still very high, mind you. But if it works, don't mess with it further.

By the way, c627627, my own view is that this is an operating-system bug. If the operating system did not overcommit memory the way airlines oversell seats, it would not have crashed.

Somewhere there is a system-wide Windows setting to avoid this. I've tested this in the past, deliberately exhausting all available RAM and swap file. Windows gave a warning that memory was getting low. Eventually Firefox stopped responding or something, but it was still operational and it recovered. It did not crash. I don't know why some Windows systems handle this (by default?) but others don't, but this is still an operating-system bug, in my opinion. My understanding is that UNIX (and therefore OSX??, but not Linux or Windows) would deal with this correctly. Fortunately, Firefox provides an easy workaround in this case. As you know, Mozilla is working there's a big discussion on how to handle this correctly.

c627627

User avatar
 
Posts: 578
Joined: April 3rd, 2005, 12:58 pm
Location: Kansas

Post Posted June 19th, 2011, 8:36 am

Operating System you say? If you are asking me to comment, I guess I could reboot and test this theory, but really, explanations are so completely irrelevant as far as the big picture goes...because as you know Firefox 3.6 and *all* other browsers are not affected.

Why wasn't the default value of image.mem.min_discard_timeout_ms lowered in the final version of Firefox 5.0 while this issue is figured out?


A lot of time was spent above talking about how this isn't really a crash, Firefox just runs out of memory etc. etc. meanwhile people are leaving Firefox in droves over perceptions that it is not as fast as it used to be and that it is running out of memory. I started a thread elsewhere asking just what makes people stay with the browser they have seeing as the browser wars are upon us and that's what they've been saying. Also add-ons appear to be the other most important thing.

This is off-topic now but it seems to me that with the accelerated schedule those add-ons will be dropping off like flies because add-on creators will not get around to updating the em:maxVersion so often. I set mine arbitrarily high and in 9/10 cases old add-ons work with newer versions of Firefox, maybe some option within the browser to easily and quickly force install the old add-ons for users to test would reduce the number of defections in the next few months? But that's off topic.

The tested fix is about:config > image.mem.min_discard_timeout_ms > 10000
What down sides are there to lowering this to 10000?
Open the pod bay doors, Cortana.

mightyglydd

User avatar
 
Posts: 9516
Joined: November 4th, 2006, 7:07 pm
Location: Hollywood Ca.

Post Posted June 19th, 2011, 9:06 am

c627627 wrote: people are leaving Firefox in droves over perceptions that it is not as fast as it used to be and that it is running out of memory. I started a thread elsewhere asking just what makes people stay with the browser they have seeing as the browser wars are upon us and that's what they've been saying. Also add-ons appear to be the other most important thing.


Do stop exaggerating, you're full of it, http://www.overclockers.com/forums/show ... p?t=678847, thirty eight posts in 6 days from a handful of users including five from you hardly indicates people are 'leaving in droves.'
May I suggest the answer to your problem could well be (if my memory serves me well) avoiding dodgy 'Baltic States' porn sites?
#KeepFightingMichael

c627627

User avatar
 
Posts: 578
Joined: April 3rd, 2005, 12:58 pm
Location: Kansas

Post Posted June 19th, 2011, 9:38 am

I think the proper way to address the point is not to get personal but to provide historic reliable web browser market share data. Where can we get the information listing what happened after Firefox 4 was released and historic data showing market share of competing browsers over time? My perception was based on reading several forums but only reliable historic market share data is relevant to our discussion.


Actually, the first half of the test links are now dead. The problem can be replicated using the second half but it takes more pages to open - incorrectly suggesting that the problem is related to an abnormally high number of pages opened. The now dead links, although not safe for work, could sink Firefox 4 and 5 quickly with only a few pages opened. If only the pictures were of kittens or puppies, we could have avoided this side discussion that the problem is site specific - a clear argument point you are making - whereas it is not site specific because Firefox 3.6 was not affected, nor was any other browser.
Open the pod bay doors, Cortana.

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted June 19th, 2011, 9:50 am

This is not going to become a market share thread. Trust me on this.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

VanillaMozilla
 
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Post Posted June 19th, 2011, 10:45 am

Calm down, c627627. You've got your workaround, the Knowledge Base has been updated, and Mozilla is working on it. You're not going to get more than that.

Frank Lion

User avatar
 
Posts: 20392
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom

Post Posted June 19th, 2011, 11:08 am

mightyglydd wrote:May I suggest the answer to your problem could well be (if my memory serves me well) avoiding dodgy 'Baltic States' porn sites?


c627627 wrote:I think the proper way to address the point is not to get personal

Wasn't that one of Hitler's quotes?

That aside, I disagree, if someone is a pervert then I would like to know that before I even discuss anything with them, let alone help them with anything.
Metal Lion latest SeaMonkey & Thunderbird Themes - Sea Monkey and Silver Sea Monkey
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)

ShortFuse
 
Posts: 59
Joined: June 13th, 2011, 8:07 am

Post Posted June 19th, 2011, 12:46 pm

Are all these personal attacks necessary? Even-handed moderation seems to be lacking now.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 16 guests