時(shí)間:2015-06-28 00:00:00 來源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評(píng)論(0)
用了squid有一段時(shí)間了,一直以來對(duì)cache_mem的選項(xiàng)理解都有些錯(cuò)誤,后來重新查看了配置文件,并對(duì)著詞典翻譯了一下,共享出來,歡迎批評(píng)指正:)
Option Name: cache_mem
Replaces:
Requires:
Default Value: cache_mem 8 MB
Suggested Config:
NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
此參數(shù)并非指定進(jìn)程的最大值,它只是設(shè)定一個(gè)squid能夠用多少額外的內(nèi)存來緩存對(duì)象的限制值,squid在其他方面也需要使用內(nèi)存。更詳細(xì)的內(nèi)容請(qǐng)看squid的FAQ第8段。
'cache_mem' specifies the ideal amount of memory to be used
for:
* In-Transit objects
* Hot Objects
* Negative-Cached objects
‘cache_mem’設(shè)定理想的內(nèi)存總量用于:
*傳輸中的對(duì)象(In-Transit OBJECTs)
*熱對(duì)象(Hot OBJECTs)
*消極緩存對(duì)象(Negative-Cached OBJECTs)
Data for these objects are stored in 4 KB blocks.? This
parameter specifies the ideal upper limit on the total size of
4 KB blocks allocated.? In-Transit objects take the highest
priority.
這些對(duì)象所對(duì)應(yīng)的數(shù)據(jù)都存儲(chǔ)在4KB的塊里面。此參數(shù)指定理想中分配4KB塊總數(shù)的最大限制。In-Transit OBJECTs具有最高的優(yōu)先級(jí)。
In-transit objects have priority over the others.? When
additional space is needed for incoming data, negative-cached
and hot objects will be released.? In other words, the
negative-cached and hot objects will fill up any unused space
not needed for in-transit objects.
In-transit OBJECTs擁有高于其他對(duì)象的優(yōu)先級(jí),當(dāng)輸入數(shù)據(jù)需要額外空間來存儲(chǔ)的時(shí)候,negative-cached和hot OBJECTs將被釋放。也就是說,消極緩存對(duì)象和熱對(duì)象將會(huì)填滿所有未使用的而且對(duì)傳輸中的對(duì)象來說不是必需的空間。
If circumstances require, this limit will be exceeded.
Specifically, if your incoming request rate requires more than
'cache_mem' of memory to hold in-transit objects, Squid will
exceed this limit to satisfy the new requests.? When the load
decreases, blocks will be freed until the high-water mark is
reached.? Thereafter, blocks will be used to store hot
objects.
如果現(xiàn)實(shí)需要,這個(gè)限制將被突破。特別是,如果輸入請(qǐng)求速率需要多于‘cache_mem’指定內(nèi)存值的內(nèi)存來承載傳輸中的對(duì)象,squid將突破此限制來滿足新的請(qǐng)求。當(dāng)負(fù)載持續(xù)減少時(shí),塊將被釋放直到達(dá)到最高分水線。此后,塊將被用于保持熱對(duì)象。
原文地址 http://blog.chinaunix.net/u2/67390/showart_1071869.html
關(guān)鍵詞標(biāo)簽:squid,cache_mem
相關(guān)閱讀
熱門文章 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 Tomcat9.0如何安裝_Tomcat9.0環(huán)境變量配置方法 多種操作系統(tǒng)NTP客戶端配置 Linux操作系統(tǒng)修改IP
人氣排行 Linux下獲取CPUID、硬盤序列號(hào)與MAC地址 dmidecode命令查看內(nèi)存型號(hào) linux tc實(shí)現(xiàn)ip流量限制 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 linux下解壓rar文件 lcx.exe、nc.exe、sc.exe入侵中的使用方法 Ubuntu linux 關(guān)機(jī)、重啟、注銷 命令 查看linux服務(wù)器硬盤IO讀寫負(fù)載