MozillaZine

The one and only "Memory usage" thread & FQA

User Help for Mozilla Firefox
Guest
Guest
 

Post Posted April 14th, 2006, 12:23 pm

Here's what's bothering me: I have Firefox 1.5.0.2 installed on two computers (with the exact same extensions and themes).

1. Dell P4 with 1 GB Win2k SP4 (and 1GB swap)
2. Acer AMD64 laptop with 1 GB XPSP2 (and 1 GB swap)

On system 1, Firefox memory usage at startup with no pages loaded is 20 MB with 0% CPU.

On system 2, Firefox starts at about 50 MBs, and for the next minute or so both CPU usage and memory usage climb (just sitting there with no pages loaded). After about half a minute, CPU usage goes down to 0% but memory usage is now at 100MB.

I don't notice any further problems, other than the fact that, on system 2, memory usage remains high and increases even further than on system 1.

Does this ring a bell?

Sinan

PS: Starting Firefox in safe mode on system 2 gets rid of this behavior.

VanillaMozilla
 
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Post Posted April 14th, 2006, 1:27 pm

Guest,
Go to Tools|Extensions and see what you find. Then go to Tools|Themes. I think you'll notice a difference.

nstenz
Guest
 

Post Posted April 14th, 2006, 3:36 pm

Hendikins wrote:Things That are Not Leaks

<a name="mem-not-down"></a>Firefox Memory Usage Doesn't Always Go Down
This is generally not an issue, and does not represent a memory leak. Why?
When Firefox is finished with memory, it releases it to its heap. However, operating system reports this memory as being in use, even though Firefox is not using it for anything.

A common symptom of this is the amount of memory used by Firefox going up, but not coming down - instead staying constant.

I strongly disagree with this.

I agree that Firefox should hang onto a bit of memory since it may need it in the near future, but if I open a thread on a message board that is tons of people posting pictures, Firefox is going to allocate several hundred megabytes in its cache for that single page. If I leave that page, I would expect it to stay in cache for the next <i>n</i> page loads. However, after that point, the memory should be released to the OS.

Are you saying that memory is not freed? If so, how can that not be a bug?

sdwilsh
 
Posts: 563
Joined: November 6th, 2005, 9:46 pm
Location: California

Post Posted April 14th, 2006, 4:28 pm

"A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result." -Wikipedia

If that is the intended behavior, then no, it is not a bug. As I recall, schapel has run tests that have shown that it gets to a certain point (system dependent) and then releases the memory back to the OS.
Problem Solver

nstenz
Guest
 

Post Posted April 14th, 2006, 5:03 pm

Yes, that's the generally accepted "strict" definition of a bug. However, you can also define a bug as any behavior deviating from what a user could reasonably consider to be "normal" operation. I know there's a much better definition than that, but I can't find it right now.

A web browser that may have had hundreds of tabs open at some point but now has 1 window with the URL set to about:blank and the cache cleared that is taking up 300 MB SHOULD be considered buggy, even if the program is working according to spec. In cases like this, I argue that the specification is wrong. The backlash from what is probably thousands of users encountering unreasonably high memory usage should support that fact.

Basically, if-
a) The program is doing something to piss off the user,
b) It's not unreasonable for the user to be pissed off about said behavior, and
c) The program can be changed to stop that behavior,
... it should be changed, or at least flagged as a bug- even if it's a bug that's too hard to fix and not worth the trouble. At least mark the stupid thing WONTFIX instead of INVALID (I'm assuming that's what happens with these issues).

We're all aware that 99% of Firefox users are not going to use Bugzilla to report high memory usage (or even know what Bugzilla is for that matter). The rest of us that do (hopefully) are not creating duplicate bug reports and making a mess of the system, nor are we posting useless "me too" comments in those bugs. That doesn't mean Firefox isn't sucking up 130 MB for me right now with 5 sites that are almost all text with very few pictures.

Obviously it's a problem, if not a strictly-defined bug.

Hendikins

User avatar
 
Posts: 26
Joined: December 31st, 1969, 5:00 pm
Location: On a train

Post Posted April 15th, 2006, 5:47 am

nstenz wrote:I strongly disagree with this.

-snip-

Are you saying that memory is not freed? If so, how can that not be a bug?


Re-read what I've said. I've said it isn't a memory leak. I haven't said it not a bug/isn't poorly implemented/is desirable behaviour...

VanillaMozilla
 
Posts: 13808
Joined: November 7th, 2005, 11:26 am

Post Posted April 16th, 2006, 6:07 am

You can stuff it with several hundred megabytes of large images if you want, and you can still view them all. If the memory requirement exceeds the available physical memory, the OS automatically swaps part of the memory to the hard drive, so you can still view the images. Large images inherently require a <i>lot</i> of memory--for example, one 8-megapixel image requires 24 MB in uncompressed form.

The memory is deallocated shortly after you close the pages with the images. The memory is retained for typical three pages, or a maximum of eight pages so you can browse backwards without having to reload the images. Also, typically maybe 15 MB (or less if you don't have much memory) is retained for future use. This too is swapped instantly to disk by the OS if another application needs the memory.

Both extensions and plugins (which are essentially beyond Mozilla's control) can leak. JavaScript on Web pages can allocate memory and cause leaks. The browser code itself has leaks, which are being gradually fixed. But I have tested fairly extensively, and as far as I can tell, there is absolutely no memory leak associated with images. Except for a fairly small cache, every single byte is released.

Nevertheless, there are plans to make the browser use less memory with images in future versions. This can be done either by using the disk as Opera does (with heavy use it sometimes disk swaps constantly) or by storing an image in compressed form (and uncompressing it every time you view the image). Under some conditions there could be a speed penalty with either method.

aigle
 
Posts: 50
Joined: March 19th, 2006, 12:05 am

Post Posted April 16th, 2006, 12:15 pm

Hendikins wrote:The combination of Flashgot & Adblock Filterset.G Updater is known to cause leaks [Bug 324586]


I am using both of them together with about 20 more extensions and my memory use with latest version is about max of 58 MB( in safe mode max 52 MB). Is it ok?
What about the above two extensions? Do I need to uninstall/ disable one of them?

Thansk

Guest
Guest
 

Post Posted April 16th, 2006, 4:38 pm

I use WinXP and FireFox is *guaranteed* to crash my computer. I've been using FireFox since whatever version was before 1.5. I recently upgraded to XP (I have a slow computer) and Firefox obviously doesn't work with XP. When I open up firefox, check my web-based email, and wait five minutes, firefox will be using upwards of 90MB of RAM. I have an old computer, and that's ridiculous. I usually end up having to hard-shut down my computer. The problem is *not* virtual memory, extensions or plugis or anything (I don't use any). I use tabbed browsing and multiple windows heavily, and when I close them all, the memory usage on firefox just continues to increase until the entire OS halts. My point is, that I am not doing anything special or using the browser in any way that should normally cause this to happen.

Tonnikala
Guest
 

Post Posted April 16th, 2006, 4:38 pm

As the pseudonym "James.T" says, I also feel that since version 1.5.x FF is using up alot of memory. I did not notice any of that with the older versions of Firefox, but now it is sometimes annoying when the browser is using 1GB+ of RAM/swap although tabs have been closed.
I may have a strange surf behaviour that when I read articles, I regularly open them in new tabs.. also when I browse image galleries like www.webshots.com, I choose/open images in new tabs.. but that's my way and this is how I want to utilize tabs, and it has worked great before.
I use linux as os with various kernel compiles since FF 1.5.x released and I have 1GB of RAM and a dedicated 512MB large/small partition to swap, and since I use this as a hybrid of server/workstation this affects me in that way that the computer is totally locked up until I manage to kill the pid. ):
But besides that I'm in love with Firefox! (:

schapel
 
Posts: 3483
Joined: November 4th, 2002, 10:47 pm
Location: Ann Arbor, Michigan

Post Posted April 16th, 2006, 4:39 pm

dsotm wrote:I frequently need to browse a photo resource site. When ff reaches 200mb (around 12-15 tabs open) memory it slows to a crawl, right clicking a tab can take 10 secs to open the context menu, and the problem is only solved either by closing all the other tabs, or restarting ff - is there any fix for this

Windows xp SP2
Dual Pentium
2Gb Ram
5Gb pagefile

If you have 2 GB of RAM, Firefox using 200 MB of RAM isn't going to slow your system down all by itself. You seem to be having some sort of problem, but it doesn't seem to be related to memory leaks in any way. 200 MB of memory use for Firefox is in the normal range and is no problem at all on my computer which has only 1 GB of RAM.

schapel
 
Posts: 3483
Joined: November 4th, 2002, 10:47 pm
Location: Ann Arbor, Michigan

Post Posted April 16th, 2006, 4:42 pm

aigle wrote:I am using both of them together with about 20 more extensions and my memory use with latest version is about max of 58 MB( in safe mode max 52 MB). Is it ok?
What about the above two extensions? Do I need to uninstall/ disable one of them?

I experience memory usage above 200 MB regularly. When I navigate away from memory-hungry pages, the memory usage drops back down to 100 MB. 60 MB of memory use is nothing to worry about.

Guest
Guest
 

Post Posted April 16th, 2006, 5:40 pm

Hi

I just got a grwoing [pages file message and then looked at system process use... in win xp patched to all securutiy pataches available and firefox 1.5.0.2

I have 48 instances of firefox at memory footprint ranging from 3 MB to 30 MB... this will go away after a reboot... whats happening here and how do i prevent this

schapel
 
Posts: 3483
Joined: November 4th, 2002, 10:47 pm
Location: Ann Arbor, Michigan

Post Posted April 17th, 2006, 7:03 am

Those 48 instances of Firefox are processes that for some reason haven't completely closed down. This problem is unrelated to memory leaks. You can try the <a href="http://kb.mozillazine.org/Standard_diagnostic_(Firefox)">standard diagnostic</a> to see if that helps.

Guest
Guest
 

Post Posted April 17th, 2006, 10:19 am

comrade693 wrote:"A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result." -Wikipedia

If that is the intended behavior, then no, it is not a bug. As I recall, schapel has run tests that have shown that it gets to a certain point (system dependent) and then releases the memory back to the OS.


There is a fault in your logic. That definition is a sting of OR cases, so consider this phrasing:

"A software bug is a failure in a computer program that produces an incorrect result."

Now, some may argue that hording memory to the detriment of the mouse cursor moving across the screen is not, in fact, an incorrect result. However, I am not one of those people.

Not releasing memory that is not being used is an incorrect result and often leads to one or more of the os, the program, or the user crashing. :)

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 10 guests