Slashdot Mirror


Memory Usage of Chrome, Firefox 3.5, et al.

An anonymous reader writes "This experiment graphs the memory usage of Chrome and Firefox 3.5 (along with Safari and Opera) over a series of 150 Web page loads using an automated script. Firefox 3.5 shows the lowest memory usage in all categories, including average memory usage, maximum memory usage, and final memory usage. Chrome uses over 1 GB of memory due to its process architecture. Safari 4 and Opera show memory usage degradation over time, while Chrome and Firefox 3.5 are more reliable in freeing memory to the OS." IE 8 was not included "because the author could not find a way to prevent it from opening a new window on each invocation of the command."

15 of 505 comments (clear)

  1. IE8, huh? by palegray.net · · Score: 5, Funny

    I couldn't find a way to keep it from sucking so forcefully all the air was evacuated from my office every time it was run.

  2. Re:It doesn't matter by Ethanol-fueled · · Score: 5, Insightful

    Something like "it doesn't show weird ass icons and bars when Slashdot decides to change CSS" is probably much more important.

    I'm no web developer, but I don't quite believe that those artifacts are Firefox's fault. Why the staff would make broken changes on a live site is anybody's guess. Those artifacts are relatively minor annoyances but they won't serve the people who are considering switching to Linux and getting into open source only to discover that the primary forum for Linux nerds is every bit as broken as the Linux their Microsoft-loving buddies describe.

  3. Chrome stats probably erroneous by l00sr · · Score: 5, Informative

    Summing the memory usage of all the Chrome processes is probably not the correct thing to do, as the memory usage indicated most likely includes shared libraries. I can't say this for sure about Vista, but on all sane operating systems, each shared library is loaded only once into memory, and then shared among different running programs.

    1. Re:Chrome stats probably erroneous by Sowbug · · Score: 5, Informative

      The Chromium Blog says:

      If you're measuring memory in a multi-process application like Google Chrome, don't forget to take into account shared memory. If you add the size of each process via the Windows XP task manager, you'll be double counting the shared memory for each process. If there are a large number of processes, double-counting can account for 30-40% extra memory size.

      To make it easy to summarize multi-process memory usage, Google Chrome provides the "about:memory" page which includes a detailed breakdown of Google Chrome's memory usage and also provides basic comparisons to other browsers that are running.

  4. Re:Finally... by Anonymous Coward · · Score: 5, Funny

    Firefox...as root...REALLY?!

    You should be ashamed.

  5. Moving targets by mcrbids · · Score: 5, Insightful

    There's no answer that's always right. If memory usage was paramount, we'd all have browsers that used 1 MB of RAM and took 10 minutes to render a page, with another 2 minutes to scroll down a page.

    But RAM is cheap and developers have to make compromises based on the real-world that they have to compete in. I can get a gig of RAM for about the cost of a burger lunch with my wife.

    Do I really care about memory usage? Only to the extent that it's 'good enough' on my slowest computer - a dual-core Mac Mini with 512MB.

    FF3 is plenty good enough for me to thoroughly enjoy an episode of 'Burn Notice' on Hulu just now on that very computer.

    Sorry you are having probs with memory usage on your (ancient?) computer. Perhaps you should consider forgoing a burger lunch this week?

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Moving targets by fuzzix · · Score: 5, Funny

      FF3 is plenty good enough for me to thoroughly enjoy an episode of 'Burn Notice' on Hulu just now on that very computer.

      Wow! FF3 must be a fantastic piece of software if it can make Burn Notice watchable.

  6. Why not testing IE 8? by VincenzoRomano · · Score: 5, Insightful

    The author says he didn't included IE 8 because there was no way to start it without opening a new window for every invocation!
    I would have preferred to have it included despite this "big drawback" and have this thing explained in a note.
    A partially meaningful test (upper limit?) is always better than no test at all!
    I fear that this omission is to "protect" bad performances even in comparison of a browser by a company which seems to be in deep competition with Microsoft.

    --
    Maybe Computers will never be as intelligent as Humans.
    For sure they won't ever become so stupid. [VR-1988]
  7. Re:What is process architecture? by BadAnalogyGuy · · Score: 5, Informative

    If you are trying to explain the mechanism to a layman, you need to steer clear of terms like "processes" and "threads" as part of the explanation.

    Imagine the memory in your computer is like a housing development. At first, there is a lot of open space. The open space can be partitioned so that houses can be built. Each of those houses represents a process. As long as you have more space, you can build more houses.

    Inside each house, you have rooms. In computer terms, these would be threads. Each room has a specific job - kitchen, bedroom, bathroom. Sometimes you need more rooms, so you have to build them. This may mean that the size of the house needs to grow, and the amount of acreage the house needs must grow with it.

    As long as a house exists, it will continue to occupy the space it is on. In computer terms, the process will hold on to the memory it has already claimed. However, the corollary to this is that when the house is torn down, all the land it occupied is returned to the "free acreage".

    If a room is remodeled, it will not result in a change to the actual house size. Adding more rooms will always take up more land, but removing those rooms doesn't change the occupied land size at all.

    In the same way, a process can grow and grow, but as soon as it completes (you close a tab in the browser), the memory will go back to the operating system so other processes can use it. But if the process does not complete because it uses threads to build those same tabs, then the process will continue to take up that memory.

    Also consider that a house may burn down. If a problem happens in one room, a house-wide emergency may erupt. A fire in the kitchen may engulf the entire house and bring it down.

    In a perfect world, what happens in one house should not affect other surrounding houses. If one house burns down, the other houses around it should be fine. Same with processes. If a thread in one process crashes, it may bring down the whole process. However, since processes are separated from each other, other processes should not be affected.

    Then why use threads at all? Why not use processes all the time, since they are clearly safer. Well, why don't we only have one room in our house? Threads are needed within processes to perform important roles. Also, since they all exist in the same process, they can share information (like using light switches downstairs to control lights in the foyer). So a careful combination of threads and processes are necessary to create any kind of meaningful application. There is no right or wrong answer, but Google seems to think that isolating each browsing experience from another is the right way. Firefox thinks that putting all the rooms in one house and simply growing the house is the right way. Everyone is different.

  8. Invalid bechmark by Anonymous Coward · · Score: 5, Informative

    I am sure that this is true for all of the browsers, but in Opera's case...

    The machine has 4GB in question and Opera is set to "automatic" for the memory cache (default). According to this article, this instructs Opera to use up to ~10% of the system memory. This is quite tunable based on the environment, so one could easily optimize for a low-end machine and have satasfactory performance. The browser using the memory effectively is the more interesting test, which this benchmark fails to determine. An interesting detail in the graphs is how sharp the memory reclaim cycles are, where the smoother indicates better memory management. The graphs indicate that Opera does a good job in this regard.

  9. Re:It doesn't matter by kripkenstein · · Score: 5, Insightful

    Unless you are talking about a system with severely limited memory, memory usage is probably not the right criteria for deciding which browser to use.

    Chrome used over 1 GB in this test. Safari and Opera passed the 500 MB mark. That is an issue for far more machines than 'systems with severely limited memory'.

  10. Re:Finally... by syousef · · Score: 5, Informative

    Finally, this should stop perennial "firefox is a memory hog" trolls. Hopefully.

    They weren't trolls. I've seen the memory leaks first hand. Plenty of people have posted OS memory usage screenshots. It may have been particular extensions or advanced settings that caused the problems but it was not some work of fiction.

    You're the one trolling.

    --
    These posts express my own personal views, not those of my employer
  11. Re:Finally... by Seumas · · Score: 5, Insightful

    Too bad it won't stop all the "what memory problem?" trolls.

    Remember how 3.0 was touted to solve all the memory problems? I still get 1.5gb of usage *regularly* on multiple platforms with 3.0.11 without any installed extensions after a few hours. In fact, I'm on Firefox 3.0.11 on OSX 10.5.7 right now and it's at 1.3gb. You can tell when it's being a memory hog again, because videos won't play without stopping and stuttering and pages take longer to load and switching tabs feels glacial.

    So, considering 3.0 originally was supposed to solve everything, I think I'll not hold my breath on 3.5. Especially for a problem that continues to happen across platforms.

  12. Re:It doesn't matter by RichiH · · Score: 5, Informative

    Be glad you are not using Konqueror 3.5.10 or 4.2.4; /. makes a point of breaking rendering on those browsers every few weeks.

    Random buttons and scroll-bars? Check.
    Black text on black background? Check.
    Utterly broken navigation so you can watch the front page and nothing else? Check.
    CSS, Javascript and other crap in _plain text mode_? Check.

    The only reason I keep coming back here for is the friendly discussion style ;)

  13. Re:Finally... by smoker2 · · Score: 5, Interesting

    Exactly. I think I've su'd once in the last month, and that was yesterday to mount a ram disk to use as the Firefox disk cache. That was a nice tip BTW, significant speedup in page loads and UI responsiveness.

    mount -t tmpfs -o 'size=100M' tmpfs /path/to/chosen/mountpoint

    Create an about:config preference called browser.cache.disk.parent_directory with a string value of /path/to/chosen/mountpoint .

    You do need to restart the browser for it to take effect. I also chowned the ram disk to my user name so that FF can write to it. 100MB is probably a bit too big, but when I set it as 50MB it filled up. I'll tweak it later when I see what is usual for the cache. It's currently running at 47.47MB with 2 tabs, and I'm not anal about avoiding closing the browser if I'm not using it.