×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Mozilla MemShrink Set To Fix Firefox Memory

Soulskill posted more than 2 years ago | from the old-processes-never-die,-they-need-to-be-killed dept.

Firefox 375

darthcamaro writes "If you're like a lot of Firefox 4 users out there, you've probably noticed that Firefox has a serious memory problem — it uses more than it really should. At long last, Mozilla developers are finally set to take this issue seriously with a dedicated team called MemShrink that are focused on the problem. 'It's pretty clear by now that this is a much bigger problem than any one person can likely tackle,' Mozilla Developer Johnny Stenback said."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

375 comments

bound to fail (3, Funny)

demonbug (309515) | more than 2 years ago | (#36407006)

Any gains they make will be eaten up by the rapidly increasing version number.

Re:bound to fail (5, Funny)

MrEricSir (398214) | more than 2 years ago | (#36407044)

64 bits is only 8 bytes. An unsigned 64-bit number can take Firefox all the way up to version 18,446,744,073,709,551,615.

So that should take them at least until through next Thursday.

Re:bound to fail (0)

Anonymous Coward | more than 2 years ago | (#36407276)

I consider this a Firefox problem not a version problem. I have always found that Firefox uses allot of memory.

Re:bound to fail (1)

blair1q (305137) | more than 2 years ago | (#36407294)

void *myHeap = malloc( get_version() * 100 * MEG ).

Three opportunities to reduce total memory usage, there.

Problem of perception? (3, Insightful)

parlancex (1322105) | more than 2 years ago | (#36407376)

I think at least part of the problem is perception. Most people seem to have this mindset that using RAM is bad, and the more memory you have free and unused the faster your computer will be. These are the same people who think they're increasing their computer's performance by turning off superfetch, etc.The problem with this perception is that it's completely stupid.

Programs load data into memory because memory is fast and your disk and the network are significantly slower; hundreds or thousands of times slower, and pointlessly unloading the data from memory increases the risk of having to go back to the slower disk or network to retrieve it later. If you still have RAM available, it is actually detrimental to your system performance to free this data.

Now, when you're running out of RAM there is a problem, the operating system and applications should begin to free data that is the least likely to be useful in the near future to make room for whatever is needed at the moment. If Firefox has a problem it isn't RAM usage, it's that it isn't paying attention to global system memory levels and caching less aggressively when there is RAM pressure, and honestly I wouldn't know if that IS a problem because I have way more RAM than I've ever seen my computer manage to use.

Re:Problem of perception? (1)

Anonymous Coward | more than 2 years ago | (#36407496)

> Most people seem to have this mindset that using RAM is bad, and the more memory you have free and unused the faster your computer will be

Yes, but the amount FF uses actually IS bad. On my 2 GB netbook, running nothing but FF and KDE, the system goes into heavy swapping if I let FF run for a week or so without restarting it. That doesn't happen with rekonq, for example. FF's process is *always* the single biggest user of memory on the system, and just moving to a different tab can cause 10+ seconds of swapping.

Something is broken, and I'm glad they are looking into it - kudos to the FF devs, I say.

Re:Problem of perception? (1)

TaoPhoenix (980487) | more than 2 years ago | (#36407520)

Naw, efficient programming is the hallmark of good code.

Here, my machine seems to take a long time to recover "Firefox is in use" after you close an instance. That's annoying.

Re:Problem of perception? (4, Insightful)

mrnobo1024 (464702) | more than 2 years ago | (#36407532)

Most people seem to have this mindset that using RAM is bad, and the more memory you have free and unused the faster your computer will be. These are the same people who think they're increasing their computer's performance by turning off superfetch, etc.The problem with this perception is that it's completely stupid.

Programs load data into memory because memory is fast and your disk and the network are significantly slower; hundreds or thousands of times slower, and pointlessly unloading the data from memory increases the risk of having to go back to the slower disk or network to retrieve it later. If you still have RAM available, it is actually detrimental to your system performance to free this data.

If it were possible for programs to allocate caches that work like the filesystem cache, where old items get discarded automatically to make room for anything more important, then this would make sense. But in real life, when a program written with that "unused memory is wasted memory" philosophy has filled up RAM and you start another program, the first program will have to go to the swapfile. Return to it later and it'll take forever to become usable again, while it gets re-loaded 4kB at a time. (I'll usually just kill the firefox.exe process and restart it when this happens, because that's actually faster)

Re:Problem of perception? (1)

parlancex (1322105) | more than 2 years ago | (#36407608)

Yes, that's basically what I said. The problem isn't that Firefox can use a lot of RAM, but rather it isn't paying attention to the amount of RAM available to the system and acting accordingly. On all platforms you're going to have the ability to check the amount of memory actually available to the entire system, as this amount decreases Firefox can begin to proactively free memory used for the oldest cached data.

Re:Problem of perception? (4, Informative)

mysidia (191772) | more than 2 years ago | (#36407692)

as this amount decreases Firefox can begin to proactively free memory used for the oldest cached data.

So your suggestion is that each application running should be fine allocating a huge cache and changing its memory footprint according to how much memory it sees available on the entire system, instead of the OS making a decision?

I am not sure I am convinced that the outcome of that methodology is optimal. If it were; I think i'd favor "number of pages swapped in/out per second" over amount of memory free, though.

I am trying to imagine the interactions of 4 or 5 different applications all running with a huge cache, and the same behavior.... when memory usage is low, all 5 applications prepare a huge cache -- their huge cache causes the total memory free to drop, eventually to 1MB... now, suddenly, all 5 applications will use a bit of CPU time proactively freeing up large swaths of cache -- CPU will be 100% running for a couple seconds, as processes adjust their memory.

After all 5 apps reduce their huge caches, suddenly there will now be a lot of memory free --- so much memory free, that one or more of the applications might immediately see an opportunity for increased caching.

So what mechanism will protect fairness? Each application will believe its cache is important, but who's to say one of the applications isn't more important to the user, or having more requests more frequently made of it (so that the user's performance will best if application X's cache is bigger versus application Y).

There seems a fundamental weakness here, involving each application trying to make their own memory management decisions about cache --- the application making the decision to expand its cache may be the one the user cares about the least, and the one whose cache is the least useful.

The OS is in a position to make decisions and mediate in regards to the working set needs of processes, and the user's actual usage patterns. The OS knows which running process makes the most demand of its cache -- the other processes don't know much about each other.

Re:Problem of perception? (1)

parlancex (1322105) | more than 2 years ago | (#36407740)

First off, for better or for worse there's no way for an OS to actually free an allocation used by an application in either Linux or Windows. There is no mechanism in either the page or heap allocation APIs in either operating system to declare an allocation in such a way as to let the OS know that instead of paging this memory to disk when low on memory, it should instead just free it and let the application know it has done so. It's a good idea, but it doesn't exist. Secondly, the OS really doesn't have any intelligent insight into the usefulness of a particular allocation to an application. An application will always be more aware of what cached data is more useful than others.

For both of these reasons, when speaking specifically of CACHED data that can be freed with impunity, the OS both cannot and should not assume that role. I'm not saying every application should implement this kind of logic, but for certain applications it is certainly worth it.

Re:Problem of perception? (0)

Anonymous Coward | more than 2 years ago | (#36407744)

Why not allow the user to set some behaviour patterns (I haven't explored all of about:config yet - perhaps there's something in there I should look at?), such as in the circumstances you describe? I think one should be able to tell the OS to give memory priority to certain applications, or at least set a minimum level of RAM.

It's not a problem of perception. (1)

Anonymous Coward | more than 2 years ago | (#36407620)

My computer has 8 GB of RAM, and I don't use swap. Now, just because it has 8 GB of RAM that does not mean that I want Firefox using all 8 GB! I need some left over for Eclipse, Evolution, and the other memory-intensive applications I unfortunately need to use.

So I hope you can understand why I get slightly annoyed when I see Firefox consuming 7500 MB of RAM. It's clearly using that much due to memory leaks and sloppy programming. I know it's not due to aggressive caching or anything like that, because I haven't visited over 7 GB worth of pages since starting up Firefox about 10 minutes ago.

Firefox has a serious problem with wasting memory, and it needs to be fixed. It's as simple as that.

And probably too big... (1)

Kjella (173770) | more than 2 years ago | (#36407010)

...for one post-hoc team to fix after the rest have gone on a rampage. Still, I suppose it's better than not having such a group.

Re:And probably too big... (1)

BadAnalogyGuy (945258) | more than 2 years ago | (#36407090)

Does it even matter as Mozilla-based browsers become less important as Internet usage moves towards Webkit-based browsers on mobile devices?

Re:And probably too big... (5, Informative)

maxume (22995) | more than 2 years ago | (#36407114)

My experience has been that both leaks and overall memory use have gone down between 3.0 and 4.0.

At the moment, Firefox is at about 375 megabytes, with 16 tabs open. It has been open for 3 weeks. I do have browser.sessionhistory.max_total_viewers set to 3 and the anti-malware databases disabled though.

Re:And probably too big... (1)

mooingyak (720677) | more than 2 years ago | (#36407368)

Same experience here, and without using either of those settings. FF4 is still a hog, but not nearly as bad as FF3 was. I would restart FF3 after I'd left it running for more than 2 days. FF4 seems to get me closer to 5 or 6 days before I notice a problem.

All browsers are consuming more memory. (1)

SimonTheSoundMan (1012395) | more than 2 years ago | (#36407018)

I do not mean to sound like a troll, but it seems all browsers are consuming more and more memory. Chrome being the worst (due to every tab being sandboxed?), Safari is equal to Firefox.

Why is memory usage increasing so much in recent years? Firefox is currently consuming 450MB on my machine with only a few tabs open.

Re:All browsers are consuming more memory. (4, Insightful)

MrEricSir (398214) | more than 2 years ago | (#36407080)

A lot of it's got to be the increasing size of web pages in general. Now that most folks have higher bandwidth connections, web designers don't focus on keeping the download size small.

Multiply that increase by the size of your cache (how many times can you click "back" without hitting the disk?) and you can see the full scope of the problem.

Re:All browsers are consuming more memory. (5, Informative)

SimonTheSoundMan (1012395) | more than 2 years ago | (#36407136)

A useful new feature in latest Nightly versions from Mozilla is about:memory. It gives you a full tree view of where the memory is being used. Of my 360MB which the browser is currently using, 101MB is JS, 46MB is storage (you back button and memory cache), 70MB on "heap-unclassified" whatever that is. JS seems to be the biggest consumer of memory.

Re:All browsers are consuming more memory. (1)

MrEricSir (398214) | more than 2 years ago | (#36407336)

That's odd that they're making a distinction between Javascript and "storage." After all, isn't (most) Javascript associated with a specific page?

Re:All browsers are consuming more memory. (2)

billcopc (196330) | more than 2 years ago | (#36407390)

It probably means memory allocated by the JS interpreter itself, whereas "storage" is more of a file and bitmap cache. Just guessing here (though I have hacked on Firefox code in the past).

Re:All browsers are consuming more memory. (1)

The MAZZTer (911996) | more than 2 years ago | (#36407490)

Storage refers to cookies, local/sessionstorage JS APIs, and the WebDB APIs.

Re:All browsers are consuming more memory. (1)

The MAZZTer (911996) | more than 2 years ago | (#36407502)

Whoops, that's actually Chrome's definition. It seems like Firefox is looking at its SQLite databases which it uses to store profile data.

Re:All browsers are consuming more memory. (1)

petermgreen (876956) | more than 2 years ago | (#36407658)

70MB on "heap-unclassified" whatever that is

It probably means exactly what it says, heap* allocations that haven't been marked as anything in particular.

* The heap is where allocations made with the likes of malloc and similar constructs are allocated from (contrast with the global variables which have fixed locations and the local variables which are located on the stack).

Re:All browsers are consuming more memory. (0)

Anonymous Coward | more than 2 years ago | (#36407164)

Using an older laptop with 512MB of DDR for most of my web browsing, I can say that Firefox is still worse off than Chrome. I use Chromium for most of my web browsing, Opera is better about memory usage but not having an adblock extension makes it unbearable to use for long periods. Adblock is much more convenient than keeping a hosts file up to date, I'm afraid.

Anyway, 10 tabs is my maximum with Opera. 7 Chromium. 5 Firefox. I don't have numbers on memory usage in front of me, but these are the limits before swapping makes the laptop unusable. Maybe with the Windows (or Mac) versions of these browsers things are different?

Re:All browsers are consuming more memory. (-1)

Anonymous Coward | more than 2 years ago | (#36407290)

512MB? C'mon dude. 8GB laptop DDR3 is $80. Possibly $60 if you get a good deal.

Re:All browsers are consuming more memory. (1)

Anonymous Coward | more than 2 years ago | (#36407322)

What part of 'older laptop' don't you understand? Not all memory is as cheap as DDR3. Not all laptops can be expanded much in memory. Older ones especially...

Re:All browsers are consuming more memory. (1)

Ethanol-fueled (1125189) | more than 2 years ago | (#36407468)

My older laptop with the same amount of memory runs with no glitches and lagging because I don't feel the need to upgrade to the latest and bloatiest version of everything, including Firefox and the Linux operating system on which it runs.

Re:All browsers are consuming more memory. (-1)

Anonymous Coward | more than 2 years ago | (#36407482)

True but DDR2 1x4GB is still cheap [superbiiz.com]. 1x2GB DDR2 is nearly $/GB equal to DDR3.

What's more of a miracle is that you have a pre-2008 laptop which hasn't had a complete hardware failure.

Re:All browsers are consuming more memory. (0)

Anonymous Coward | more than 2 years ago | (#36407562)

That AC isn't me, the original old hardware AC. As I said earlier, it's DDR. Not DDR2. I've also found older laptops to be much more reliable hardware-wise than newer ones, I have an old Toshiba Satellite with a Pentium stashed in my closet that works fine.

This Gateway 6510GZ [gateway.com] is what I'm using, and I'm not the least bit surprised it hasn't died, personally.

Re:All browsers are consuming more memory. (0)

Anonymous Coward | more than 2 years ago | (#36407170)

No one cares about additional per-tab memory (insignificant as it is due to copy-on-write mapping) because that only raises the minimal static mem usage: memory 'leaks' are more at issue because they (usually) endlessly grow the storage space.

Re:All browsers are consuming more memory. (0)

Anonymous Coward | more than 2 years ago | (#36407214)

You think that's bad. I have a project at work where I have to spawn firefox windows from selenium to test websites. Every three days I have to reboot the system due to the memory usage. It's 32bit freebsd and I had 3.5GB of SWAP + 3GB of RAM used with 85 firefox windows open in KDE. I could barely reboot. Selenium has a "feature" where it opens a new "monitoring" window everytime start is called and i have a loop restarting when firefox crashes from too many page requests thus the high number.

In 3 weeks, I've tested 620,000 pages.

Re:All browsers are consuming more memory. (0)

Anonymous Coward | more than 2 years ago | (#36407252)

look at the content in those tabs. The flash, the large pretty images, the flash movies, etc.... compaired to 10 years ago when such content did not exist, i would say a large part of the increased memory usage is due to the increased size of web content due to the increased bandwidth we now enjoy. With that said, this effort is still a good idea, as memory usage is a tad high (100+mb with one tab [google] open is a tad excessive).

Re:All browsers are consuming more memory. (2)

Seumas (6865) | more than 2 years ago | (#36407260)

That's all? 450mb? I just checked and the latest version of FF4x is currently using 2.1gb on my system.

Anyway, I thought Firefox didn't have a memory leak? It's just how firefox is *supposed* to behave. That's what they've been saying since 3.0. You can go back to countless threads on Slashdot rehashing the same thing. "Firefox is using insane amounts of memory"... "Shut up, dumb ass, you don't know anything! It's SUPPOSED to use a gig or two!"

Re:All browsers are consuming more memory. (2)

MrNemesis (587188) | more than 2 years ago | (#36407584)

Wish I had mod points for you. But you also forgot to mention the people who say "Shut up dumb ass, you've clearly got a shitty system and/or are incompetent!" or the "Shut up dumb ass, you're obviously using the wrong/too many extensions!" as well as the "Shut up dumb ass, you've got too many tabs open" and the "Shut up dumb ass, you're not meant to keep it running for days!" crowd.

To those of you who can manage to open a hojillion tabs and keep them open for months at a time, congratulations, we're happy for you. But as a user whose firefox at work will routinely gobble 350MB just with my opening set of tabs, then go up to 700MB after a few hours usage, and then at some point in the next few days will start chomping like there's no tomorrow and eventually crawls the OS and then crashes when it hits 1.8GB (32bit limit), please take our word for it when we see Firefox having a problem. I can close up a whole bunch of tabs and only regain a few megabytes, I can close every tab and only regain a hundred or so megabytes... on machines with "only" 2GB of RAM you *need* FF to relinquish that memory. I've got nothing against apps using the memory that's there, but FF often behaves like it owns the OS, mallocing away whilst pushing other running apps out to swap.

It's nice to finally see what appears to be the beginnings of a concerted effort to address whatever combination of factors there are that contribute to the issue... but I do fear it's too little too late for a lot of people who've already jumped to chrome. (Personally, opera's been my primary browser since well before firefox was phoenix but it doesn't play well with the work proxy... it too can eat up vast chunks of memory if you throw enough gunk at it but I can always reclaim that memory by closing down a few tabs)

Not intended as a troll or a dig against FF itself, it's just frustrating sticking your hand up and saying "Hey! Got a memory problem here!" and be met with a barrage of assertions from people you've never met who insist that you must somehow be stupid, blind, mentally retarded or some combination of the above just because the same circumstances have never happened to them.

Re:All browsers are consuming more memory. (1)

PCM2 (4486) | more than 2 years ago | (#36407262)

Why is memory usage increasing so much in recent years? Firefox is currently consuming 450MB on my machine with only a few tabs open.

I just checked and ... you're right. Same here (Windows 7 x64). I have eight tabs open, memory usage is 450MB and counting. And I can just sit here and watch Firefox's memory usage slowly go up... and up... and up... while I do nothing. What's more, some people I know have a habit of leaving the browser running for days with hundreds of tabs. Not me. I'm so old fashioned that not only do I put my computer to sleep when I walk away from it, but I actually close all my running apps before I do so. So Firefox is never running on my machine for more than, say, 18 hours, maximum.

Re:All browsers are consuming more memory. (1)

YutakaFrog (1074731) | more than 2 years ago | (#36407300)

Although I agree that browsers in general are "consuming more and more memory", I'm seeing a slightly different story than you are. I abuse Firefox 4's new tab grouping functionality horribly, and keep tons of tabs open regularly. I use to have to pare them down just so I had room to read the titles on my tab bar, but now I can have upwards of 50 tabs open at a time.

Right now, I've only got 15, including my 5 pinned "App Tabs" (Four Google apps + FB). My Firefox is consuming 475 MB.

I was curious, and decided to see how much RAM Internet Explorer 9 would take with the exact same 15 tabs open. It appears to have spawned four child processes totalling approximately 1,283 MB.

My data: http://i51.tinypic.com/fualq0.jpg [tinypic.com] (Sorry, no pic of the tabs I've got going, you'll just have to believe that I really did open all the same tabs)

And yes, I should include data for Opera and Chrome, but I didn't have those installed, and want to get this posted in time for a chance at being modded up. ^_^

Personally, for how extensible, and how many great features Firefox brings to my online life, I've never considered its memory consumption unreasonable. And it certainly appears to be doing better than the competition.

Re:All browsers are consuming more memory. (1)

YutakaFrog (1074731) | more than 2 years ago | (#36407348)

I should also note that I keep Firefox open, about 18 hours per day, every day, and I hibernate my computer at night with FF still open. So it doesn't get rebooted very often, it hardly ever crashes, and it's still only consuming 475 MB. I don't know why so many other people are seeing 450 MB for one or two tabs. Maybe it's my computer?

Win 7 Pro on a Phenom II X4 940 3.0 GHz with 8 GB of RAM.

Re:All browsers are consuming more memory. (1)

Mad Merlin (837387) | more than 2 years ago | (#36407330)

To be honest, Firefox could be using double the amount of memory it currently does, and I wouldn't care. Firefox's biggest problem is that its performance isn't consistent. Use it for any amount of time and you'll notice that quite frequently the entire UI will freeze for long periods of time (0.5s-1s) for unknown reasons, which is extremely annoying. I don't care what it's doing, it shouldn't be freezing the UI. No, I don't have any extensions (except Firebug, which is Firefox's only compelling feature). And no, this isn't slow hardware, it happens on every copy of Firefox I've ever used, even on a quad core i7 with 12G of RAM.

Re:All browsers are consuming more memory. (1)

blair1q (305137) | more than 2 years ago | (#36407366)

"Why is memory usage increasing so much in recent years?"

It's always been increasing. There's nobody tracking it (maybe; I'm sure the interwebs can find someone going all OCD over it) as there's no Moore's Law for Memory Usage to be kowtowed to every time it increases, but the design of OO code libraries means that enormous things can be hidden behind a simple instantiation.

The solution is more orthogonality, but software is fairly fractal, so if your program has a very rich feature set (and browsers are tantamount to the kitchen sink, to the point they're ready to supplant the OS) it will access most of the available functionality of the system you're running on and the libraries installed in it. And it will create and retain lots of internal data for easy access while the program is running. Huge buffers and lists.

Running things that open several fully-featured windows in process-per-window modes just means that you can't reuse code between object instances, so you end up with duplicates of big libraries and data sets for each of those domain instances.

As for Firefox itself, it seems to have the most bloating when loading large Javascripted pages (Facebook game apps are possibly the worst offenders, even ones with pathetically simple user-interface semantics). Not sure how much of that Mozilla devs can cure.

Re:All browsers are consuming more memory. (1)

Huntr (951770) | more than 2 years ago | (#36407706)

I think that's about right and if I had mod points I'd give you some. I've been an Opera devotee for 12-13 years. Opera has always been pretty good at memory management, IMO, but nowadays, it uses as much as the next browser. Right now, 6 tabs open for the last 2 hrs and I'm sitting at about 512 megs used. Of course, it doesn't seem to be as big a deal when systems are built with 6-8 gigs minimum as the standard. Even so, I'm still relentlessly concerned about every spare resource my rig uses.

At last (0)

Anonymous Coward | more than 2 years ago | (#36407028)

This has been an issue for years, I've noticed memory usage problems since FF 1.0, and although users now generally have enough RAM to handle it, it's good that it'll likely be fixed at last

You can fix the version number inflation too. (3, Insightful)

Anonymous Coward | more than 2 years ago | (#36407030)

Don't be a Chrome Clone, make the next release Firefox 4.1.

.. yet still less than Opera (0)

Anonymous Coward | more than 2 years ago | (#36407034)

I switched to Opera for a bit because I was having problems with Firefox crashing, and found that it uses even more memory than Firefox.. but memory is cheap these days, and both browsers seem to perform fine.

not too bad (1)

hey (83763) | more than 2 years ago | (#36407036)

I love Firefox. I don't think it takes too much memory. Sure it could use more but its not so bad. Right now for example its using 128M (after being open for days) on a 4G machine which is fine.

Re:not too bad (1)

Anonymous Coward | more than 2 years ago | (#36407064)

I never noticed it to be a time thing; I get the huge memory use when I have multiple tabs open, opening and closing of tabs (it's like something's not freeing memory when it should) and some multimedia type of stuff seems to take a huge bite out of memory without releasing it - leaving it up running while doing nothing doesn't eat up the memory.

Re:not too bad (1)

schnikies79 (788746) | more than 2 years ago | (#36407096)

435mb currently. One tab open to slashdot, on OS X, and no plugins installed. It's about the same (+/- 50mb) on Windows 7.

It has been open for about 6 hours.

Re:not too bad (4, Informative)

dbc (135354) | more than 2 years ago | (#36407192)

OS X here -- I usually have 8 to 12 tabs open. I almost never see memory usage below 500M, and it usually grows to about 1G after 2 or 3 hours. Firefox 4 for the Mac is seriously broken w.r.t. memory usage IMHO, and if they can't fix it fast, I'll probably be switching. I clobbers the performance of the whole system when it hogs that much memory. I'm tired of having to restart FF all the time.

Re:not too bad (1)

Idbar (1034346) | more than 2 years ago | (#36407188)

It seems like certain pages will dramatically increase the memory consumption of Firefox. I've found that opening multiple pictures from facebook using multiple tasks can take easily 200MB (in addition to what Firefox was already consuming). The problem is of course that in the case of pages such as Hotmail, Yahoo, and sometimes Facebook itself, Firefox fails to re-claim and free that memory after closing the tabs.

This will also happen in Gmail if you have many javascript features open. Chrome seems to make things better because each process is killed and the memory freed for each tab/window (it will still add up a lot if you add each process' memory), while Firefox chunk of memory just looks massive.

Re:not too bad (0)

Anonymous Coward | more than 2 years ago | (#36407680)

I think it's OS-related. While FF continues to add memory no matter where I run it (I synchronize everything between Windoze and linux) I have noticed that it chews through memory a lot more quickly on Windoze. On linux at the moment I'm using 88MB and climbing slowly (probably around 1MB/hr) but on Windoze it will start up over 100MB and probably use around 5MB/hr. I'd be looking closely at the XUL and Flash libraries on Windoze to start.

Dear Firefox leaders (0)

Anonymous Coward | more than 2 years ago | (#36407052)

What took so long?

This has been a big problem since at least 3.x.

And can we talk about resource consumption in general?

Re:Dear Firefox leaders (0)

Anonymous Coward | more than 2 years ago | (#36407130)

Agreed. It's about a version too late, as I've already jumped ship. Although it's nice to hear that, despite years of people saying "Yanno, there's a memory problem with Firefox", it's actually being taken seriously.

Easy solution (3, Funny)

muffen (321442) | more than 2 years ago | (#36407070)

Bundle in MagnaRAM [highbeam.com] with Firefox.

Re:Easy solution (0)

Anonymous Coward | more than 2 years ago | (#36407186)

That article was written in 1995. I wonder how useful it will be to todays tech. Also that application is closed source. FF is OSS.

Re:Easy solution (0)

Anonymous Coward | more than 2 years ago | (#36407218)

Never mind that you have to pay that site to read the rest of the ad.

lulz.

Re:Easy solution (0)

Anonymous Coward | more than 2 years ago | (#36407226)

Heard of a joke before? :)

Re:Easy solution (1)

waddgodd (34934) | more than 2 years ago | (#36407238)

When they make magnaram for Solaris/SPARC, let me know, until then, kindly keep your platform-dependent solutions to yourself.

Re:Easy solution (0)

Anonymous Coward | more than 2 years ago | (#36407522)

When they make magnaram for Solaris/SPARC, let me know, until then, kindly keep your platform-dependent solutions to yourself.

I think you missed the joke (unless I missed the follow-on joke).

Memory problem? (-1)

Anonymous Coward | more than 2 years ago | (#36407076)

What memeory problem? It uses 150MB when just browsing with a few tabs open, I've stress tested mine with 10 tabs of videos, pages and flash. It never passes 250MB.
Who even has that little RAM still, let alone uses firefox like that?

Re:Memory problem? (1)

dstar (34869) | more than 2 years ago | (#36407128)

That sounds about right, for the first week or so, if you only have 10 tabs open. Try 25-30 tabs, for a month, and it's much larger, especially if you've visted a few poorly-designed webpages. (Though to be fair, I find that poorly designed webpages have obvious markers, like one I recently timed at seventeen seconds(!) before I could scroll down... and if I leave it open in a tab, eventually crashes the browser (although that takes a couple of days)).

Re:Memory problem? (0)

Anonymous Coward | more than 2 years ago | (#36407222)

What find of maniac cunt has their desktop computer on for more than 2 days running, and if that is the case, is incapable of restarting their browser in under 10 seconds if some kind of freakish (since firefox 1 i've had no more than 300mbs of RAM usage) memory consumption issue occurs? Well, you screaming cunts? IIII'M WAAAAAAITINGGG...

Re:Memory problem? (2)

arth1 (260657) | more than 2 years ago | (#36407296)

Out of curiosity, why so many tabs? Unless it's a page that will look different if you reload it, and you need to see what it was like the last time you looked, can't one just bookmark the page and open the bookmark instead of the tab? And if you already have a bookmark, just close it?
That way, the tabs won't hog memory and CPU.

Re:Memory problem? (1)

hawguy (1600213) | more than 2 years ago | (#36407152)

What memeory problem? It uses 150MB when just browsing with a few tabs open, I've stress tested mine with 10 tabs of videos, pages and flash. It never passes 250MB.
Who even has that little RAM still, let alone uses firefox like that?

My browser has been open for about 2 days, I have around 20 tabs open (no video sites, though I'm sure a lot of the pages have Flash ads)

It's currently using 2200MB of virtual memory and 1100MB of real memory.

That doesn't include the 289MB/123MB used by the Flash plugin container.

Re:Memory problem? (0)

Anonymous Coward | more than 2 years ago | (#36407420)

What reason could you possibly have for keeping 20 tabs open for 2 days?

Re:Memory problem? (0)

Anonymous Coward | more than 2 years ago | (#36407542)

Laziness.

Not that I blame him; tab implementations promote laziness w.r.t keeping tabs open because the tab management sucks so hard. Tabs haven't changed in >10 years.

Re:Memory problem? (1)

the_raptor (652941) | more than 2 years ago | (#36407202)

10 tabs is kindergarten for serious browsers. The problem from what I can tell is with people who have A LOT of tabs open for a long time. Remember not everyone shuts down their computer each night, some people keep Firefox instances running for months.

Also even if it only uses 250MB that is unacceptable if that is more then it actually needs to use. If everyone followed the "people have heaps of memory so don't worry about minor memory leaks" then we would quickly find our abundant memory filling up. Memory bloat and "just reboot" are never acceptable.

Good! (1)

gman003 (1693318) | more than 2 years ago | (#36407106)

Firefox desperately needs to lower its memory usage. I've been using FF4 for a while now, and it's using 200MB. It's gotten so bad that I installed an addon to provide easy restarts - twice a day or so, I reboot the browser.

Yes, 200MB would be fine if the computer was just being used for web browsing, or even just office stuff. But I use this machine for gaming a lot - a a recent convertee from Chrome, I'm used to being able to start up a massive memory-hog game without needing to close out my browser.

Re:Good! (1)

jawtheshark (198669) | more than 2 years ago | (#36407264)

You still can, if the OS has adequate memory management, your browser will be relegated to swap. After your game, the browser will be there and take a bit of time to load back into main memory, but it'll be quicker than a fresh start.

Re:Good! (1)

sneakyimp (1161443) | more than 2 years ago | (#36407344)

DDR3 Memory is DIRT CHEAP now. I'd strongly encourage you to buy more. If you are on a 32-bit OS, then upgrade!
e.g.: http://www.newegg.com/Product/Product.aspx?Item=N82E16820231277 [newegg.com]

Re:Good! (1)

gman003 (1693318) | more than 2 years ago | (#36407404)

Laptop. Only two slots (DDR2 as well), and both already have 2GB in them. Upgrading to 4GB sticks of the same speed would be $140. Since I'm planning to get a new machine this year, it's not worth it.

And yes, modern games will easily use 4GB.

Re:Good! (1)

DarkXale (1771414) | more than 2 years ago | (#36407552)

Most modern games don't even have LAA flags set, so no. The actual games themselves will generally sit between 800mb to slightly below 2gb.

Other annoyances (1)

Savantissimo (893682) | more than 2 years ago | (#36407144)

If they could prevent a bad script or plugin from taking the whole browser with it, that would be great.
  It really needs a way to see a list of what scripts and plugins are running, what resources each is consuming and the ability to kill them individually.
A list of currently open tabs would also be good, especially if it also had a history list for each tab (bonus points for making it editable, with drag and drop, etc.).

OPEN SORES LINQUAFRANCA FOR "WE SUCK" !! (0)

Anonymous Coward | more than 2 years ago | (#36407148)

You open sorers never will get memory !! It's just not in you !!

screw mozilla. (0)

Anonymous Coward | more than 2 years ago | (#36407204)

Version 4 is the death of fireefox. I was a long time supporter and I switched to chrome when ver 4 came out. Performance is crap on a Core i5 laptop running Win 7.

good news / bad news (1)

roc97007 (608802) | more than 2 years ago | (#36407224)

The good news is, the team has produced a plugin that reduces the browser's memory footprint to 25 Mbytes.

The bad news is, the plugin takes up 300 Mbytes.

What memory problem? (0)

Anonymous Coward | more than 2 years ago | (#36407230)

In all seriousness, I have 3 computers, firefox 4 on all 3, and not one of them eats much memory with firefox, which is open basically all the time. This is curious to me as evidently a lot of people DO have a memory problem, and it makes me think the "problem" may not be the browser itself, but something related.

3 Computers
A. Pentium 4, Radeon9200 graphics(64 megs video mem), 512 megs ram, gentoo 2.6.38, no window manager (mythtv box), firefox launched via script to fullscreen mode
B. Pentium 3, Mach64 graphics (radeon mobile, equivilant to a radeon 128 w/ 8 megs video mem, 512 megs ram, gentoo 2.6.38, XFCE4.6
C. Core2, gf9800gt (1 gig video mem), 8 gigs ram, gentoo 2.6.38, XFCE4.8

All 3 are set up with two plugins, noscript and adblock+, the mythtv box has an addon I wrote that rewrites youtube pages for html5 when only flash is supported on the video, and my core2 has bugmenot also. All 3 built with xulrunner, and gnome-mplayer plugin for video, no other addons. All 3 behave similarly, firefox, with multiple tabs open, rarely even hits 60-70 megs of RAM usage. While i would personally still consider this high, it's not the problem i hear others talking about their browsers having.

This makes me think the memory problem lies in either plugins, or in a build setting that my copy of firefox is not using, if this is true, it seems like the "proper" thing to do would be to either fork the plugin to a seperate process (so buggy, memory hog plugins can have their own name associated with the memory bloat people see), or change the defaults the firefox binary distribution ships with.

I'll reply to this once i get home with the build flags I use, but I'm curious if anyone else could reply with how their firefox is set up, binary distro, built with certain flags, running plugins, etc.... and whether or not they see the memory problem. I think it would be interesting to see and compare the difference between ones with memory problems, and ones without.

Re:What memory problem? (0)

Anonymous Coward | more than 2 years ago | (#36407268)

Mostly the moment you do anything Flash related it gets insanely big (even if you close those tabs). But the fact of the matter is, the stupid thing has memory leaked since 2.X and they don't care. Really without NoScript and AdBlock FF would have been irrelavant ages ago.

Re:What memory problem? (1)

WankersRevenge (452399) | more than 2 years ago | (#36407544)

I'm running the latest build of Firefox on my late 2008 macbook pro with 4 gigs of ram. Right now, the app is taking 800megs while utilizing 15% of my cpu. I'm running Snow Leopard with five tabs open. One is a 404. One is an xml view. One is xbox live with the silverlight disabled. One is Slashdot with the ajax turned off. And the final one is an image was I viewing. I have only a couple of extensions installed and I never open a lot of tabs. Five or six is my sweet spot. Once firefox exceeds 1 gig of ram it starts to peg my cpu to the point where I have to kill the process.

Maybe it's the mac build, but it really is terrible. right now, I use it because of inertia but I these days, I feel more like a babysitter.

It relieves me to see them finally taking this issue seriously but I wonder if it might be a little too late (in my case). I'm just sick and tired of being sick and tired with it.

Btw, it's now up to 865mb from when I started typing. Just switching tabs kicked it up to 890 and now 920. I'm not making this up. I've seen the same behavior on vanilla installs. It's hard to believe it's persisted so long. Lets hope we see from fruit from there team. 950 now. I can't access the status bar. Submitting this then closing down the process.

PS - Post preview it dropped to 730 although I still can't access the status bar.

Not as bad as Opera (1)

cruachan (113813) | more than 2 years ago | (#36407250)

Firefox uses massive amounts of memory, but it's not as bad as Opera which I'm starting to suspect has a serious memory leak. On my system at the moment - Window 7 ultimate 64 bit with 6Gb memory, Firefox is using 336Mb, but Opera, with less pages open, is up to 445Mb and it's using 4% CPU in the background too. I used to use Opera a lot, but increasingly I'm relegating it because of this issue.

OTOH Chrome seems to be becoming increasingly frugal over how much it uses.

BLAME FLASH (0)

Anonymous Coward | more than 2 years ago | (#36407258)

My firefox is fine until I start using flash, and then it runs away like a bloated pig.

Yay (5, Insightful)

OverlordQ (264228) | more than 2 years ago | (#36407298)

At long last, Mozilla developers are finally set to take this issue seriously

Yay, it only took 5 years of bitching for them to actually look into it instead of blaming addons or your profile.

Re:Yay (2)

sirsnork (530512) | more than 2 years ago | (#36407396)

Yup, too late to get me back, I put up with the memory usage and the random lock ups of several seconds when it was loading an intensive page all the way through version 3, when they were all still there in version 4 I switched to Chrome. I lost a few addons that I love but the grief just wasn't worth it anymore.

Re:Yay (1)

Rufty (37223) | more than 2 years ago | (#36407582)

Don't forget the 10 minute battery life and knee-searing temperature if you tried to use Firefox on a laptop. Went to Chrome and won't be going back.

How to allocate more RAM to firefox? (1)

sneakyimp (1161443) | more than 2 years ago | (#36407310)

I noticed this problem with Firefox and bought tons of RAM for both my Windows 7 64-bit and my Ubuntu-64 machines. Weirdly, they don't take full advantage of the extra RAM and I still get sluggishness as these programs appear to be paging to disk. I therefore welcome this advancement.

PS: If anyone has tips about how to get more memory to FF, I would greatly appreciate it.

Re:How to allocate more RAM to firefox? (0)

Anonymous Coward | more than 2 years ago | (#36407438)

Use a 64-bit builds of Firefox. Even Flash works, it has a 64-bit version these days for Windows 7. I don't know if it's up to date, though. http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/

Pinpoint (3, Interesting)

globalist (1332141) | more than 2 years ago | (#36407320)

This is easily reproduced in FF4 when you load a page with lots of images. The mem tends to grow proportionally to the size of the images on the page. But this is the only scenariou where the mem usage is different from other browsers and needs looking into.

They could also use a DiskShrink team (1)

FridayBob (619244) | more than 2 years ago | (#36407512)

As far as I'm concerned, Firefox could also use a DiskShrink team, although perhaps DiskPerformance would be more accurate. My site uses OpenAFS across several locations with 6Mbps to tie them together. The workstations run Debian squeeze with Xfce. It all works fine, but in the beginning we soon discovered that Firefox wasn't going to cut it. Although it was our preferred browser, even with its cache disabled it was too slow when the user volume, which contains the home directory, was not on the local file server. We ended up switching to Google Chrome, which is much faster in this respect.

Needs to be all of Mozilla (4, Insightful)

binarybum (468664) | more than 2 years ago | (#36407518)

I hope this isn't just targeted towards firefox. Thunderbird is an unwieldy beast of an email app as well. No good reason that checking my email should involve consuming 200Mb of memory.

Re:Needs to be all of Mozilla (0)

Anonymous Coward | more than 2 years ago | (#36407578)

Likely it will, they both use xulrunner which is probably the where the work will take place.

Re:Needs to be all of Mozilla (0)

Anonymous Coward | more than 2 years ago | (#36407668)

Thunderbird is only using 80mb on my machine currently and I have 5 Imap accounts, with my main account having a ton of email in it. Its probably caching email headers on the plethora of accounts for fast response. Either way, I never see thunderbird as a source of a memory problem on my computer.

Holding it (0)

Anonymous Coward | more than 2 years ago | (#36407678)

I wonder how a lot of people use their browser. I hear of people that have it open all day.

That's completely the opposite of how i use the browser. Every couple of hours i get to the point were i have so few tabs open that i can relauch without it interupting my workflow. This keeps memory leaks at bay

Thank you, Mozilla (1)

scdeimos (632778) | more than 2 years ago | (#36407710)

Can you get your MemShrink guys to look at Nautilus and gnome-panel when they're done? :)
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...