pfsense:squid:options_which_affect_the_cache
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:squid:options_which_affect_the_cache [2020/03/30 09:43] – [Low-Water Mark in %] peter | pfsense:squid:options_which_affect_the_cache [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 22: | Line 22: | ||
---- | ---- | ||
- | ===== Low-Water Mark in % ===== | + | ===== Low-Water Mark in % (cache_swap_low) |
The low-water mark for AUFS/ | The low-water mark for AUFS/ | ||
* Default: **90**. | * Default: **90**. | ||
- | |||
This defines when the replacement should take place. | This defines when the replacement should take place. | ||
Line 37: | Line 36: | ||
If utilization is close to the low-water mark less replacement is done each time. | If utilization is close to the low-water mark less replacement is done each time. | ||
- | Defaults are 90% and 95%. If you have a large cache, 5% could be hundreds of MB. If this is the case you may wish to set these numbers | + | <WRAP important> |
+ | **WARNING: | ||
+ | </ | ||
---- | ---- | ||
- | ===== High-Water Mark in % ===== | + | ===== High-Water Mark in % (cache_swap_high) |
The high-water mark for AUFS/ | The high-water mark for AUFS/ | ||
* Default: **95**. | * Default: **95**. | ||
+ | |||
+ | This defines when the replacement should take place. | ||
+ | |||
+ | Replacement begins when the swap (disk) usage is above the low-water mark and attempts to maintain utilization near the low-water mark. | ||
+ | |||
+ | As swap utilization gets close to high-water mark object eviction becomes more aggressive. | ||
+ | |||
+ | If utilization is close to the low-water mark less replacement is done each time. | ||
+ | |||
+ | <WRAP important> | ||
+ | **WARNING: | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 75: | Line 90: | ||
* Default: **16**. | * Default: **16**. | ||
+ | * My setting: **64**. | ||
Each level-1 directory contains 256 subdirectories, | Each level-1 directory contains 256 subdirectories, | ||
Line 95: | Line 111: | ||
* Default: **4 (MB)**. | * Default: **4 (MB)**. | ||
+ | * My setting: **1024**. | ||
+ | |||
+ | Objects larger than this size will NOT be saved on disk. | ||
+ | |||
+ | The value is specified in kilobytes. | ||
+ | |||
+ | If you wish to get a high BYTES hit ratio, you should probably increase this (one 32 MB object hit counts for 3200 10KB hits). | ||
+ | |||
+ | Leave this value low if you wish to increase the speed more than what you want to save bandwidth. | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | See **replacement_policy** section for a discussion of this policy. | ||
+ | </ | ||
---- | ---- | ||
Line 104: | Line 135: | ||
* Default is : **64MB**. | * Default is : **64MB**. | ||
+ | * My setting: **2048**. | ||
Data for these objects are stored in 4 KB blocks. | Data for these objects are stored in 4 KB blocks. | ||
Line 111: | Line 143: | ||
If circumstances require, this limit will be exceeded. | If circumstances require, this limit will be exceeded. | ||
- | < | + | |In-transit objects or current requests|These are the objects related to the current requests and they have the highest priority to be kept in the cache space in RAM. These objects must be kept in RAM and if there is a situation where the incoming request rate is quite high and we are about to overflow the cache space in RAM, Squid will try to keep the served part (the part which has already been sent to the client) on the disk to create free space in RAM.| |
- | **NOTE:** This tag does not specify the maximum process size. | + | |Hot or popular objects|These objects or web documents are popular and are requested quite frequently compared to others. |
+ | |Negatively cached objects|Negatively cached objects are error messages which Squid has encountered while fetching a page or web document on behalf of a client. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | **WARNING:** This tag does not specify the maximum process size. | ||
It places a limit on one aspect of squid' | It places a limit on one aspect of squid' | ||
Line 119: | Line 158: | ||
Process will probably become twice or three times bigger than the value put here. | Process will probably become twice or three times bigger than the value put here. | ||
+ | |||
+ | While deciding the RAM space for caching, we should be neither greedy nor paranoid. | ||
</ | </ | ||
Line 128: | Line 169: | ||
* Default: **256 (KB)**. | * Default: **256 (KB)**. | ||
+ | * My setting: | ||
+ | |||
+ | This should be set high enough to keep objects accessed frequently in memory to improve performance at the same time low enough to keep larger objects from hoarding **cache_mem**. | ||
---- | ---- | ||
Line 136: | Line 180: | ||
The memory replacement policy determines which objects are purged from memory when space is needed. | The memory replacement policy determines which objects are purged from memory when space is needed. | ||
- | * Default: **heap GDSF**. | + | * Default: **Heap GDSF**. |
+ | * My setting: **Heap LFUDA**. | ||
pfsense/squid/options_which_affect_the_cache.1585561418.txt.gz · Last modified: 2020/07/15 09:30 (external edit)