Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've used tools to effectively reduce the amount of RAM available to all applications, but is there something to do the same on a per application basis?

Specifically, I'm looking to limit the memory usage of Firefox 3.5 on an older machine with just 128MB RAM. Currently, Windows 2000 and ancilliaries (including a basic firewall) consume about 80-85MB. Open a few tabs in Firefox and physical RAM is soon used up causing inevitable slowdown.

Whilst I welcome ideas relating to Firefox, I'd really appreciate a more general approach that I could apply to any application.

Thanks.

share|improve this question
    
Is slowdown not better than outofmemory error? –  Jeremy French Aug 7 '09 at 15:30
3  
@Jeremy : neither is better, a program shouldn't take all resources, preventing others from running correctly. –  Gnoupi Aug 7 '09 at 15:34
1  
Is switching to linux an option? There are many ways to accomplish this if you can switch. –  DaveParillo Oct 2 '09 at 3:34
add comment

11 Answers 11

up vote 3 down vote accepted
+50

I know this isn't a general approach to limiting the amount of RAM available to the applications, but here is a nice guide to limiting the amount of RAM available to firefox.

I'm not sure if there is a general approach to limiting memory usage for single applications (except for maybe java applications).

share|improve this answer
    
I'll give this a go - cheers. –  Umber Ferrule Aug 7 '09 at 15:55
    
link is dead and replaced with some stupid advert :( –  gbjbaanb Jul 20 at 12:30
add comment

Here's a cure that might be worse than the disease - run the application in a virtual machine. The virtual machine will have a hard limit on the RAM it can utilize.

There's obviously some overhead in creating the virtual machine, but for Firefox you could probably run it in a very small Linux distribution.

share|improve this answer
    
Interesting idea, although I'm not sure I can spare the memory overhead of virtualisation. –  Umber Ferrule Aug 7 '09 at 16:11
    
on a 128M machine with Win2k, I think that might not work so well :) –  warren Oct 1 '09 at 12:13
add comment
  • Optimize Firefox’s memory usage by tweaking session preferences.
    also read the comments on that page.

  • Optimizing Firefox

  • Use the Session Manager to remember your browser state,
    restart the browser whenever you see its consuming a lot of memory
    (use the process explorer referred below to keep a tab on memory utilization)

  • Install Google Chrome, if just to run its about:memory tab
    check how firefox compares with some other browsers (Opera, IE, etc)

On a slightly separate note, check your firefox plugin list too,
On the matter of Firefox and memory leaks... and links there in.


On the matter of generic memory usage on the Windows system.

  • I have usually seen arbitrary startup applications taking up a lot of memory.
    • You could keep a copy of the excellent ProcessExplorer;
      maybe even replace the task manager with it!
  • Whenever possible restart an application or reboot if you find some system service has taken up too much memory...
    • I find the Symantec AV on my machine keeps taking up memory.
share|improve this answer
    
+1 for ProcessExplorer. However, I've already used it to cull unwanted processes/services. What remains are needed and these are the ones I need to constrain. –  Umber Ferrule Aug 13 '09 at 20:24
add comment

I've discovered Minimem which purports to do what I need.

EDIT: Minimem does reduce an app's RAM footprint every how often you set it (when not in the foreground). However, give the app focus and RAM usage shoots back up unconstrained until the next time. What I'm looking for is something to set a hard limit on app RAM usage rather than trim it every so often.

share|improve this answer
    
Minimem is likely a swap forcer. It forces the memory usage into swap. –  Jack M. Oct 1 '09 at 15:25
add comment

I know, its not firefox, but k-meleon might be a good fit for the machine -it uses gecko, runs well, and supports some extentions, notably adblock. Not quite firefox, but it works well on nearly identical specs.

share|improve this answer
add comment

The AFOM addon is very effective at reducing memory usage, especially after long sessions. Not quite your full answer, but I hope you find it useful.

share|improve this answer
add comment

To be honest, the amount of memory used by Firefox, Safari, Word, or really any other application, should not be limited. If Firefox loads a page which has a 80mb of images on it, should it crash because it cannot allocate memory, or keep running while sucking up memory.

To me, you're asking an application to limit its performance in favor of other applications. In today's market, buy more RAM. Why limit the amount of memory that an app can use at the detriment of performance and reliability when you can purchase RAM for pennies?

If you absolutely must limit memory usage, use a smaller application. If you want to browse the web and use practically 0 memory? Use lynx. If you don't like iTunes' memory usage, use mpg123 so that album covers and the like aren't loaded, it just plays music.

Don't ask an existing application designed for a large memory footprint to run in a cage. It's just silly.

share|improve this answer
    
Usually I'd quite agree with getting more RAM, but the laptop in question was so old that it already had the maximum amount of memory installed, hence the request for a software (part-)solution. –  Umber Ferrule Oct 4 '09 at 10:37
    
Even with that, I'd still look to alternative software. Possibly even an alternative OS to give you more space in RAM. –  Jack M. Oct 5 '09 at 15:24
add comment

From This May Help Your Firefox Memory Leak:

This little fix will move Firefox to your hard drive when you minimize it, and as a result it will take up less than 10MB of memory while minimized. So far, from my experiences with using this today, when you maximize Firefox it will obviously increase the memory usage.
However, it does not seem to go back up to the insane amount that it was at before minimizing it.
For example, Firefox was at 180MB of memory usage and then I minimized it and after a few seconds I maximized it. After maximizing it and continuing on my routine business it appeared to only have gone up to 60MB. This seems to be a good solution for me right now since I frequently maximize and minimize Firefox anyways.

  1. Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
  2. Right Click in the page and select New -> Boolean.
  3. In the box that pops up enter config.trim_on_minimize. Press Enter.
  4. Now select True and then press Enter.
  5. Restart Firefox.

From the comments at the end of the article, this setting also seems to trim the memory of FF when minimizing (by garbage collection or another method).

share|improve this answer
add comment

You may want to give the following apps a try: Process Tamer http://www.donationcoder.com/Software/Mouser/proctamer/

share|improve this answer
add comment

Also Process Lasso http://www.bitsum.com/prolasso.php Just try and see which one of the two I mentioned works best for you

share|improve this answer
add comment

You can use Microsoft's Application Verifier. It doesn't give a lot of options for memory management, but allows to run apps in 'resource constrained' environment. It's primary usage is for profiling/debugging, but it can be used just to constrain bad behaving apps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.