FireFox Cache in RAM?

Discussion of features in Mozilla Firefox
Post Reply
IsLNdbOi
Posts: 3
Joined: February 25th, 2011, 2:27 pm

FireFox Cache in RAM?

Post by IsLNdbOi »

I followed these instructions to put FireFox's cache in RAM:

If you use Firefox, there's a way to write cached files to RAM instead of the hard disk. This is not only faster, but will significantly reduce writes to the SSD while using the browser.
Instructions:

Open Firefox

Type about:config into the address bar -> Enter

double-click browser.cache.disk.enable

to set the value to False

Right-Click anywhere -> New -> Integer -> Preference Name "disk.cache.memory.capacity"

value memory size in KB. Enter 32768 for 32MB, 65536 for 64MB, 131072 for 128MB

restart Firefox



Is 128MB the most we can do or can I enter 524288 for 512MB? Will it work properly if I do this? I tend to have multiple windows open with multiple tabs as well and I've seen FireFox's memory usage go pretty high.
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Re: FireFox Cache in RAM?

Post by malliz »

Where did you get those instructions?
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
IsLNdbOi
Posts: 3
Joined: February 25th, 2011, 2:27 pm

Re: FireFox Cache in RAM?

Post by IsLNdbOi »

I just googled "FireFox cache in RAM" and found it on some forum.

So is 128MB the most we can do or can I enter 524288 for 512MB? Will it work properly if I do this?
Alan Baxter
Posts: 4419
Joined: May 30th, 2005, 2:01 pm
Location: Colorado, USA

Re: FireFox Cache in RAM?

Post by Alan Baxter »

IsLNdbOi wrote:Right-Click anywhere -> New -> Integer -> Preference Name "disk.cache.memory.capacity"

value memory size in KB. Enter 32768 for 32MB, 65536 for 64MB, 131072 for 128MB

The name of the pref is browser.cache.memory.capacity. Your source doesn't know what they're talking about. Consider these replies to that bogus speed tweak that was copied and pasted all over.
Windows 7 - Ultimate SSD Speed Tweaks - Page 4
The Firefox preference disk.cache.memory.capacity is supposed to be browser.cache.memory.capacity. You probably don't need to change it either, the defaults should be fine. It's only used for caching images so they don't have to be decoded again. By default, the size is automatically adjusted based on the amount of system memory you have.

Also from http://www.mydellmini.com/forum/windows ... post114195
Nothing important really, just wanted to note that "there's a way to write cached files to RAM instead of the hard disk" sounds a bit strange, because if you set Firefox to only use RAM, there are no "cached files" at all (and certainly no "cached files written to RAM").

That said, go ahead and tweak it a large as you like and pretend you can tell a difference. The maximum the user can specify isn't documented, but it may be hard-coded to 32MB.
Bug 296538 – limit the memory cache to a reasonable value

Edit: If you really want to put the disk file cache in RAM, use a RAM disk.
IsLNdbOi
Posts: 3
Joined: February 25th, 2011, 2:27 pm

Re: FireFox Cache in RAM?

Post by IsLNdbOi »

Why are you being so hostile? I came here to ask for the correct settings. Someone asked me where I got the crap I quoted and I didn't remeber the exact site.
Alan Baxter
Posts: 4419
Joined: May 30th, 2005, 2:01 pm
Location: Colorado, USA

Re: FireFox Cache in RAM?

Post by Alan Baxter »

There is no correct setting. I told you to set it has high as you like. Please report your results back here.

By the way, you don't need to remember the exact site where you got that tweak. That bogus advice is posted all over the net. I put some work into researching this issue for you. Did you read the comments and knowledge-base article I quoted and linked?

Edit:
IsLNdbOi wrote:Why are you being so hostile?

Sorry I seemed to make it sound personal. I get a bit frustrated at times by the bad advice users pick up from the net. Disk cache and memory cache are two completely different things. Here's what you can do.
1) If you want to disable disk caching to a SSD or portable flash drive, set browser.cache.disk.enable to false. This is what portableapps.com does with its implementation of Portable Firefox.
Or you can direct the disk cache to somewhere else, like a local HDD or RAM disk.
http://kb.mozillazine.org/Browser.cache ... d_settings

2) If you have memory to burn, you may notice a speed improvement by increasing the size of the memory cache with Browser.cache.memory.capacity. As far as I can tell by examining the Firefox source code, you can make that number as large as you like. I don't know what difference it will make or if it's possible to break something by setting it too high. Experiment. Please let us know how well it works for you.
Post Reply