# firefox4 memory eating monstrus



## graudeejs (Apr 24, 2011)

Used firefox4 entire day (for a change) and opened top.






I've seen posts on forum mentioning Firefox being memory hungry, but I never noticed significant difference between Firefox and Opera.

~2GB ram, what the heck is firefox using it for?


----------



## MarcoB (Apr 24, 2011)

Mine is using 400-500 MB after a day and I thought this was a lot, but 2 GB is just ridiculous.
Do you use a lot of addons?


----------



## graudeejs (Apr 24, 2011)

I use 7 addons:

Adblock Plus
Element hiding helper for Adblock plus
Firebug
firecookie
Scripthis
Stylish
Download Statusbar


----------



## poh-poh (Apr 24, 2011)

killasmurf86 said:
			
		

> ~2GB ram, what the heck is firefox using it for?


It could be extensions or even plugins if built with --disable-ipc. Also check *about:memory*.


----------



## graudeejs (Apr 24, 2011)

ahh, Now I remember, I selected optimizations when installing port.... there was warning about firefox eating lots of memory with that option


----------



## Beastie (Apr 24, 2011)

But the CPU time looks huge too. I've been using Opera for as long as your screenshot's uptime and it's been running for less than 8 minutes.


----------



## Alt (Apr 24, 2011)

I think they are not handled yet all of FF memory leaks


----------



## drhowarddrfine (Apr 24, 2011)

Alt said:
			
		

> I think they are not handled yet all of FF memory leaks



An urban myth dating back to pre-version 2.5 days. Any memory leaks in FF that a user would notice were solved by then. Memory issues nowadays are related to add-ons by 3rd parties.

I typically run with around 5 tabs and never close the browser for days on end. Memory usage is always between 200-300Mb for FF4. 

Of all the friends/family/business users who rely on me for tech support, no one is any different than what I have. Now that's on Windows. I do not have FF4 on my FreeBSD boxes yet.


----------



## Alt (Apr 25, 2011)

drhowarddrfine said:
			
		

> An urban myth dating back to pre-version 2.5 days.


Release 3.0 patch notes: http://www.mozilla-europe.org/en/firefox/3.0/releasenotes/


> Memory usage: Several new technologies work together to reduce the amount of memory used by Firefox 3 over a web browsing session. Memory cycles are broken and collected by an automated cycle collector, a new memory allocator reduces fragmentation, *hundreds of leaks have been fixed*, and caching strategies have been tuned.


You think they caught all of leaks ?


----------



## poh-poh (Apr 25, 2011)

Alt said:
			
		

> Release 3.0 patch notes:
> 
> 
> 
> ...


Argument from ignorance? It could also be ordinary behavior given installed extensions.


----------



## Alt (Apr 25, 2011)

Mr ignorance, this is *from FF official patch notes* not from any module.

I'm not talking about extensions at all. If we count extensions - this is not hundreds of leaks -- it case "with modules" I don't know such big numbers (kidding).

If you want holy war about FF say please, I will leave then. But killasmurf86 started topic about 2GB memory consumption, not about your personal preferences/like/dislike (I use FF too under FreeBSD).


----------



## xibo (Apr 25, 2011)

Last time I used Firefox (3.0.something, about two years ago) it was taking a GB of memory after a day of usage even without any third party addons or plugins installed...


----------



## drhowarddrfine (Apr 25, 2011)

Alt said:
			
		

> Release 3.0 patch notes: http://www.mozilla-europe.org/en/firefox/3.0/releasenotes/
> You think they caught all of leaks ?



What I said was *leaks that the user would notice*. A lot of programs, including FF, have leaks that don't hang around long enough to cause the problems people think they do. Those who have issues of gigabytes of ram being taken up by FF are issues not caused by the browser.


----------



## Alt (Apr 25, 2011)

Sure killasmurf86 uses many addons (normally I use 2 of them), so it just eating memory faster than usual =) I think it's no other way to debug - just disable them one by one.


----------



## graudeejs (Apr 25, 2011)

Alt said:
			
		

> Sure killasmurf86 uses many addons (normally i use 2 of them), so it just eating mem faster than usually =) I think its no other way to debug - just disable them 1by1



I wouldn't call that many, especially for browser that is being advertised as most extendable (with extensions)


----------



## kpedersen (Apr 25, 2011)

I find that every time I click within the web component windows in firefox, my hard drive churns a bit. This isn't ideal for my poor little hard drive.

Also, I had my suspicions that Firefox was memory leaking but didn't want to say anything until others noticed a similar issue.


----------



## Beastie (Apr 25, 2011)

kpedersen said:
			
		

> I find that every time I click within the web component windows in firefox, my hard drive churns a bit. This isn't ideal for my poor little hard drive.


If the files it's trying to access are stored in the user profile, try moving the profile to a memory disk, if the memory size allows it of course. You can make a script that populates the appropriate directories every time before running the browser.


----------



## Pushrod (Apr 26, 2011)

I have a ton of extensions installed and running in FF 3.6, which currently has 24 tabs open, and it's using 540MB ram in Windows.

I normally open FF once on boot and never close it. This instance has been running for around 10 days.


----------



## drhowarddrfine (Apr 26, 2011)

kpedersen said:
			
		

> Also, I had my suspicions that Firefox was memory leaking but didn't want to say anything until others noticed a similar issue.



Again, not that you'd notice. It's been a while since I've looked at this issue so I dialed up Asa Dotzler to see if anything's different.

No. Nothing is different than what I said. Users won't notice memory leaks. All browsers have them (of course) but the only significant problem FF has is with GMail. I had heard of this some time ago. GMail does a lot of fancy stuff with javascript but I don't recall what the core of the problem Firefox has with it.


----------



## qsecofr (Apr 26, 2011)

I wonder if the bigger culprit is flash, at least for me.

```
killall npviewer.bin
```
 seems to reclaim most of the memory they'd been hoarding.


----------



## graudeejs (Apr 26, 2011)

qsecofr said:
			
		

> I wonder if the bigger culprit is flash, at least for me.
> 
> ```
> killall npviewer.bin
> ...



Not for me.
I don't use Flash at all (In fact, I don't even use Linux compat at all)


----------



## vivek (Apr 27, 2011)

Hardcore UNIX users go with Lynx  no addon and no javascript stuff! 

BTW, it is using 502MB here.


----------



## Carpetsmoker (Apr 29, 2011)

vivek said:
			
		

> Hardcore UNIX users go with Lynx  no addon and no javascript stuff!



netcat and a pipe to less!


----------



## graudeejs (Apr 29, 2011)

Carpetsmoker said:
			
		

> netcat and a pipe to less!



No, use tcpdump


----------



## Carpetsmoker (Apr 29, 2011)

drhowarddrfine said:
			
		

> An urban myth dating back to pre-version 2.5 days. Any memory leaks in FF that a user would notice were solved by then. Memory issues nowadays are related to add-ons by 3rd parties.



Firefox, _by design_ highly encourages usage of 3rd party add-ons/extensions.
Furthermore, firefox apparently allows these extensions to cause memory leaks.

Isn't it fair to say this is a problem with firefox itself?


----------



## drhowarddrfine (Apr 29, 2011)

Carpetsmoker said:
			
		

> Isn't it fair to say this is a problem with firefox itself?


Then all extensions would have leaks. Most don't. Properly coded add-ons won't have them. Of course, you could say FF should have protections in place against such things but others might say that's not its job.

They do have a page up of the worst offending add-ons.


----------



## bbzz (Apr 29, 2011)

Not trying to turn this into flame war (if it hadn't turn already), but Firefox _always_ had memory/performance issues on all of my FreeBSD machines. No exceptions. More than several tabs of web content and its fried. I had FF use up to 1.5 GB of memory regularly. Opera always had upper hand when it comes to performance, speed and usability. It punches (most) of the addons you'll ever need in 10MB. 
Anyway never understood why people like FF _just_ because its opensource and Opera is closed source. 
Open source doesn't equal quality software and vice versa. Linux is open, but it still sucks.


----------

