歡迎您光臨本站 註冊首頁

關於squid的cache_mem選項

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0

  用了squid有一段時間了,一直以來對cache_mem的選項理解都有些錯誤,後來重新查看了配置文件,並對著詞典翻譯了一下,共享出來,歡迎批評指正:)

  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.

  此參數並非指定進程的最大值,它只是設定一個squid能夠用多少額外的內存來緩存對象的限制值,squid在其他方面也需要使用內存.更詳細的內容請看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』設定理想的內存總量用於:

  *傳輸中的對象(In-Transit OBJECTs)

  *熱對象(Hot OBJECTs)

  *消極緩存對象(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.

  這些對象所對應的數據都存儲在4KB的塊裡面.此參數指定理想中分配4KB塊總數的最大限制.In-Transit OBJECTs具有最高的優先順序.

  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擁有高於其他對象的優先順序,當輸入數據需要額外空間來存儲的時候,negative-cached和hot OBJECTs將被釋放.也就是說,消極緩存對象和熱對象將會填滿所有未使用的而且對傳輸中的對象來說不是必需的空間.

  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.

  如果現實需要,這個限制將被突破.特別是,如果輸入請求速率需要多於『cache_mem』指定內存值的內存來承載傳輸中的對象,squid將突破此限制來滿足新的請求.當負載持續減少時,塊將被釋放直到達到最高分水線.此後,塊將被用於保持熱對象.

  原文地址 http://blog.chinaunix.net/u2/67390/showart_1071869.html


[火星人 ] 關於squid的cache_mem選項已經有785次圍觀

http://coctec.com/docs/linux/show-post-51206.html