Old Memory Trick for Firefox

Discussion in 'other software & services' started by dw426, Sep 2, 2009.

Thread Status:
Not open for further replies.
  1. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    Okay, so I've been freeing up RAM where I can lately (I have a mere 1Gb to work with and can't spend more on RAM right at this time). I cut down on background processes running that I made sure were safe to kill (including that stupid Windows Update process always hanging around when there isn't an update in sight), and I came upon an old trick used when Firefox was having memory leaks. What this trick does is not only lower memory usage when the browser is maximized, but, when minimized, it uses the hard disk instead of RAM.

    1. Type about:config in the address bar and hit Enter.

    2. Right-click anywhere on the page and select New-Boolean.

    3. When the dialog box pops up, type in "config.trim_on_minimize", and then select "True".

    4. Restart Firefox.

    I have noticed my Firefox with 5 tabs open, two of which are running intensive Flash, going from using 230+ RAM to 162 or so RAM. When minimized, these same 5 tabs drop into the low 120s. This trick is from 2006, but it sure seems to work.
     
  2. Baldrick

    Baldrick Registered Member

    Joined:
    May 11, 2002
    Posts:
    2,301
    Location:
    South Wales, UK
    Thanks...am going to give it a try. :D

    Edit:

    Wow...near instantaneous reduction of 80% in memory usage when minimising. I was not getting this before this tweak.
     
  3. ThunderZ

    ThunderZ Registered Member

    Joined:
    May 1, 2006
    Posts:
    2,459
    Location:
    North central Ohio, U.S.A.
    Have done this on just about every build (1.5 I think) since I became aware of the tweak.

    Have found while the drop in memory usage is real, it does not seem to appear permanent. Leave Task manager up after performing the minimize. At least on mine the memory usage does creep back up.
     
  4. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    You're absolutely right, it does come back :( That's crappy. I personally think FF still has memory issues, but I can't prove it.
     
  5. ThunderZ

    ThunderZ Registered Member

    Joined:
    May 1, 2006
    Posts:
    2,459
    Location:
    North central Ohio, U.S.A.
    I have noticed with the newer vers. of FF that the memory usage does seem to cap at a certain amount.

    While it seem`d the older vers continued to eat memory for as long as you had it open.
     
  6. ratchet

    ratchet Registered Member

    Joined:
    Feb 20, 2006
    Posts:
    1,912
    Just install CleanMem. It uses Windows method so there is no magic to it. It frees all hijacked RAM not just Ff. You can use Windows scheduler to run it as often as you want or tweak the reg entry. Great app and support and it's all free!

    http://www.pcwintech.com/node/145
     
  7. ThunderZ

    ThunderZ Registered Member

    Joined:
    May 1, 2006
    Posts:
    2,459
    Location:
    North central Ohio, U.S.A.
    Appreciate the info. But do`t believe in loading a process to manage process`s. Or memory managers in general for that matter.

    Besides, with 4 Gig on my main tower, and start-ups tweaked to a bare minimum I`m not worried about FF.
     
  8. ratchet

    ratchet Registered Member

    Joined:
    Feb 20, 2006
    Posts:
    1,912
    In your position I agree. I have 1G on XP Home and 2G on Vista Home Premium so CM helps. Shane's prog frees the RAM the exact way as when Windows shuts down.
     
  9. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    Holy heck, Rachet! :) Look, I don't know how it'll fare as time goes on, but the few processes I have running let go of a TON of memory when I ran that thing and memory usage has just BARELY crept back up on a couple of them. For instance, the two processes for MSE before running it took almost 80Mb. Afterward, 21Mb TOTAL. One of the processes for it went from 9Mb to 240K, lol. I am VERY impressed with this thing.
     
  10. ThunderZ

    ThunderZ Registered Member

    Joined:
    May 1, 2006
    Posts:
    2,459
    Location:
    North central Ohio, U.S.A.

    :eek: Now you do have me curious.

    May have to give it a try on one of my more resource challenged machines.
     
  11. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    Hehe, MSE is still hovering around 20Mb tops, the rest have grown VERY slightly, we're talking a Mb or less since I last posted.
     
  12. ratchet

    ratchet Registered Member

    Joined:
    Feb 20, 2006
    Posts:
    1,912
    Great! I've had since the day Shane "invented" it so I don't remember what the default setting (probably has it on his web site) is but I have it scheduled every 30 minutes. I also changed a default reg setting to run it 240 seconds after boot but you can change it to whatever you prefer. Just go to the forum and Shane will help you!
     
  13. Capp

    Capp Registered Member

    Joined:
    Oct 16, 2004
    Posts:
    2,125
    Location:
    United States
    I may have to look into this as well.

    At work, I run FF v3 all day. I open it when I get there, open my email, music site, and those stay open all day. Then I go through a few dozen tabs during the day that are opened and closed as needed, but it stays open at all times.
    I can definitely tell a slow down as the day goes on when FF hits near 100Mb memory usage or more. Of course it depends on what I have been browsing and whether the sessions remain open, but still.

    I remember doing the config trick awhile back and forgot all about it. Might try it again, since the majority of the time it stays minimized at work anyway. But will definitely check out the tool mentioned to see if I can free up some memory anyway.

    Thanks for the heads up :thumb:
     
  14. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    Heck, Firefox hits in the 90Mb range with just this forum open in a single tab for me. MemCleaner doesn't seem to affect Firefox much, I might get a 10Mb release and then only for a few minutes. But for everything else, including my anti-virus, this program works wonders.
     
  15. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,698
    I've never noticed a memory leak in FF, since 1.5. Of course, it depends what you run in real time. Many anti-virus programs inflate the memory usage significantly, up to x2-3 more than it should be, because of the hooking and whatnot.

    Example: on work machine, anti-virus + its hips, FF opens with 150Mb! After I disabled the HIPS component only, FF opens with 50Mb! It's ridiculous. I've even written an article on this and will soon post it, which shows how people voluntarily cripple their (Windows) machines and then complain about things being slow.

    On a system without any security programs in real time, FF usage stays flat or drops after tabs are closed, tasks finished. No memory leaks. Everything works smoothly, fast. FF opens in less than 1 sec. Tabs open instantly. I can have 50 tabs open without any issues, small memory footprint etc.

    Just for fun and testing, disable the real-time monitors and watch the memory usage go down and memory leaks vanish.

    Mrk
     
  16. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    This sounds like the memcleaner is going to be in fashion again :D

    I remember when win95 was the latest, with a whopping 32mb ram. I used to use I think it was TurboMem or something that would free up memory when it reached like 28mb usage or something, and take it down to like 12 or so. I always thought it actually worked, until I started doing many different tests to see what the difference was. I never found freeing that memory actually did anything. At that time the OS would free what it needed, or as much as TurboMem could. I remember reading up a lot on it at the time, and many so called 'experts' said it really did nothing for you other than make you think things were better.

    I have no idea if that is the case today, but I would have to assume that until you approach 80-90 physical memory in use you should not have a problem. While I don't know as much about memory today as I did yesteryear, I have a strong suspicion that the OS itself is plenty capable of handling the memory in the same way a memory cleaner would, although it might take getting near the limit of memory before it does.

    But then again, windows 95 was a long time ago lol.

    Sul.
     
  17. dw426

    dw426 Registered Member

    Joined:
    Jan 3, 2007
    Posts:
    5,543
    All I can say is that it works on my machine *shrug*. I've been watching programs/processes that previously sat there taking up 10Mb or more RAM only using up 520K and stay at that amount. Now obviously browsers and the AV don't stay low for long, but MemClean DOES free up RAM from them when it runs. MrkVonic, sadly I see 150+Mb Firefox usage just with two tabs open, God only knows what would happen if I opened 50.

    I'll be perfectly straight, I don't have the first clue as to the inner workings of the program or if, in the end, it makes a huge deal. The only thing I can say about it is that when you're dealing with only 1Gb of RAM, it doesn't take much or long for it to be used up. So, freeing up a bit every so often is a pretty nice thing to be able to do. Even if it's only 20Mb released, it's 20Mb I didn't have before :)
     
  18. Capp

    Capp Registered Member

    Joined:
    Oct 16, 2004
    Posts:
    2,125
    Location:
    United States
    Sorry, was tired and fat-fingered my typing. I meant 400Mb of memory. I was using the number pad and aimed a little high. Yeah, mine is sitting at around 85Mb used with just Wilders opened.


    And I just checked, apparently the "config.trim_on_minimize" trick is still active on my work machine. I knew I had done it a couple years back. Guess it carried over between updates and whatnot.
    So, that minimize trick apparently doesn't do much any more.
    Will try the Cleanmem.
     
  19. majoMo

    majoMo Registered Member

    Joined:
    Aug 31, 2007
    Posts:
    938
    1. Like CleanMem uses "EmptyWorkingSet" instead "SetProcessWorkingSetSize" API, it doesn't hurt the system like others mem tools, that free up to page file (forcing the memory into the page file).

    In fact it does an excellent work. It does the same that "empty.exe" (Microsoft file). It doesn't free mem like "Clearmem.exe" (Microsoft file) - luckily.

    2. CleanMem has a good feature also: it clears the file cache of the system (like CacheSet, Sysinternals tool).
     
  20. ratchet

    ratchet Registered Member

    Joined:
    Feb 20, 2006
    Posts:
    1,912
    So if you want to increase or decrease the time before CM runs after boot just change it here:
    SOFTWARE\Microsoft\Windows\CurrentVersion\Run Clean System Memory xxx C:\...
    xxx being the time in seconds.
     
  21. 1boss1

    1boss1 Registered Member

    Joined:
    Jun 26, 2009
    Posts:
    401
    Location:
    Australia
    Also another good thing to keep Firefox trimmed down is in about:config

    Firefox stores the last 40,000 sites you visit in it's history, this is pretty massive considering most people don't visit that many plus probably 90% of those are "one off" visits and you will never go back to them. Loading a 40,000 site file on startup, plus searching it every site you visit has an impact.

    So drop that value down to anything from 500 to a few thousand depending on your habits. Also:

    That's the min/max amount of days Firefox will store sites you visit, yes 6 months. Drop them down to 7-30 days which is a good number for most people, but again depends on your habits.

    This will help tame Firefoxes wild 30-60MB sqlite databases.
     
  22. Capp

    Capp Registered Member

    Joined:
    Oct 16, 2004
    Posts:
    2,125
    Location:
    United States
    Update. I installed the latest version of CleanMem and left all the defaults.

    While it was running, I watched in task manager as it freed up tons of memory each time it ran. Every application would gradually climb back up to where they were prior to it running, but it did what it said it would do.

    The problem was, every single thing on my system slowed down. My work applications, which are all network based, slowed to a crawl, firefox became sluggish and would freeze while loading blank tabs, my outlook would just hang when sending/receiving, etc..

    The reason I believe cleanmem was the cause is, nothing else has been changed on my system in a long time and as soon as I removed it from doing the automatic cleanup, everything returned to normal.

    So, I don't have it doing auto cleans, but I do have it to run manually to idle things back a bit.
     
  23. ratchet

    ratchet Registered Member

    Joined:
    Feb 20, 2006
    Posts:
    1,912
    Hmm, interesting. Have never noticed anything adverse. You should post your observation on their forum and Shane would look into it.
     
Loading...
Thread Status:
Not open for further replies.