Closed Bug 1334367 Opened 7 years ago Closed 7 years ago

High memory usage in Firefox 51 with Adblock Plus/Ghostery/uBlock Origin

Categories

(Core :: General, defect)

51 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1336811
Performance Impact ?
Tracking Status
firefox52 - fixed
firefox53 + fixed
firefox54 + fixed

People

(Reporter: ledzepiscool, Unassigned)

References

Details

(Keywords: qawanted)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

I went on a bunch of random sites (e.g. youtube.com).


Actual results:

It went so slow and laggy.


Expected results:

It would be fast and normal, like Google Chrome is.
I don't know what's going on with Firefox 51.0.1, but after yesterday's update to 51.0.1, I have woke up today (after leaving my PC & Firefox running (with about 15 tabs opened) for the night like always) Firefox has became slow and laggy (for ex. switching between tabs takes 5 secondes, text input slow), therefore I have decided to restart it, but the Firefox process has been still running in Windows Task Manager for several minutes eating a single cpu and then finally Firefox has crashed along with the Plugin Container, I hadn't such crash at quitting long time. Then Firefox has asked me for sending the crash report, I have accepted:
https://crash-stats.mozilla.com/report/index/a97f5e48-bcf3-4303-9a6d-4504b2170128
(In reply to marcino245 from comment #1)
> I don't know what's going on with Firefox 51.0.1, but after yesterday's
> update to 51.0.1, I have woke up today (after leaving my PC & Firefox
> running (with about 15 tabs opened) for the night like always) Firefox has
> became slow and laggy (for ex. switching between tabs takes 5 secondes, text
> input slow), therefore I have decided to restart it, but the Firefox process
> has been still running in Windows Task Manager for several minutes eating a
> single cpu and then finally Firefox has crashed along with the Plugin
> Container, I hadn't such crash at quitting long time. Then Firefox has asked
> me for sending the crash report, I have accepted:
> https://crash-stats.mozilla.com/report/index/a97f5e48-bcf3-4303-9a6d-
> 4504b2170128

After like an hour of using it, it starts lagging on me. I didn't have this problem on the previous versions.
Yet another case of "slow and laggy" on 51+: Bug 1334867
 Does the bug happen with the latest Nightly? 
 On which Operating System does the bug happen?
I got 2 crash report on nightly yesterday on Windows 10. 

[bugday-20170130]
If you have multiple firefox.exe processes, this is likely the result of multi-process being enabled for you. It's possible that one of your add-ons is interacting poorly with e10s and creating a leak - that'd explain the slowly increasing lag over time (the course of an hour).

If you disable your add-ons, does the problem still happen?
I have no multi-process enabled, in about:support it writes: "Multi-process windows 0/1 (disabled due to add-ons), but you are right, it might be still due to an add-on. I'll have to conduct the investigation again, but I'm tired of the continuing problems posed by add-ons, especially when I'm asking the bug reporter for a list of his add-ons (https://bugzilla.mozilla.org/show_bug.cgi?id=1326095#c14) but the buffoon does not even answer / help, I had to trace the offending add-on myself which was not comfortable. Hey  Sabbath Fan - it might be that the add-on causing lag & slowness will be the same we both have, so could you please paste here a list of your enabled add-ons + tell if you have multi=process enabled? Then I'll post my list too, that way it will be easier & faster to find the offending add-on. Thanks.
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

I have tested your issue on latest Firefox release v51.0.1 and latest Nightly (Build ID: 20170131030205) and could not reproduce it.

Can you please retest this using the latest Nightly build (https://nightly.mozilla.org/) and report back the results ? When doing this, please use a new clean Firefox profile, maybe even safe mode, to eliminate custom settings as a possible cause (https://goo.gl/AR5o9d).
Flags: needinfo?(ledzepiscool)
I'm facing the same issue, v51.0.1 (32-bit)
@sakthivel, are you using a clean profile? 

Can you go to about:support page, click on "Copy text to clipboard" button, paste the text into a txt file and attach it to this bug?

If this is still an issue, please make a profile with Gecko Profiler (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler) in order to see what affects the performance of the browser and paste here the link to the profile.
Flags: needinfo?(p.stivel)
The first shared thing is that everyone here is using FF 32bit: Sabbath Fan, sakthivel, me + yet another guy - bugzilla.10.dggeorge with the same issue: Bug 1335482. 

The second shared thing is that me and bugzilla.10.dggeorge have e10s disabled, so there is also a info needed whether Sabbath Fan and sakthivel also have e10s disabled. 

And the third shared thing is/are the shared add-on(s) we all do have (if we do), it will be the offending add-on(s). 

As for now, since I have switched an hour ago from AdBlock Plus 2.8.2 + AdBlock Plus Element Hiding Helper 1.3.10 to uBlock Origin	1.10.6, the bug is gone (at the moment): FF is running smoothly and quickly, no ghost windows, and it only takes 600MB of RAM with 7 tabs opened, but it must take more time to make sure (until tomorrow). My other enabled add-ons are as below, (they are all the same add-ons I have before used together with AdBlock Plus):

> Application Update Service Helper	1.0	true	aushelper@mozilla.org
> Autofill	3.6.1-signed.1-signed	true	firefox-autofill@googlegroups.com
> Bezpieczne logowanie	1.2.3	true	secureLogin@blueimp.net
> FoxyProxy Standard	4.6.5	true	foxyproxy@eric.h.jung
> Greasemonkey	3.9	true	{e4a8a97b-f2ed-450b-b12d-ee082ba24781}
> Multi-process staged rollout	1.7	true	e10srollout@mozilla.org
> Page Zoom Button	1.4.1.1-signed.1-signed	true 54c7d9671b9eccd9e5686a73df34ab60@button.codefisher.org
> Pocket	1.0.5	true	firefox@getpocket.com
> Visited	1.13.1	true	jid0-xGZYdxpAkROWMUMfWKINyrXigBA@jetpack
> Web Compat	1.0	true	webcompat@mozilla.org
> YouTube Auto Replay	3.3.1-signed.1-signed	true	YouTubeAutoReplay@arikv.com

But it seems that the offending one is probably still Adblock Plus (like in Bug 1326095) which has just became more unstable on FF 51 than on FF 50 before, and that is all the mystery. But like I have said, we have to wait until tomorrow, then I can confirm it was ADP offending.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1335482#c4. Just like I have been supposing, the only shared add-on is AdBlock Plus 2.8.2. Bingo !
You can also see my new comment https://issues.adblockplus.org/ticket/4841#comment:7
Attached file about_ff.txt
Again, at sakthivel AdBlock Plus 2.8.2 is the only shared add-on too, but with e10s enabled this time. I'm not claiming that everyone's issue of the type "slowness, lags, unresponsiveness, freezing, high memory usage, which are growing as time passes" is due to AdBlock Plus, but as AdBlockPlus is the most popular add-on for FF and has recently a huge memory leak which has the same symphtoms, it might be that a large part of such bugs on Bugzilla is recently being caused by AdBlock Plus, therefore people which are experiencing the issue with AdBlockPlus enabled should attach their about:memory reports at the moment their FF is becaming laggy and is eating much of RAM, to check whether they are having ghost windows left by AdBlockPlus.
See Also: → 1326095
See Also: → 1335482
Component: Untriaged → Add-ons
Product: Firefox → Tech Evangelism
Version: 51 Branch → Firefox 51
Wow! Glad I'm not the only one! 51.0.1 is horrible! It has been so laggy I was beginning to suspect I had a trojan. It even hangs and freezes sometimes... Did a full scan of all files which yielded no negative results. I switched back to Chrome and it runs like a dream! What is going on with FF?
(In reply to cmacduffie77 from comment #15)
> Wow! Glad I'm not the only one! 51.0.1 is horrible! It has been so laggy I
> was beginning to suspect I had a trojan. It even hangs and freezes
> sometimes... Did a full scan of all files which yielded no negative results.
> I switched back to Chrome and it runs like a dream! What is going on with FF?

Also wanted to add I'm running Windows 7 Ultimate with an AMD 8350 and 12 gigs of RAM.. Only add-ons are ad block plus and some pop up blocker and have used both since I started using FF.
(In reply to marcino245 from comment #10)
> As for now, since I have switched an hour ago from AdBlock Plus 2.8.2 +
> AdBlock Plus Element Hiding Helper 1.3.10 to uBlock Origin	1.10.6, the bug
> is gone (at the moment): FF is running smoothly and quickly, no ghost
> windows, and it only takes 600MB of RAM with 7 tabs opened, but it must take
> more time to make sure (until tomorrow). 

I can confirm that it turned out that my bug here has not been a new bug but the old same issue from there: Bug 1326095. The bug is being triggered when AdBlock Plus is enabled but it's a Firefox's bug. After the long 24h session with 8 add-ons enabled (no AdBlock) and with uBlock Origin with 11 filter sets enabled (led by EasyList), I have closed all the other tabs but a single one, and I can finally confirm that with AdBlock disabled the bug is gone for me and RAM usage is keeping stable at around 640MB with a single tab (compared to 1.3GB with AdBlock Plus - this is great 2x improvement). But the bug is gone at 99% and not at 100%, because a minor drawback is that the about:memory report is showing 2 ghost windows, but it seems they are not having a noticeable impact on anything, at least on this particular long 24h session and it's particualr visited webpages. I don't know whether anything bad would happen after a longer - several days session with a different set of visited webpages. But I will be keeping running this session as long as possible, and if anything bad will be happening I'll inform. Another thing is that the 2 ghost windows are Facebook's ones, wherein I have not visited facebook, at least directly, it seems that Facebook has been induced and loaded in the background as 3rd party buttons embeded on a "News" webpage tvn24.pl I have visited.
Just to throw a spanner in the works...I am using uBlock Origin and having the same laggy/slow problem on both my laptop and my desktop. It seems to really slow down if you go to youtube, even if you've just started up Firefox. Again, the issue only appeared with the update to Firefox 51.
32-bit Windows 10. I haven't used AdBlock for years, using uBlock Origin instead. Since 51.0.1, it's been very slow. 

Today I disabled automatic updates and then reinstalled the older 51.0 (EMEfree-1.0) over the current version, and it's now back to it's normal speed.
Same here, at the beggining i was thinking it was other stuff. i have 16 gb of ram so i discarded that, i completely unistall and reinstall firefox running with default extensions and plugins, and the same result, even i opened my pc to change the thermal paste and nothing, now i find i am not the only one with this problem, it was running great with earlier version.
Same on my side.  I use Firefox everyday.  Since today Firefox lags and as a lot of display issues.  Please fix asap.  I have v51.0.1 32-bit.
I am facing the same issue and I had opened a ticket here https://bugzilla.mozilla.org/show_bug.cgi?id=1337204
Also happening to me. It looks like firefox 51 doesn't free memory that is no longer being used. For example, the memory used to load a youtube video remains in use even after closing the video. Just a couple youtube videos can get firefox up to >1,500,000K. Of course, this applies to video, audio, pictures, and text. EVERYTHING that is loaded by firefox stays loaded even after closing the tab. One day of normal use got me up to 3,000,000K. Somebody broke the code that makes firefox free up memory that is no longer in use.

Expected behavior: Closing a tab that is using ###K of memory should reduce firefox's memory usage by ###K.

Observed behavior: Closing a tab does not free the memory used by that tab.
It's the same herre,I work with Firfox 10 hours a day and since the 51.0.1 , it's impossible to work with it. I'm oblige to use Google Chrome
I do not believe that the problem lies with AdBlock as I do not use this, but have been experiencing the same issues with V51.0.1 (32-bit) on Windows 10.
My extensions are:
1-Click YouTube Video Downloader	2.4.1	true	YoutubeDownloader@PeterOlayev.com
Application Update Service Helper	1.0	true	aushelper@mozilla.org
Multi-process staged rollout	1.7	true	e10srollout@mozilla.org
Pocket	1.0.5	true	firefox@getpocket.com
Tab Mix Plus	0.5.0.2	true	{dc572301-7619-498c-a57d-39143191b318}
Web Compat	1.0	true	webcompat@mozilla.org
Wikiwand: Wikipedia Modernized	4.5.13	true	jid1-D7momAzRw417Ag@jetpack
Symptoms of the problem are that FF works fine on initial activation, but after a period of time (less than an hour) pretty much grinds to a halt.  Issue was not present on earlier versions.  I have a fast fibre connection and running a connectivity check showed a latency of ~1000ms whilst running the same check using Torch gave a latency of 9.2ms.
I hope this helps in diagnosing the issue.
OS X 10.11.4, all plugins disabled. plugin-container process starts out using ~4GB RAM, gradually increases past 10, 20, 30GB, 35GB over the course of the day bringing the machine to a grinding halt and killing battery.
Mac OS X 10.12.2 (16C68).
Mozilla 53.0a2 (2017-02-14) (64-bit).
Memory usage ramps up to 18 Gb by the end of the day. <30 tabs open, no videos open or anything too heavy, only way to free the memory is to restart ff. Please, fix ASAP. Unusable atm.
I'm getting the same or similar issues, but I have never had AdBlock.  I've been using uBlock Origin for over a year and not seen this issue till now, so that isn't the cause.  I started seeing high CPU usage from Firefox on only some web pages, I got the impression it was due to plug-ins or scripts running, since the pages would have multiple videos or ads going at once.  It began with Firefox 51 and got worse with 51.0.1.  Unless I find and close the tabs causing the high CPU usage, I will get the same slowness and lagging, and often get Not Responding in parentheses in the Firefox title bar, and must close Firefox with Process Explorer or Windows task manager.  
I have not yet tested it with all add-ons disabled.  Honestly, it's not my job to bug test for Mozilla, and since the add-ons are approved and have caused no issues till Firefox 51.01, it's likely the issue is in Firefox's interaction, not in the add-ons themselves.  When I have time to test, I will, but I am pretty busy with my own work.  
This is an older system, that works well otherwise and is malware-free.  Windows 7 Pro 32-bit, Intel Core 2 6400 at 2.13 GHz, 2 GB memory
In case this helps, the only five Add-ons I have on my Firefox are:
- OPENH264 Video Codec Provided by Cisco v 1.6
- Primetime Content Decryption Module provided by Adobe v17
- Shockwave Flash 24.0.r0
- Silverlight Plug-in 5.1.50901.0
- Widevine Content Decryption Module provided by Google v1.4.8.903

In my case I just decided to Downgrade to V50, and deactivate the auto-updates (Click the Open Menu    button located on the top-right, then select Options > Advanced > Update), and it is working fine now.  I followed the instructions provided by Mozilla "how to install an older version of Firefox.": 
https://support.mozilla.org/t5/Install-and-Update/Install-an-older-version-of-Firefox/ta-p/1564
Had the same lag using 32-bit FF under Win10

Switched to 64-bit Nightly build 54.0a1 and all good - whilst it initially suggested an add-on was slowing things, trying with/without add-on(s) made little difference. Starting with same tabs (I kill the process to ensure same tabs), CPU load was high to start (as expected) but there was no significant lag and once loaded, CPU reduced to normal levels
Hello,
I had tested Firefox v51 x32 Bits & 64-Bits both and the two these versions have the same problem of RAM Memory leakage/draining. I was downgraded to firefox v50.1.0 and I was closed firefox updates.Probably the SSL feature which added recently or another bug makes this memory draining/leakage. Also I have tested with the Google Chrome, Opera and Microsoft Edge but none of them is appearing this issue. Such the problem is not appearing in previous versions of firefox the problem is located in version 51. I watched that when mozilla firefox is draining the memory (4-5GB) of RAM wnen I am closing it after few seconds the amount of reserved memory (4-5GB) is releasing and returns back to the system.
Who in their right mind would release this in such a poor state? It is appalling really, and worse that it has not even been looked into since over a month. Like the others here, since the update to 51.0.1, I started noticing Firefox grind to a halt on common websites (even gmail.com, even logging out takes forever and some secure sites that I had no problem with now complain about an Insecure connection). Some sites don't show their content properly even after trying to load forever. I have tried disabling plugins and clearing cache and restarting. It is quite simply unusable at the moment. I had enough of this. Switching to Chrome.
51.0.1 (32 bit) has to be the buggiest update in at least three years. I have filed multiple crash reports, and that is with light use (by light I mean one to two tabs max). The worst is when I have opened a link from facebook to an off site link. Often I have to wait at least A minute before it loads and even then it can take just as much time to actually be able to scroll through it. I'm not able to go back to the other tab, and if I do make it back once again I cannot scroll.
I did have same problem.

Sometimes firefox hangs while switching tab.
(In reply to Bill Fu from comment #34)
> I did have same problem.
> 
> Sometimes firefox hangs while switching tab.

I didn't see same problem on Firefox 50.
I'm using Firefox 51.0.1 (64-bit) on Windows 10.
I downloaded the new version today and it is so slow and hangs.
I disabled AdBlock Plus and the issue seems to have been resolved.
Hey guys, I had encountered with horrible lags after firefox has been updated to 51 version. I'm using kubuntu 16.04 with KDE and think that the problem is definitely related to this and gtk3. I do not remember what my theme was before, but now there is no longer such. Problems began to appear with user controls in a browser. I constantly feel the delay, after pressing the select control. This usually a few seconds, if it has a small number of options. But if a lot of them, it becomes a huge delay. It does the job quite unbearable. I also noticed that the amount of usable memory is increased to 500 megabytes.  Installing a different theme does not solve the problem. How can this be?
Update: After disabling AdBlock Plus, the issue did not completely went away. So I disabled Ghostery. The result is a net increase in page loading time and no more lagging when interacting with the browser. I'm on Windows 7 (32bits).
(In reply to Bill Fu from comment #35)
> (In reply to Bill Fu from comment #34)
> > I did have same problem.
> > 
> > Sometimes firefox hangs while switching tab.
> 
> I didn't see same problem on Firefox 50.
> I'm using Firefox 51.0.1 (64-bit) on Windows 10.

I tried to blocks Adobe Flash Plugin, the problem disappeared.
I see i'm not the only one, especially flash (youtube, streaming sides etc.) are slow, and use alot of CPU (35% and more all time)
I had to switch a user over to using IE today because of complaints about them not being able to get into their e-mail in a prompt fashion. It would start slowing down their entire computer.

I made sure to disable all add-on's and even did a complete re-install of the browser and the issues still persisted.
(In reply to dlong from comment #42)
> I had to switch a user over to using IE today because of complaints about
> them not being able to get into their e-mail in a prompt fashion. It would
> start slowing down their entire computer.
> 
> I made sure to disable all add-on's and even did a complete re-install of
> the browser and the issues still persisted.

You monster! There's still Chrome as an option!!
(In reply to Mr ins from comment #41)
> I see i'm not the only one, especially flash (youtube, streaming sides etc.)
> are slow, and use alot of CPU (35% and more all time)

Yes, I have same problem when accessing youtube with HTML5 enabled. CPU usage is very high.
This bug really can't proceed until we have more actionable data. I'm not able to reproduce this issue, but clearly others are experiencing it.

What we need is a profile, as originally requested in comment 9.

Hey RyanVM, who from SV can we point at this to try to get a reproduction and profile?
Flags: needinfo?(ryanvm)
Flags: needinfo?(ryanvm) → needinfo?(rares.bologa)
Youtube? WTF. Dude I have fixed this issue by disabling AdBlock Plus and Ghostery.

End of story.

You should clearly test by enabling adblock plus and ghostery and checking for memory leaks
while in debug mode. I cannot reproduce this problem on Linux.
Flags: needinfo?(rares.bologa) → needinfo?(vlad.bacia)
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0

I have retested this issue on latest Firefox release v51.0.1 x86 and x64 with e10s ON and OFF, and could not reproduce it. I have installed Adblock Plus+Ghostery and uBlock Origin+Ghostery, visited random multiple websites and the ones mentioned in the above comments. I did not observe any ghost-windows or high mem usage or slowness.

If any you can reproduce the issue, please make a profile with Gecko Profiler (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler) and post the profile here so that we can see what affects the performance of the browser. It will be very helpful. Thank you.
Flags: needinfo?(vlad.bacia)
Flags: needinfo?(vbirloudis)
Flags: needinfo?(markulousuk)
Flags: needinfo?(marcino245)
I have installed the Gecko Profiler extension but I have failed to get a profile.

I'm now on a Windows Vista PC, using the Firefox 51.0.1 (32-bit) that is up-to-date. However I have this problem also in another PC with Windows 10.

What happened:

13:16 I went to Facebook and I scrolled down repeatedly, for four minutes.

13:25 Firefox started to work very slow. The main* Firefox process in the task manager showed 80-89% CPU usage and 1100 MB memory usage.

13:25 I clicked on the "Globe" and next on "Analyze". A new tab opened (https://cleopatra.io/) and showed a progress bar and the text "Retrieving profile". 

13:30 After 5 minutes, the page is still "Retrieving profile" and the main* Firefox process is 80% CPU usage and 700 MB memory usage.

13:35 After 10 minutes, the page is still "Retrieving profile" and the main* Firefox process is 80% CPU usage and 700 MB of memory usage.

13:43 After 20 minutes, I decided to close the facebook tab: the main Firefox process falls to 5% usage and 500 MB of memory usage. The Cleopatra tab is now "Reading local storage".

Notes:
*I say "main process" because there is a second Firefox process in on the Task Manager, with 0-1% of CPU usage and about 170 MB of memory usage.
I have the slowness / memory problem also.  System: Windows 7 Pro x64 on Core i3, 8GB ram, FF 50.0.1 32-bit.  Memory builds up to 1.7 GB after my kid surfs youtube for a couple of hours.  Extensions: Adblockplus, flashblock.  No ghostery.  I will disable adblockplus today to test.
FF 51.0.1 x86 Windows 10
I not see very dramatic changes for web sites.
But seems like something wrong with processing synchronous XMLHttpRequest-s - I have same problem with 51.0.1 when use corporate BMC Remedy site. Rollback to 51.0 - all ok.
P.S.
AdBlockPlus plugin enabled, but disabled for BMC Remedy site.
It seems that when the CPU reaches the 100% of usage (and that seems to be the problem that freezes FF), the Gecko Profiler extension cannot make a profile. I'll try to make a profile before it reaches the 100%.
I tried again, scrolling down in the Facebook news feed, everything went ok for some minutes, but suddenly the CPU usage rises and reaches the 100%. It is not something that happens little by little, but suddenly. The previous time that I scrolled down, CPU usage was about 20%. The next one, 100%. Once again, I was unable to get a profile. :-(

Additional note: While being in this situation, I went to the "Cleopatra.io" tab and I've tried to recover a previous "Local Profile" and then the page has stated the following: "Error in worker: Exception: out of memory (undefined:undefined)".
(In reply to Vlad Bacia-Mociran [:VladB] from comment #48)
> User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101
> Firefox/51.0
> 
> I have retested this issue on latest Firefox release v51.0.1 x86 and x64
> with e10s ON and OFF, and could not reproduce it. I have installed Adblock
> Plus+Ghostery and uBlock Origin+Ghostery, visited random multiple websites
> and the ones mentioned in the above comments. I did not observe any
> ghost-windows or high mem usage or slowness.
> 
> If any you can reproduce the issue, please make a profile with Gecko
> Profiler
> (https://developer.mozilla.org/en-US/docs/Mozilla/Performance/
> Profiling_with_the_Built-in_Profiler) and post the profile here so that we
> can see what affects the performance of the browser. It will be very
> helpful. Thank you.

My profile. It was a few moments BEFORE the crash, CPU usage started to rise. I could not get a profile after the crash.

https://cleopatra.io/#report=1e7ed69d7e3708d283565b70dd16d80410e468c0
Update (see Comment 50): No adblock seems to have fixed it - memory is staying under 600 MB, still a bit big.  Switching over to uBlock?  Hope FF gets a fix.  Thanks.
(In reply to Jerry from comment #55)
> Update (see Comment 50): No adblock seems to have fixed it - memory is
> staying under 600 MB, still a bit big.  Switching over to uBlock?  Hope FF
> gets a fix.  Thanks.

Adblockplus has been on for a few hours now, my kid surfed youtube, but memory is holding under 500 MB.  Browsing seems quicker, too.  Disable/enable adblock fixed the problem?  (Earlier typo: I'm running FF 51.0.1)
Update (see 56): Memory started growing ~800 MB, FF slowed down again.  Installed uBlock instead of adblockplus.  Now memory hits 550 MB when my kid surfs Youtube, but releases back to 350 MB afterward (no e10S).  Problem is solved.
(In reply to Jerry from comment #57)
> Update (see 56): Memory started growing ~800 MB, FF slowed down again. 
> Installed uBlock instead of adblockplus.  Now memory hits 550 MB when my kid
> surfs Youtube, but releases back to 350 MB afterward (no e10S).  Problem is
> solved.

Nice try, but that's not what anybody is talking about. Firefox using 800mb after watching a lot of youtube is normal. We are talking about the bug that makes firefox use 2,000-3,000mb.
The Gif or HTML5 clips on the jokesite 9gag.com don't even run anymore.
I've had the same issue for past couple of days on MacOS (Sierra) v10.12.3 with Firefox v51.0.1 (64bit)  

I disabled 'Adblock Plus' and 'AdBlock Plus Popup blocker' addons, and even without restarting Firefox it appeared to run quicker! :)


Once i restarted Firefox, its working great as it did previously - like a dream! :D


Installing 'uBlock Origin' seems to run ok, and I have also 'Firebug', 'Flashblock' and 'SmartHTTPS' addons enabled and Firefox is now running without issue


Do Mozilla test the most popular Addons with automated testing before releasing a Firefox update?
(In reply to neopeeves from comment #58)
> (In reply to Jerry from comment #57)
> > Update (see 56): Memory started growing ~800 MB, FF slowed down again. 
> > Installed uBlock instead of adblockplus.  Now memory hits 550 MB when my kid
> > surfs Youtube, but releases back to 350 MB afterward (no e10S).  Problem is
> > solved.
> 
> Nice try, but that's not what anybody is talking about. Firefox using 800mb
> after watching a lot of youtube is normal. We are talking about the bug that
> makes firefox use 2,000-3,000mb.


It was using 1.7 GB (see my comment 50).  Disabling adblock restored normal mem.  Restoring adblock, mem started rising again, but not huge.  My point: adblockplus is the issue (one issue?) but it isn't always reproducible, or can be subtle.  And no, 800 MB isn't normal for me.  If 800 MB is a new normal for FF, my 11-year affair is over.
In 3 days, I got to 2.7gb. Weeks of keeping firefox 50 open with adblock only got me up to 800mb at max. Also, another user that commented in this bug report had the same problem in safe mode with add-ons disabled. Previously, firefox had a failsafe to prevent memory leaks, where once it hit 1.2gb, it would forcibly unload data (With a priority higher than about:memory), and never go above 1.2gb. That was the solution to the older bug where a memory leak would cause elements of firefox's UI to black out when the memory rose to 2gb. It looks like firefox 51 both disabled that feature, as well as introduced a memory leak that feature could have prevented.

For all the people that forgot, this bug is about firefox keeping memory from closed tabs loaded instead of unloading it.

Expected result:
If firefox is using 500mb of memory, and a webpage is loaded that uses 100mb, firefox's memory usage will rise to 600mb. Closing the tab will reduce memory to 500mb.

Actual result:
If firefox is using 500mb of memory, and a webpage is loaded that uses 100mb, firefox's memory usage will rise to 600mb. Closing the tab will not reduce memory, and firefox continues using 600mb. This happens for all websites and all tabs, but is mainly a problem with videos, as they use significantly more memory. Firefox's memory usage will rise with every website/tab loaded, but does not reduce when they are closed.
Wanted to add something to this bug report that I've just noticed today. Out of curiosity, how many people experiencing the high memory usage are also using Avast as their anti-virus?

I started suspecting that the new version of Avast (17) was causing problems with not only Firefox but with my Windows 10 installation in general (lag noticeable when launching programmes from the start menu, etc.), especially since Avast added a fourth shield (the Behavioural Shield). I also had lag with Firefox responding when clicking on a link in a different programme (such as Thunderbird). When using either Facebook or YouTube, I'd have to keep about:memory open in a tab on Firefox and manually trigger GC, CC, Minimize Memory Usage every couple of minutes or Firefox would start using 2gb, 3gb (even as high as 7.9gb on one occasion).

Anyway, I removed Avast and installed a different anti-virus. Now, Firefox is behaving like it used to. I just spent over an hour watching different videos on YouTube (opening a video from a playlist in a new tab, then closing it when the video is finished) without having to resort to the about:memory tab at all. The highest the memory went was about 450mb.
No virus scanner installed at all when it started becoming Fat Fox.  I do have Adblock Plus installed.  Others have mentioned it might be an issue?
Hi, everyone - 

Mike Hoye here, Mozilla's Engineering Community Manager.

This a reminder that Bugzilla is our professional working environment as much as it is our issue tracker, and the fact that we value and encourage community involvement in Firefox development does not give anyone the right to insult our colleagues or brigade bugs with counterproductive comments. 

We're grateful for the time and effort of those of you who are here to help us resolve this issue. Those of you who are here to call people names, though, not so much.

I ask that you do your best to help us keep Bugzilla a clean and productive place to work by respecting our Etiquette and Contributor Guidelines. 

Should you elect not to do so my next step will be disabling your Bugzilla account. If you have questions about this, feel free to email me directly.

Thank you, and have a good weekend.
Hello,
Come on guys please fix all of these firefox bugs and release the new version asap. We are a lot firefox users which we are pending the newest firefox update to update our web browser and continue working without any more problems. We tried a lot of suggested solutions without success. Such we are I.T Pros we need to return to our works asap we can't delay any more our development procedures. We are pending for the new firefox's version over a month. :(
Figured I would add in some of my findings. Been trying to monitor about:memory as my Firefox comes to a grinding halt about once a day too. Looking at the memory dump it doesn't jump out as a window or plugin issue, or at least the "Explicit Allocations" section doesn't show it. What I found interesting is under "Other Measurements" my address-space seems to show a possible issue (maybe?). 
4,095.94 MB (100.0%) -- address-space
├──3,384.20 MB (82.62%) -- commit
│  ├──3,121.11 MB (76.20%) -- private
│  │  ├──3,098.71 MB (75.65%) ── readwrite(segments=10173)
│  │  └─────22.40 MB (00.55%) -- (7 tiny)
│  │        ├──14.52 MB (00.35%) ── readwrite+writecombine(segments=1)
│  │        ├───5.19 MB (00.13%) ── readwrite+stack(segments=222)
│  │        ├───2.17 MB (00.05%) ── readwrite+guard(segments=222)
│  │        ├───0.50 MB (00.01%) ── execute-read(segments=9)
│  │        ├───0.01 MB (00.00%) ── execute-readwrite(segments=2)
│  │        ├───0.01 MB (00.00%) ── noaccess(segments=2)
│  │        └───0.00 MB (00.00%) ── readonly(segments=1)
│  ├────208.93 MB (05.10%) ++ image
│  └─────54.17 MB (01.32%) ++ mapped
├────501.30 MB (12.24%) -- reserved
│    ├──479.84 MB (11.72%) ── private(segments=7414)
│    └───21.46 MB (00.52%) ++ (2 tiny)
└────210.43 MB (05.14%) ── free(segments=442)

Is there another utility I can use to monitor what is causing all those readwrite segments?
I too have been seeing memory leaks with FF since v 51 or one of the point releases. I can't be sure which. I'm using Win 10 with latest OS updates. I would see memory increase from about 260 MB up to 2.4 GB running about 10 open tabs. I do not use AdBlock. I noticed that running YouTube videos exacerbated the problem. At first I thought perhaps one or more of my extensions was causing this, but the problem was also present in FF safe mode.

Today, I installed FF 52.0 (32 bit on a 64 bit machine) and currently with 15 open tabs, I am not seeing any significant memory leakage. The extensions I have installed are:

Name: Blur
Version: 7.1.2311
Enabled: true
ID: donottrackplus@abine.com

Name: Classic Theme Restorer
Version: 1.6.2.1
Enabled: true
ID: ClassicThemeRestorer@ArisT2Noia4dev

Name: Classic Toolbar Buttons
Version: 1.5.4
Enabled: true
ID: CSTBB@NArisT2_Noia4dev

Name: Clear Cache
Version: 2.0.1.1-signed.1-signed
Enabled: true
ID: clearcache@michel.de.almeida

Name: Clear Cache Button
Version: 0.9f.1-signed.1-signed
Enabled: true
ID: {563e4790-7e70-11da-a72b-0800200c9a66}

Name: Disconnect
Version: 3.15.3.1-signed.1-signed
Enabled: true
ID: 2.0@disconnect.me

Name: FireFTP
Version: 2.0.31
Enabled: true
ID: {a7c6cf7f-112c-4500-a7ea-39801a327e5f}

Name: FireFTP button
Version: 1.1.1d.1-signed.1-signed
Enabled: true
ID: {9BAE5926-8513-417d-8E47-774955A7C60D}

Name: FoxClocks
Version: 4.2.3
Enabled: true
ID: {d37dc5d0-431d-44e5-8c91-49419370caa1}

Name: HTTP Nowhere
Version: 2.1.0.1-signed.1-signed
Enabled: true
ID: http-nowhere@cwilper.github.com

Name: Image Zoom
Version: 0.6.3.1-signed.1-signed
Enabled: true
ID: {1A2D0EC4-75F5-4c91-89C4-3656F6E44B68}

Name: LastPass
Version: 4.1.35a
Enabled: true
ID: support@lastpass.com

Name: Print Preview Button
Version: 0.5.1-signed.1-signed
Enabled: true
ID: mail@sindre.at

Name: Print/Print Preview
Version: 1.0.1-signed
Enabled: true
ID: {19EB90DC-A456-458b-8AAC-616D91AAFCE1}

Name: RAMBack
Version: 1.0.1-signed.1-signed
Enabled: true
ID: ramback@pavlov.net

Name: SQLite Manager
Version: 0.8.3.1-signed.1-signed
Enabled: true
ID: SQLiteManager@mrinalkant.blogspot.com

Name: Tab Mix Plus
Version: 0.5.0.2
Enabled: true
ID: {dc572301-7619-498c-a57d-39143191b318}
Tracking for 53. Are we sure this is an addons issue?
I'm wondering if this may be related to the list of add-ons we unblocked as e10s compatible between 51.0 and 51.0.1 in bug 1333423.
Actually, we blocked more add-ons + e10s in bug 1333423. This being reported more in 51.0.1 rather than in 51.0 may simply be because 51.0.1 was released to many more users. 

Sounds like we need to be able to replicate this and get a memory profile before we can diagnose the issue (as mentioned in comment 9 and comment 46)
Keywords: qawanted
There may have been two (or more) issues associated with the memory leaks. Some reporters have noted that removing Ad Block fixed their problem. Since I never used Ad Block, and still had a severe memory leak problem, it is clear that at least two issues are involved.

As I pointed out in comment 73, FF v 52.0 has fixed my severe memory leak observation. I didn't see anything in the release notes for 52.0 about memory leaks, however. As a new data point, I've been running FF 52.0 for over 2 hours now, and memory is still at about 550 MB with 18 tabs including one streaming audio. This is about where it was 2 hours ago. I definitely see memory shrinking, as expected, when I've closed tabs, and increased when opening new ones. In the 51 point release (last one) I updated from, memory would rapidly grow within a few tens of minutes of a FF restart, and I never saw any shrinkage after closing tabs.
@Tim - I'm looking forward to improvements on 52.0.  It just downloaded.

An update, though, on 51.0.1: I switched from Adblockplus to ublock, and my problems went away.  Usual memory is 400 - 500 MB, up to 650 for my youtube surfing kid. The nice thing, though, is that memory would release.  I have the RAMBack extension installed, too, but I'm not sure it's doing anything.
One memory leak that seems not to have been addressed with v 52.0 is that of sites containing content of html5. Before viewing the link below, FF was at about 550 MB. After viewing the entire content of the link below, FF had risen to about 1.5 GB and would not release the memory after closing the tab. FF is also now very sluggish even when typing this note.

http://mrhpub.com/2017-03-mar/online/html5/#
After more time with FF v52.0, I'm not so sure it has fixed the major memory leak that I'm seeing. I've been running FF in safe mode for about 30 minutes now, and 15 tabs. Memory usage is already up to 1 GB. So, I'm concluding that the extensions I have been using are not major leakers. Stand by for more experimentation.
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0

After the latest comments I've tried again to reproduce the issue. The scenario was: opened 3 tabs with www.facebook.com, www.9gag.com and www.youtube.com. After that I have started to scroll through the facebook and 9gag content very fast, after that I went to youtube and played long videos (a video should have about 40-50 min) and click on the video progress bar at random positions and then repeat the steps from scrolling. After 10-20 minutes the browser starts to hang and the content is very slowly loaded or not at all. Memory used was about 2,2GB and CPU was at 20%-25%.

Here are a few Firefox profile used with their Gecko profile:
1. Firefox profile with Adblock plus and e10s ON - https://perfht.ml/2lDO8Yc (issue comment 72)
2. Firefox profile without Adblock Plus and e10s ON - https://perfht.ml/2lDYUxB (issue comment 72)
picture here - https://goo.gl/X6luUA



However I've also managed to reproduce the ghost-windows issue with and without Adblock Plus/uBlock Origin on Firefox release 51.0.1 and also on Firefox latest release v52.0 (e10s ON or OFF, 32bit or 64bit) by adding a few more steps after the above issue was reproduced and I did multiple Gecko profile, maybe they will help.
The extra steps: open about:memory in a tab. After the browser becomes slow and laggy I've closed the facebook, 9gag and youtube tabs leaving only the about:memory opened. In the Task Manager Firefox uses from 800MB to 1GB memory after the tabs were closed. I've clicked on "Measure" button and there were ghost-windows.
1. https://perfht.ml/2lDLy4h , https://perfht.ml/2m2NdfZ - with uBlock origin
2. opened youtube in a new tab, tried to play a video but it remains in loading state - profile here: https://goo.gl/izwJJK
3. other Gecko profiles, screenshots and memory reports: https://goo.gl/dBCVdx

Hope that this will be useful :)
@Mike, please, can you take a look at the Gecko profiles?
Flags: needinfo?(mconley)
Whiteboard: [qf]
(In reply to Vlad Bacia-Mociran [:VladB] from comment #81)
> 
> Hope that this will be useful :)
> @Mike, please, can you take a look at the Gecko profiles?

The first profile, I can see that AdBlock Plus is using synchronous messages from the content process to the parent process to make policy decisions on whether or not certain things should be loaded. That consumes about a half a second of the entire profile.

I do see quite a bit of garbage collection going on in both profiles. It's a little harder using the new Cleopatra, since I don't have the handy labels that just show me where GC is occurring.

Sounds like we might have a leak here. Hey mccr8, are the steps and data in comment 81 actionable?
Flags: needinfo?(mconley) → needinfo?(continuation)
Component: Add-ons → General
Product: Tech Evangelism → Core
Version: Firefox 51 → 51 Branch
It's more stable than 51.  Memory consumption used to go up to 2.2Gb, now it is hanging around 1.4Gb without any  problems.  Still a very large foot print, but not as bad as 51.
(In reply to Mike Conley (:mconley) (Catching up on reviews and needinfos) from comment #84)
> Sounds like we might have a leak here. Hey mccr8, are the steps and data in
> comment 81 actionable?

That sounds like bug 1344357,
Flags: needinfo?(continuation)
A lot of these issues sound like bug 1336811, which was fixed in Firefox 52. If you are still having issues in Firefox 52, please file a new bug and needinfo me. Filing a new bug does not take very long and will make it easier for us to track what may be completely separate issues. I will try to go through the comments that are talking about issues in 52 and file bugs on them.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Summary: Firefox 51 slow and laggy → High memory usage in Firefox 51 with Adblock Plus/Ghostery/uBlock Origin
(In reply to Jiri Moskovcak from comment #85)
> I'm experiencing something similar. FF 51.0.1 on one particular page eats a
> lot of memory - top is showing an increase of ~30M per second, until it eats
> the whole RAM and dies. Turning off ad block didn't help. I also tried FF
> 52.0 and FF 51.0  and those versions seem to be working fine.

51.0.1 is out of date now, so if you can't reproduce this in 52, then I think we can leave this alone. If you see the issue again, please file a new bug and needinfo me on it.
I filed bug 1347227 for comment 90.
Flags: needinfo?(vbirloudis)
Flags: needinfo?(p.stivel)
Flags: needinfo?(markulousuk)
Flags: needinfo?(marcino245)
Flags: needinfo?(ledzepiscool)
Mark 53/54 fixed as 53/54 in bug 1336811 was fixed.
Please file new bugs for new issues, which are likely to be unrelated to the fixed issue described in this bug.
Extended, off-topic comments on a bug marked asa duplicate add noise to the signal. Per, https://bugzilla.mozilla.org/page.cgi?id=restrict_comments_guidelines.html, we've restricted comments on this bug to Mozillians with EDITBUGS permissions. 

If you want to report a Firefox performance issue unrelated to Adblock Plus/Ghostery/uBlock Origin, do so in another bug.

Thank you.
Restrict Comments: true
Performance Impact: --- → ?
Whiteboard: [qf]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: