Squid Web Cache Wiki

Squid Web Cache 文档

🔗 功能:自动 cache_dir 尺寸设置

🔗 详细信息

Fernando Ulisses dos Santos 建议在 cache_dir 参数中创建一个选项,如下所示: cache_dir /var/spool/squid AUTO

其中 AUTO 表示 squid 可以使用磁盘上的所有可用空间,但在磁盘即将满时自动减小。它可能有一个参数,例如始终在分区上保留 10% 的空闲空间,如果高于此值,则调用自动清理函数。

这可以帮助管理员:- 最小化安装工作量(无需了解目录数量、空间等)- 最大化网络性能(在可用时,使用磁盘上的所有可用空间)- 最小化停机时间(当其他程序填满磁盘时)

HenrikNordström 补充说

Squid needs to know the max size it may use in the directory, as this also
influences the amount of memory Squid will require to keep track of the cache.

Having it automatically shrink the size before fully running out of space might
however be a good idea for stability reasons.

Robert Collins 评论说

I've been thinking along similar lines for a while. First off the rank is:

* calculate an automatic upper bound on squid total memory based on 50% of physical RAM. The will reduce any user set parameters (And we can provide a toggle to override this for advanced tuning).
* Reduce cache_mem and swap_dir sizes at run-time in line with the set upper bound. I'm thinking that an automatic ratio of 1:9 between memory cache and disk cache index should be reasonable.
* This provides the groundwork for automatic disk cache management - we know how big we can safely allow it to be in terms of index entries.

分类: WantedFeature

导航:站点搜索站点页面类别🔼 向上