Thursday, November 20, 2014

memory - More than 2GB for Firefox, not too many tabs, shaky performance



Whenever I leave Firefox open for more than a day or so, the memory usage always climbs up to illustrious heights. I have plenty memory (48GB) on my 64 bit machine, but for a 32 bit process this is useless anyway.



When usage becomes above 1GB Firefox becomes slower (it takes whiles before it shows typed characters, it may take seconds before it reacts to focus or tab change etc).





  • Is it possible to have Firefox use less memory?

  • Would that than limit usage or performance?

  • Isn't it a problem for 32-bit processes to reach above the 2GB limit?



Using most recent version of FF 6, but this issue was around for all versions I can remember.



enter image description here






PS (edit): just tried once more to kill all but a few tabs, and this actually increased the memory usage up to 2.5GB. Clicking "minimize memory usage" on about:memory doesn't help even a bit.


Answer



I have been running into this problem in Firefox for years. I use SessionManager to be able to recover after I forcibly crash Firefox and restart it, because I haven't found a reliable way to prevent Firefox from gorging on memory. There are plenty of extensions that purport to plug the memory leaks, though they usually only last for so long before Mozilla changes things to break them.



Today, while being irate at this issue and looking around SuperUser, I found an article that seemed to have something useful. 20 minutes in, and memory usage has stayed around 500mb, and it was ~3GB before I tried the setting. I did have to crash and restore Firefox though. I think the magic came from one or all of these settings:




Type “about:config” in your browser bar and adjust the following

preferences (by double clicking on them) to free up some additional
memory:



browser.cache.memory.capacity (set to 0)
browser.cache.memory.enable (set to false)
browser.sessionhistory.max_total_viewers (set to 0)
browser.tabs.animate (disable)




There are also a smattering of other settings on that article that seem useful.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...