3
我们在一台机器上运行多个站点,其中有一个apc.shm = 4G
。这对缓存所有内容是不够的,所以我们设置apc.ttl= 600
,以便未使用的条目被驱逐。目前尚不清楚这是否按计划进行。我们看到〜91%的高速缓存命中率,但100%的分段速度非常快。如何为许多网站配置APC?
我们也开始看到PHP无响应,需要重新启动Apache,但是没有任何内容记录在PHP或Apache日志中。在此期间,Apache仍然可以提供静态文件,而不会出现问题。我的直觉告诉我,这与APC的流失有关。以下是当前设置:
apc.cache_by_default 1
apc.canonicalize 0
apc.coredump_unmap 0
apc.enable_cli 0
apc.enabled 1
apc.file_md5 0
apc.file_update_protection 2
apc.filters
apc.gc_ttl 3600
apc.include_once_override 0
apc.lazy_classes 0
apc.lazy_functions 0
apc.max_file_size 1M
apc.mmap_file_mask /dev/zero
apc.num_files_hint 1024
apc.preload_path
apc.report_autofilter 0
apc.rfc1867 0
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.serializer default
apc.shm_segments 1
apc.shm_size 4G
apc.slam_defense 1
apc.stat 1
apc.stat_ctime 0
apc.ttl 600
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 7200
apc.write_lock 1
几个问题:
我们修改
apc.ttl
,但同时并没有改变apc.gc_ttl。降低此值是否可帮助更快地清除文件并减少碎片?如果我们离开
apc.ttl = 0
,我们会更好吗,并让APC每次缓存填充时都清空并重建?
在此先感谢!
正确,很多Drupal网站在一台机器上就是这样的'共享主机'。我会尝试提高这个值。谢谢。 – Vincent