Browser.cache.memory.capacity: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(match the style of the other articles - recommended settings is only for recommendations; defaults are the default value of the preference, not the default setting)
m (some further minor editing)
 
(21 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{wrongtitle|title=browser.cache.memory.capacity}}
{{preference|pref=browser.cache.memory.capacity}}


==Background==
==Background==
When a page is loaded, it can be cached so it doesn't need to be rerendered to be redisplayed. This preference controls the maximum amount of memory to use for caching decoded images and chrome (application user interface elements).  
When images are loaded, they can be cached so they don't need to be decoded or uncompressed to be redisplayed. For e-mail and newsgroups (i.e., Thunderbird and SeaMonkey), messages for IMAP accounts are cached as well in either disk or memory cache, unless synchronized locally already. This reduces the amount of network activity to reload previously viewed messages. This preference controls the maximum amount of memory to use for caching decoded images, messages, and chrome items (application user interface elements).


==Possible values and their effects==
==Possible values and their effects==
===-1===
===-1===
Automatically decide the maximum memory to use to cache decoded images and chrome based on the total amount of RAM. (Default in all but Thunderbird and Minimo).  
Automatically decide the maximum memory to use to cache decoded images, messages, and chrome based on the total amount of RAM. (Default in all but Thunderbird versions 3.1 or earlier and Minimo).  
{| {{prettytable}}
{| {{prettytable}}
! Physical RAM  
! Physical RAM  
! Memory Cache (in KiB)  
! Memory Cache (in KB)  
|-
|-
| 32 MB
| align="right" | 32 MB
| 2048  
| align="right" | 2048  
|-
|-
| 64 MB
| align="right" | 64 MB
| 4096  
| align="right" | 4096  
|-
|-
| 128 MB
| align="right" | 128 MB
| 8192
| align="right" | 6144
|-
|-
| 256 MB
| align="right" | 256 MB
| 14336 
| align="right" | 10240
|-
|-
| 512 MB
| align="right" | 512 MB
| 22528
| align="right" | 14336
|-
|-
| 1 GB
| align="right" | 1 GB
| 32768
| align="right" | 18432
|-
|-
| 2 GB
| align="right" | 2 GB
| 45056
| align="right" | 24576
|-
|-
| 4 GB
| align="right" | 4 GB
| 59392
| align="right" | 30720
|-
| align="right" | 8 GB and up
| align="right" | 32768
|}
|}
In Firefox 1.5 and SeaMonkey 1.0 and earlier versions, these defaults were the following:
{| {{prettytable}}
! Physical RAM
! Memory Cache (in KB)
|-
| align="right" | 32 MB
| align="right" | 2048
|-
| align="right" | 64 MB
| align="right" | 4096
|-
| align="right" | 128 MB
| align="right" | 8192
|-
| align="right" | 256 MB
| align="right" | 14336 
|-
| align="right" | 512 MB
| align="right" | 22528
|-
| align="right" | 1 GB
| align="right" | 32768
|-
| align="right" | 2 GB
| align="right" | 45056
|-
| align="right" | 4 GB
| align="right" | 59392
|-
| align="right" | 8 GB
| align="right" | 75776
|}
See [https://bugzilla.mozilla.org/show_bug.cgi?id=296538 bug 296538] for details.


===0===
===0===
Line 40: Line 78:


===Any positive integer===
===Any positive integer===
Maximum amount of memory in '''KiB''' to use to cache decoded images and chrome (1 MB = 1024 KiB).  (Thunderbird default: 4096. Minimo default: 256.)  
Maximum amount of memory in '''KB''' to use to cache decoded images and chrome (1 MB = 1024 KB).  (Thunderbird default: 4096. Minimo default: 256.) Thunderbird 3.3 will switch to the "-1" default per [https://bugzilla.mozilla.org/show_bug.cgi?id=629247 bug 629247].


==Caveats==
==Caveats==
Line 46: Line 84:
* Lowering this value causes less memory to be used but also increases the load time of previously visited pages and dialogs. Raising it has the opposite effect.
* Lowering this value causes less memory to be used but also increases the load time of previously visited pages and dialogs. Raising it has the opposite effect.
* To view current memory cache usage, put <code>about:cache?device=memory</code> in the [[:Category:Location Bar | Location Bar]]
* To view current memory cache usage, put <code>about:cache?device=memory</code> in the [[:Category:Location Bar | Location Bar]]
* This preference does not exist by default.
* This preference does not exist by default in applications other than Thunderbird 3.1 and earlier.


==Recommended settings==
==Recommended settings==
Users who are having problems and want to lower memory consumption can try setting the integer value to something lower than the memory cache setting given in the above table. Users who have no problems with memory should leave the setting at -1.
Users who are having problems and want to lower memory consumption can try setting the integer value to something lower than the memory cache setting given in the above table. 4096, which was the previous default value, is a good place to start because it will decrease memory usage for users with more than 64 MB RAM. Users who have no problems with memory should leave the setting at -1.


==First checked in==
==First checked in==
[http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsCacheService.cpp&branch=&root=/cvsroot&subdir=mozilla/netwerk/cache/src&command=DIFF_FRAMESET&rev1=1.51&rev2=1.52 2001-06-27 by Darin Fisher]
[http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&amp;whitespace_mode=show&amp;file=nsCacheService.cpp&amp;branch=&amp;root=/cvsroot&amp;subdir=mozilla/netwerk/cache/src&amp;command=DIFF_FRAMESET&amp;rev1=1.51&amp;rev2=1.52 2001-06-27 by Darin Fisher]


==Has an effect in==
==Has an effect in==
Line 62: Line 100:
* Thunderbird (all versions)
* Thunderbird (all versions)
* Minimo (all versions)
* Minimo (all versions)
* Seamonkey (all versions)
* SeaMonkey (all versions)


==Related bugs==
==Related bugs==
Line 69: Line 107:
* [https://bugzilla.mozilla.org/show_bug.cgi?id=204164 Bug 204164 - Calculating memory cache as percentage of physical memory may not be such a good idea]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=204164 Bug 204164 - Calculating memory cache as percentage of physical memory may not be such a good idea]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=296538 Bug 296538 - limit the memory cache to a reasonable value]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=296538 Bug 296538 - limit the memory cache to a reasonable value]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=629247 Bug 629247 - Remove 4MB limit for memory-cache and base it on physical memory size instead] (Thunderbird)


==Related preferences==
==Related preferences==
Line 76: Line 115:


[[Category:Preferences]]
[[Category:Preferences]]
[[Category:Preferences (Thunderbird)]]
[[Category:Tweaking preferences]]

Latest revision as of 02:06, 5 February 2011

Background

When images are loaded, they can be cached so they don't need to be decoded or uncompressed to be redisplayed. For e-mail and newsgroups (i.e., Thunderbird and SeaMonkey), messages for IMAP accounts are cached as well in either disk or memory cache, unless synchronized locally already. This reduces the amount of network activity to reload previously viewed messages. This preference controls the maximum amount of memory to use for caching decoded images, messages, and chrome items (application user interface elements).

Possible values and their effects

-1

Automatically decide the maximum memory to use to cache decoded images, messages, and chrome based on the total amount of RAM. (Default in all but Thunderbird versions 3.1 or earlier and Minimo).

Physical RAM Memory Cache (in KB)
32 MB 2048
64 MB 4096
128 MB 6144
256 MB 10240
512 MB 14336
1 GB 18432
2 GB 24576
4 GB 30720
8 GB and up 32768

In Firefox 1.5 and SeaMonkey 1.0 and earlier versions, these defaults were the following:

Physical RAM Memory Cache (in KB)
32 MB 2048
64 MB 4096
128 MB 8192
256 MB 14336
512 MB 22528
1 GB 32768
2 GB 45056
4 GB 59392
8 GB 75776

See bug 296538 for details.

0

Do not cache decoded images and chrome in memory.

Any positive integer

Maximum amount of memory in KB to use to cache decoded images and chrome (1 MB = 1024 KB). (Thunderbird default: 4096. Minimo default: 256.) Thunderbird 3.3 will switch to the "-1" default per bug 629247.

Caveats

  • browser.cache.memory.enable must be true for this preference to take effect.
  • Lowering this value causes less memory to be used but also increases the load time of previously visited pages and dialogs. Raising it has the opposite effect.
  • To view current memory cache usage, put about:cache?device=memory in the Location Bar
  • This preference does not exist by default in applications other than Thunderbird 3.1 and earlier.

Recommended settings

Users who are having problems and want to lower memory consumption can try setting the integer value to something lower than the memory cache setting given in the above table. 4096, which was the previous default value, is a good place to start because it will decrease memory usage for users with more than 64 MB RAM. Users who have no problems with memory should leave the setting at -1.

First checked in

2001-06-27 by Darin Fisher

Has an effect in

  • Netscape (all versions since 6.1)
  • Mozilla Suite (all versions since 0.9.1)
  • Phoenix (all versions)
  • Firebird (all versions)
  • Firefox (all versions)
  • Thunderbird (all versions)
  • Minimo (all versions)
  • SeaMonkey (all versions)

Related bugs

Related preferences