Firefox slow down (stuttering) on reaching 1.5GB memory.
I am having problem with Firefox -- as I keep using it (opening more tabs and stuff) it grows in memory usage. I think there might be leaks somewhere, but that is not by itself a problem -- I have plenty of memory.
However I repeatedly observe that upon reaching approximately 1.5GB of memory usage Firefox starts 'micro stuttering' -- scrolling is nowhere as smooth as it is when it just started, text input is not smooth and so on. This is supremely annoying. Firefox restart completely fixes the issue (until the next time), but it is also not a terribly convenient solution (tabs have to reload next time etc.).
This is observed both on Firefox 24 ESR and Firefox 28. The difference is that Firefox 28 takes much longer to reach 1.5GB barrier (so apparently there have been some optimizations).
I do use a bunch of addons. However disabling them is not really an option because I find 'clean' Firefox pretty much unusable (I'm coming from Opera 12).
I'd like to provide memory reports (from about:memory) however I need to understand how to anonymize them (they appear to contain lots of URLs some of which I'd rather not share).
Can these reports be used to pinpoint misbehaving addon (if there's one)?
Also -- are there 64 bit builds of Firefox 24 or 28? Basically non-alpha stuff with old-style UI? (I've downloaded some kind of alpha 64bit for FF 31 but it looks completely different and I'd rather not deal with it while it's still in alpha)
Modified by Solf
Additional System Details
- Unity Player 4.3.5f1
- Google Update
- LastPass Plugin
- NVIDIA 3D Vision plugin for Mozilla browsers
- NVIDIA 3D Vision Streaming plugin for Mozilla browsers
- NPRuntime Script Plug-in Library for Java(TM) Deploy
- Citrix Online App Detector Plugin
- Shockwave Flash 11.7 r700
- ActiveTouch General Plugin Container Version 105
- Adobe Shockwave for Director Netscape plug-in, version 22.214.171.124
- The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
- Detector for the Onlive Game Client
- Nexon Game Controller
- PDF-XChange Viewer Netscape Gecko Plugin
- Npdsplay dll
- DRM Netscape Plugin
- User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Might try installing Adblock Plus, and NoScript (Forbid scripts globally)
NoScript keeps things like videos from auto-playing (you have to manually Allow)
Opening too many tabs seems like it could be the problem.
I already have FlashBlock. NoScript is way too paranoid for my purposes. Adblock is... well.. unfair I'd say :) I'm not against people earning from my browsing, but I do object to Flash (hence FlashBlock).
Not opening many tabs isn't an option either -- I don't really need a browser that can't handle bunch of tabs.
At any rate, problem is not memory leak per se (I'm not even 100% certain if there's one although this seems likely). Problem is -- why Firefox starts to stutter at ~1.5GB? It doesn't look like it is CPU bound (although I'd love to know how I can double-check that)... and at any rate why'd it become CPU bound during scrolling when it reached the 1.5GB memory (and not before)?
How many tabs do you have open at a time that it's 1.5GB? On my system with two tabs open, Task Manager shows me at 1.0GB, so maybe you have .5GB open in web pages?
Might be easier to just work how the computer wants to, and stay under 1.5GB, then you don't have to figure anything out. Only work with a few tabs at a time.
Maybe try toggling Caret browsing with F7 or: Options / Advanced / General / Accessibility / Always use the cursor keys to navigate within pages
. . . I seem to remember Caret browsing having an effect on scrolling smoothness.
Just tried caret browsing -- it looks erratic and doesn't look like something I'd want to use.
I'm mostly concerned with scroll smoothness when using mouse wheel, I read often and scroll a few lines at a time. I'm using SmoothWheel extension with hardware acceleration enabled to get the desired smooth result. It works quite well -- until this magic barrier or memory usage. But then again keyboard becomes slightly unresponsive at this barrier too, so it's not just scrolling.
Firefox (especially 28) starts well below 1GB memory usage. I have three windows and zillion tabs (using TabGroups Manager addon to organize them) -- but only tabs that I activate are loaded (option is set to do not load all tabs on start). For example right now commit size is about 850MB and FF was running for about 20 hours.. I expect a few days with FF 28 until the magic barrier.
It is difficult for me to say how many tabs are actually loaded (as opposed to being inactive). Is there an easy way to check it?
BTW, on FF24ESR I tried addon that would unload pages after they are idle for some time -- it didn't help, Firefox still would grow in memory usage and would hit the magic barrier.
Not using tabs... well... I'm not going to do it... I've had years and years of using Opera (and before that I used Maxthon), so I'm quite used to operating zillion tabs and find it very convenient. I only switched because Opera essentially abandoned development (whatever they produced after version 12 was atrocious, maybe I'll have to go back and check again if I can't get FF to work acceptably) -- but Opera never had any problems with the amount of tabs (and it even loaded each and every one unlike FF).
I realize that I'm kinda 'whinning' about the free software (as in free beer) but I honestly expected better from the widely-used browser -- and given the amount of time I've spent configuring it to replicate capabilities available in Opera I'd thought I'd ask for advice rather than just trying to switch to something else (not that I know what I could switch to at this point -- Chrome certainly does not look appealing because it doesn't provide good tab management, e.g. at least tab stacking).
. . . It is difficult for me to say how many tabs are actually loaded (as opposed to being inactive). Is there an easy way to check it?
I switched from Chrome to FF, because it auto-logs you in to Google, no matter what, and it had an ongoing issue where some YouTubes (HD?) would only play with a black screen.
Ideally, I only use search engines that don't track you, also, like Duck Duck Go and IXQuick.
If you got NoScript, and "Forbid all" by default, when you go to the tab, you enable just for that page. I'd give it another try to see if it gets you the results.
Adblock plus . . . well, I don't want to see the ads, I'd rather surf fast and see what I want - same thing, I'd just see if it gets you the results, you can always remove
I really appreciate your trying to help, but I'm not sure I want to deal with additional complications / loss of functionality caused by NoScript and such.
It might be just simpler to keep restarting FF. Or migrate to something else if it gets too annoying.
Do you know if there are any stable 64-bit builds in case seemingly memory-related issues are 32-bit specific?
No, don't know how to figure that out.
Why is it so hard to use NoScript? What I do: Just make it full off for everything. If there's a problem with a page, either fully, or temporarily, allow it for that page. Later, revoke temporary permissions. You get safer browsing with everything off, also.
I just don't want the hassle currently.
More importantly I highly doubt it is going to solve the problem. It might slow it down, but the most likely heaviest JS is where I actually need it -- Google stuff, reporting stuff for work.
I'll think about it.
Yes, I thought it would be a hassle also, but it's not.
You just have to remember that if something is not working on a web page:
1.) check to see if NoScript is activated, and Allow all on the page (vs. Forbid)
2.) I have AdBlock too, to that's another one to temporarily Disable (vs. un-check Disable).
Check out the right -hand column, "Most Popular"
It's #4, that shows it works well.
I appreciate your trying to help. I'll think about NoScript.
Meanwhile I had to restart Firefox for various reasons -- so I still don't have memory dump from when it starts to slow down appreciably.
Ok, I've got annoyed enough by the problem to actually go out of my way and see how it can be reproduced. Turns out -- quite easily.
First of all -- I'm running Windows 7 Home Premium 64 bit with 16Gb of memory with 'classic' desktop (i.e. aero disabled). I'm using Nvidia GTX 760 with desktop extended to two displays (primary 16x10 monitor via DVI and secondary 19x10 TV via HDMI). Scrolling test is performed on the monitor.
Take clean Firefox installation -- specifically I've used FirefoxPortable_29.0.1_English.paf.exe (because I didn't want this experiment to affect anything I'm actually using on my box).
Install two extensions: - SmoothWheel (AMO) -- this will be used to demonstrate 'stuttering'. - Flashblock -- this prevents flash stuff from possibly affecting the result.
Configure SmoothWheel (possibly not very relevant, but that's how I can easily see the problem): - Step size 100 px - Speed 0.2 sec - Advanced -> Adaptive step & duration -- > DISABLED
Open page www.exler.ru (yes, it's in russian, but you don't need to actually read it :)). Try scrolling through the page slowly and quickly. Scrolling with SmoothWheel addon should be very smooth and shouldn't result in excessive CPU usage.
Now without closing that page do the following: - Open rus.delfi.lv in a new tab. It's again in Russian, but I'm using this because it has a crapload of JS and lots of content. - Open about 25 more tabs from that page -- I'm basically using middle-click to open 25 pages in background. - Ensure that each of rus.delfi.lv pages is fully loaded -- to do this in each tab do End-Home-End-Home (yes, you need to use 'End' twice). - Wait for all pages to finish loading.
At this point Process Explorer shows FireFox memory usage of over 1GB on my machine.
Now go back to www.exler.ru page you have opened and try scrolling it.
In my case scrolling is much less smooth -- and quickly scrolling up and down results in a significantly increased CPU usage (unlike when doing this with only one tab open).
Furthermore now if you start closing open rus.delfi.lv tabs one after another, you'll notice a significant delay (freeze) after each page is closed -- until there are only a few pages remaining.
So yes, it looks like there's something seriously wrong somewhere in the innards -- basically if you have a bunch of tabs open something 'breaks' and causes Firefox to perform poorly when either running JS (because SmoothWheel is a JS extension) or when re-drawing/scrolling page (because that's what we are actually doing).
If you close all the rus.delfi.lv pages -- scrolling should go back to normal. But Firefox memory usage remains quite high in my case -- much higher than it is initially with only one tab open.
Honestly, I didn't see a problem here. Yes I followed the steps and it reached what you said, however I didn't see any lagging of any sort. I've got 6GB of RAM so I don't think Firefox would hang. See my screenshot attached.
Have you tried disabling hardware acceleration as it can cause some problems. Firefox has hardware acceleration set to "on" by default, but it's still young, which means some video cards or drivers might have problems with it. You can try to disable hardware acceleration to see if that alleviates your problems.
You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
Then perform these steps for Firefox version 29.0 and above:
- Click the menu button and select Options for Windows or Preferences on Mac or Linux. For Firefox 28.0 and previous versions, click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
- In the Firefox options window, click the Advanced tab, then select "General".
- In the settings list, you should find the Use hardware acceleration when available checkbox. Uncheck this checkbox.
- Now, restart Firefox and see if the problems persist.
Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
As for your question regarding 64 bit Firefox, Yes, there are 64-bit Releases of Firefox but only for Mac OS X and Linux. Windows is excluded. It is a combined 32/64 application for Mac and separate 32/64-bit downloads on Linux.
Hi, thanks for the reply!
I've just tried with hardware acceleration disabled and got exactly the same result.
One thing I might not have made clear in my original 'steps' is that I'm opening different pages (not just one page 25 times). However looking at your screenshot it seems that you also opened different pages.
I'm a bit at a loss why you are seeing no difference.
I'm not using aero (unlike you), however I just tried to enable aero and it seems to have made no difference whatsoever. I'm also not using smooth fonts -- but I have hard time imagining how this could affect anything.
My video drivers are quite recent (although perhaps not the very latest) -- and the problem was also happening with older driver versions, so it's not version-specific.
Speaking of you test -- okay, 'scroll smoothness' may be subjective and not necessarily easily apparent; however did you not experience freezes in the second (or more) range when quickly closing tabs? I'm closing them via Ctrl+W and it is literally freezing Firefox for a bit (until there are very few tabs remaining).
I'm also attaching process CPU usage graphs (taken from Process Explorer) -- you can see how CPU usage spikes heavily when scrolling quickly on the firefox with 25+ tabs. For comparision another graph is showing the same scrolling when only one tab is active.
One way to see if there's smooth scrolling difference is to open two instances -- might need to create FirefoxPortable.ini file and add lines there something like this: [FirefoxPortable] AllowMultipleInstances=true
In one instance then open a bunch of tabs as described and in another instance just a single www.exler.ru -- compare how scrolling feels between them.
Have you tried enabling smooth scrolling? That setting is right next to the one for hardware acceleration.
Create a new profile as a test to check if your current profile is causing the problem.
See "Creating a profile":
If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over the problem
Hello, thanks for your replies.
Built-in smooth scrolling is nowhere near as smooth as SmoothWheel and it has serious issues where in some cases it fails to scroll properly (e.g. I'm using The Old Reader and for whatever reason it only scrolls it very slowly (much slower than it should).
Anyway, SmoothWheel by itself is not the point. Firefox slowing down and stuttering with a bunch of tabs open is the point. I came over from Opera 12 (when they basically abandoned it) and it was a nasty surprise when I discovered this.
RE: profile -- this happens with clean installation as described in reproduction steps. It is specific to Firefox (apparently regardless of version), not to a profile.
Additional way to see the problem -- open two firefox instances (e.g. copy-paste two portable installations).
In one open a bunch of tabs as described above.
Then in both of them open maps.google.com and go to street view. Compare how smooth panning works between two instances -- in my case the 'empty' firefox instance if very smooth whereas the firefox instance with a lot of tabs is much less smooth.
Hey, I've been having the same issue for a few months now and it finally got to a point where I seriously start to get frustrated by it. I've been using Firefox for ever and even was using Netscape before Firefox was even out. I feel like for each Firefox update the problem seems to get worse. Two years ago I made fun of people using Chrome, but now, I even have a hard time convincing myself not to start Firefox only for web development purposes.
I don't use the smooth scrolling extension, but I use Adblock Plus, Firebug, Greasemonkey (currently only one low weight script for one web page is enabled and I've not been visiting that page for a few days now), RequestPolicy, Test Pilot and Web Developer. So I guess your problem is not related with that extension. What I have in common with you is the usage of Firefox until it starts stuttering or Windows has a blue screen, the fact that I have a large amount of tabs opened (around 15 on average) and that Firefox starts stuttering at around 1.5 to 1.8 GB of RAM usage. And I noticed that closing all the tabs does not reduce the memory usage to below ~900 MB. In previous versions (like 3.6 or 4), I was able to have 30 tabs opened without having any problem.
If this isn't fixed soon, I think I will move to Chromium. Chromium is exactly like Google Chrome, but without the need to have a Google account and it is not communicating with Google without you being aware of that (unlike Google Chrome).
tl;dr I doubt the problem is coming from the smooth scrolling extension, as I have the same problem as you when using Firefox a lot without using that extension. Try Chromium instead of Google Chrome if you don't like all the Google stuff inside of Google Chrome.
Would SeaMonkey work better? It is much more like the way Firefox used to be than Chromium. By the way, I would suggest Iron instead of Chromium if you really want a Chrome work-alike. It is even less prone to spying on you. To get SeaMonkey: