Monday, October 7, 2013

Firefox and the ultimate memory leak


You may remember our discussion of RAM (Random Access Memory) in class. We discussed how any programming that is running, whether you are using it or not, takes up space in RAM. And the more programs you open, the more space gets taken up. Eventually, as RAM fills to capacity and the machine has to start using hard drive space to store program data your PC will start so stutter and slow, possibly even crash. Of course, if you close some programs - [Control]-[Shift]-[Escape] all held down at once will show all running processes - you will free up the space in memory that they were using and your machine will spring back to life.

However, we also talked about what are known as memory leaks. A misnomer to be certain, because they refer to a program *not* releasing memory once it's shot down, sometimes even continuing to fill it! I also mentioned that the Firefox browser has one of the worst memory leaks I've ever experienced. Well, just to prove the point, Firefox crashed on me over the weekend and when I checked the process list arranged by memory used, look who was right at the top:


Look at that huge number! To make matters worse, not only is it double the memory usage of Internet Explorer, you'll notice the column header shows the word 'Private' in parentheses after 'Memory.' That means 'Private Working Memory' and that is memory that is not useable, not shareable, by other process. Firefox has hogged it all to itself!

I'd be interested to know who among you actively read and post, so here's the task for all of you. Bring up the process list for your OS (Instructions on how to do that are at the end of this post) and indcate the program that is using the most memory and how much it is using, and the program that is using the *second* highest amount of memory, and how much it is using. Put your results in the comments, an we'll see if there are any memory hogs among your programs!

How to determine memory usage of programs:

WINDOWS:
Hold down the Control, Shift, and Escape key all at once to bring up process explorer. Clicking on the 'Memory' column heading will arrange programs by memory usage.

MAC (From Apple's own site):
For Mac OS X 10.3, 10.4 or later, open Activity Monitor (/Applications/Utilities/).

For Mac OS X 10.2.8 or earlier, open ProcessViewer (/Applications/Utilities/). Mac OS X processes and applications are listed in main window.

In Mac OS X 10.3.9 and earlier, the "% Memory" column indicates the percentage of RAM in use by an application or process at the time of sampling.

In Mac OS X 10.4 or later, you can see the overall percentages of memory in use or idle at the bottom of the Activity Monitor window.

6 comments:

  1. Firefox also takes the cake for my memory usage on my computer. After about 2 1/2 hours of the browser being open it's used ~375,000K. However, after watching the number I did notice it fluctuate somewhere between 325,000K and 410,000K. This is with just two windows open, Pandora and Blogspot. Second place goes to Skype, which, in all honesty I rarely use but it's currently set to auto sign-in when I boot up my laptop. The number has not moved from 122,804K. A not-so-close third goes to Adobe Flash Player, which I assume is predominantly running with my Pandora window. It's using ~45,000K and constantly fluctuating also.

    ReplyDelete
  2. I think the next runner up for memory leakage is any apple product. Even when I have the only apple program closed (iTunes), it still decides that it needs about 3 different processes open. I can go through the task manager and force close them, and shortly thereafter they will be there again, just sucking RAM like a leech. Also, if I delete any startup processes for apple programs, as soon as iTunes is booted again, they go right back in my startup folder. It is quite annoying.

    ReplyDelete
  3. I have ditched firefox and now I am using Chrome on my laptop and on my mobile. I have noticed a longer battery life on my laptop. Thank you for bringing up the topic in class because I did not think about the browser being part of the problem.

    ReplyDelete
  4. Interesting blog, it saddens me that Firefox is a memory hog for my CPU because I use Firefox on a daily. I have a Mac and have the Firefox application and the Safari one but I always chose to use the Firefox one. I located my activity monitor and it says that Firefox is using 327.84 MB in Real memory and 1.34 GB in my virtual memory. My next one is Dropbox which is a dramatic difference from the Firefox numbers. It says that Dropbox is using 44.07MB Real memory and 992.01 MB in virtual memory. After learning about Firefox and all the space and memory leaks it has, I do think I should consider using Safari more than Firefox now.

    ReplyDelete
  5. I have never used Firefox. When I pull up the task manager and look up the processes and their memory usage, the top four slots are to Google Chrome with private working set memory. 104,556K, 98,996K, 65,516K, and 63,096K are the top four memory usage numbers. Not a very large "hogging" of memory. I am also running Microsoft Word and nine open websites on Google Chrome, plus whatever is running in the background. Very interesting analysis of memory usage. I rarely have a slow computer, if so I just restart it.

    ReplyDelete
  6. For me the largest memory user on my computer is Internet Explorer using 342 MB of memory. The second highest user is something called Service Host: local system (Net... it uses about 67.2 MB. So those are the two biggest memory hogs on my computer at this moment.

    ReplyDelete