Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone with memory problem with Firefox? My FF is currently using 2G memory while I only have 13 tabs opened and most of them are just plain simple pages. I am sure it will keep sucking up memory until I do restart. This problem is not new. Is there a memory leak problem with FF?


First of all, it's hard to tell how much memory a process uses. If you're on Linux or on OS X and you're using "top", there's difficulty in interpreting the results.

For example right now my Firefox 26 with about 20 tabs is being reported by "top" as using 2190MB VIRT and ~1030MB RES. VIRT reports the total amount of memory allocated, including memory that's shared between processes, including memory-mapped files, including virtual memory, including the loaded shared libraries, or anything that takes up address space, but address space is not real, the measure is next to useless. RES is the relevant measure, which in my case reports about 1 GB, however that's a little misleading too because it also counts memory that's shared between processes, although in my case I think 1 GB is an accurate measure. And if you're using some kind of GUI that doesn't specify exactly how it calculates memory consumption, then you can't trust what it says.

Second, free memory is unused memory. Browsers are caching stuff for example. Unused caches in memory-strained systems end up being flushed to disk. The kernel is quite efficient in flushing memory pages on disk and reloading them later when needed. That's why it's very hard to tell how much memory a process needs to be usable.

If you want to claim that some application leaks memory, then you need to look at growth. And if you want to claim that it's a memory hog, then you need to take a look at how it behaves on top of memory constrained systems.

In my experience, Firefox is very memory efficient, which is why I'm using it and not Chrome. And I'm on the beta channel now, so I've been on Firefox 26 since a week ago and it's OK.


In my case, everytime I open a new tab, the mem usage goes up. But when I close a tab, it does not necessarily go down, or just goes down a little. So the overall trend is it goes up, until it can no longer function (freezed up on my old 4G computer). Then I have to kill and restart it.

I use OSX's Activity Monitor to see the mem usage.


Can you try running in Firefox's safe mode and let us know if you have the same issue... sound to me like one of your extensions is leaking.


This isn't something that happens to all users. Ever since Firefox 4, I've been able to open literally hundreds (400 to 600) tabs without suffering much of a hit at all. This is on Linux, and with several addons.


> And if you want to claim that it's a memory hog, then you need to take a look at how it behaves on top of memory constrained systems.

I can confirm that Firefox regularly runs out of memory and dies on a system with a total of 1G of ram and 512M data segment limit.


And I can confirm that if I load 6 tabs in Firefox and go to work, when I come home it will have eaten 2G of my memory, the next morning it will have eaten 5, and a couple of days later nothing on my system will run without disk thrashing because Firefox is sitting at 96% memory usage.


Please file a bug, include an about:memory dump (use the "Measure and save" button), and CC me and/or mccr8.


What platform? On XP, I leave a firefox session running for weeks and it only gets up towards 1 gigabyte (seems even less with some recent updates, but I don't keep a close eye on it).

I leave gmail and lots of other tabs open all the time.

(Mostly I suspect they are better able to find the leaks on Windows, no idea why that would be)


I have seen JS webapps that leak memory something awful. I have never encountered anything as bad as the grandparent post, but a gig or two of growth after a week of just one tab open containing one misbehaved web app is not unheard of.


If you look at about:memory, it can give you information about where the memory is going. If you file a bug on bugzilla with the [MemShrink] whiteboard, we can look into it and try to figure out what is happening.


Thanks! I have used about:memory and 'CC', 'GC', etc, but they didn't help. I will see if this is a problem with the new version. At least older versions (25 or before) all had the similar issue.


Those buttons aren't silver bullets. If you file a bug and include the contents of about:memory (use the "measure and save" button) and CC me or mccr8 there's a decent chance it'll get looked at.


Sounds like a rogue addon. You could try disabling them and seeing if that helps?


No addon. It's new install on a fresh new machine.


There has been for a very long time. However, now after the image rendering changes in 26, I believe most of the issues now should be related to various plugins and add-ons.


Upgrading to v26 now. Will see if it helps at all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: