dumb question

Discussion of features in Mozilla Firefox
Post Reply
User avatar
rbrimhall
Posts: 332
Joined: November 13th, 2002, 11:20 pm
Location: Memphis, TN

dumb question

Post by rbrimhall »

when setting cache memory... is this RAM or Hard drive memory... something I've never learned about :oops: This is the pref I'm referring to: pref("browser.cache.memory.capacity", 40096); not the cache available in tools/prefs
User avatar
Alex Bishop
mozillaZine Admin
Posts: 1084
Joined: November 5th, 2002, 3:18 am
Location: London
Contact:

Re: dumb question

Post by Alex Bishop »

rbrimhal wrote:when setting cache memory... is this RAM or Hard drive memory... something I've never learned about :oops: This is the pref I'm referring to: pref("browser.cache.memory.capacity", 40096); not the cache available in tools/prefs


That's RAM memory. The pref you're using is setting it to about 4MB. The size of your hard drive cache (hard drive space shouldn't really be described as memory) is accessible from Tools > Preferences and should usually be set to something much higher. Generally, you need both: RAM cache is faster to access while disk cache usually holds more stuff (and has the advantage of being persistent).
Alex
User avatar
rbrimhall
Posts: 332
Joined: November 13th, 2002, 11:20 pm
Location: Memphis, TN

Post by rbrimhall »

thanks!! That makes sense! So, when I clear the disk cache I'm not clearing the RAM cache?
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Re: dumb question

Post by daihard »

Alex Bishop wrote:That's RAM memory. The pref you're using is setting it to about 4MB. The size of your hard drive cache (hard drive space shouldn't really be described as memory) is accessible from Tools > Preferences and should usually be set to something much higher. Generally, you need both: RAM cache is faster to access while disk cache usually holds more stuff (and has the advantage of being persistent).

Please allow me to jump in. I found the said prefence (pref("browser.cache.memory.capacity", 4096") in ~/phoenix/defaults/pref/unix.js. Now if I add the following line to my user.js, will it override the default setting?

user_pref("browser.cache.memory.capacity", 8192");

I have 1GB of RAM, so doubling up the size of RAM cache shouldn't be a problem. What do you think?

Thanks,
Dai
User avatar
laszlo
Posts: 5225
Joined: November 4th, 2002, 6:13 pm
Location: .de
Contact:

Re: dumb question

Post by laszlo »

Alex Bishop wrote:
rbrimhal wrote:when setting cache memory... is this RAM or Hard drive memory... something I've never learned about :oops: This is the pref I'm referring to: pref("browser.cache.memory.capacity", 40096); not the cache available in tools/prefs


That's RAM memory. The pref you're using is setting it to about 4MB.

Actually, this pref would set the memory cache to about 39 MB :wink:

daihard wrote:I found the said prefence (pref("browser.cache.memory.capacity", 4096") in ~/phoenix/defaults/pref/unix.js. Now if I add the following line to my user.js, will it override the default setting?

user_pref("browser.cache.memory.capacity", 8192");

I have 1GB of RAM, so doubling up the size of RAM cache shouldn't be a problem. What do you think?

Yes, it will double the default size, and yes, it shouldn't be a problem. BTW: you can always check the prefs that are currently in effect with about:config.
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Re: dumb question

Post by daihard »

laszlo wrote:Yes, it will double the default size, and yes, it shouldn't be a problem. BTW: you can always check the prefs that are currently in effect with about:config.

Thanks.

Now, I know this qualifies as another dumb question, but could you please educate me on "about:cnofig"? What is it, and how can I access it?

Thanks again!
Dai
shimage
Posts: 129
Joined: November 5th, 2002, 3:39 am

Post by shimage »

type it into the address bar and hit enter. but make sure you spell it right...

oh, and it's a list of all your configuration settings. if that isn't clear, load it up and it should become fairly obvious what it is.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

shimage wrote:type it into the address bar and hit enter. but make sure you spell it right...

oh, and it's a list of all your configuration settings. if that isn't clear, load it up and it should become fairly obvious what it is.


Now only if there was a way to export about:config to a file or to search through it. Sigh. It's on the Mozilla wishlist.
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

shimage wrote:type it into the address bar and hit enter. but make sure you spell it right...

oh, and it's a list of all your configuration settings. if that isn't clear, load it up and it should become fairly obvious what it is.

Duh, it's not "cnofig" is it...

Thanks for the info. I didn't realise the address bar can be used this way.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

daihard wrote:
shimage wrote:type it into the address bar and hit enter. but make sure you spell it right...

oh, and it's a list of all your configuration settings. if that isn't clear, load it up and it should become fairly obvious what it is.

Duh, it's not "cnofig" is it...

Thanks for the info. I didn't realise the address bar can be used this way.


Just another one of those undocumented features.
User avatar
Alex Bishop
mozillaZine Admin
Posts: 1084
Joined: November 5th, 2002, 3:18 am
Location: London
Contact:

Re: dumb question

Post by Alex Bishop »

rbrimhal wrote:thanks!! That makes sense! So, when I clear the disk cache I'm not clearing the RAM cache?


Yes. I 'm not sure whether your memory cache is cleared when you exit Phoenix or if it's written to the disk cache. I might see if I can find out later.

laszlo wrote:
Alex Bishop wrote:
rbrimhal wrote:when setting cache memory... is this RAM or Hard drive memory... something I've never learned about :oops: This is the pref I'm referring to: pref("browser.cache.memory.capacity", 40096); not the cache available in tools/prefs


That's RAM memory. The pref you're using is setting it to about 4MB.

Actually, this pref would set the memory cache to about 39 MB :wink:


Whoops, missed the extra zero. :-)

daihard wrote:I found the said prefence (pref("browser.cache.memory.capacity", 4096") in ~/phoenix/defaults/pref/unix.js. Now if I add the following line to my user.js, will it override the default setting?

user_pref("browser.cache.memory.capacity", 8192");

I have 1GB of RAM, so doubling up the size of RAM cache shouldn't be a problem. What do you think?


Personally, I have my memory cache set to a quarter of the size of my total amount of RAM. (So I've actually got a larger memory cache than disk cache, which contradicts what I said above. I'm inconsistent like that.) That said, I'm not sure if it actually improves performance. I've never really done any testing to find out the optimum cache size.
Alex
User avatar
djst
Moderator
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden
Contact:

What's the use of memory cache anyway?

Post by djst »

Alex Bishop wrote:Personally, I have my memory cache set to a quarter of the size of my total amount of RAM. (So I've actually got a larger memory cache than disk cache, which contradicts what I said above. I'm inconsistent like that.) That said, I'm not sure if it actually improves performance. I've never really done any testing to find out the optimum cache size.


Really, what's the benefit of using much memory cache? Is it needed at all? I mean, if you click Back, you will be taken to the previous page you visited, and the amount of time to get that page back in memory from the disk cache shouldn't be more than a second.

Isn't it better to keep the memory footprint of Phoenix as low as possible by <i>reducing</i> the memory cache to a minimum instead?
User avatar
laszlo
Posts: 5225
Joined: November 4th, 2002, 6:13 pm
Location: .de
Contact:

Post by laszlo »

I think the memory cache (as well as the disk cache) uses a "Least Recently Used" strategy, so it depends heavily on your usage scheme. If you only go back just one or two pages, they will probably be still kept in memory with only 4 MB. If you on the other hand often go back, say, 20 or more pages (or use a lot of tabs), a larger RAM cache will raise the probability that the page is still in memory. I believe I've read somewhere in a related bug that they tested different default sizes, but couldn't determine a further performance gain beyond 4 MB. The real bottleneck with going back and forth is (at least on my box) that the page is re-rendered.
Post Reply