大規模な Confluence サイトのパフォーマンスを向上させるには、静的コンテンツのキャッシュを JVM から Apache に移動することをお勧めします。これは、JVM が静的コンテンツを提供するスレッドを長時間実行させるのを防ぎます。
注意:
Apache が Confluence の静的コンテンツをキャッシュする設定を行うには、
Add a mod_disk_cache stanza to the virtual host configuration:
<IfModule mod_disk_cache.c> # "/s" is where Confluence serves "static" stuff.Instruct Apache to cache it: CacheEnable disk /s CacheIgnoreHeaders Set-Cookie CacheRoot "/var/cache/mod_proxy" </IfModule> |
Configure Apache to load mod_disk_cache. For example, in our server configuration this is done in /etc/httpd/conf/httpd.conf:
LoadModule disk_cache_module modules/mod_disk_cache.so |
/var/cache/mod_proxy in the above configuration) after a Confluence or plugin upgrade. This is a simple 3 step process:sudo rm -r /var/cache/mod_proxy/*Ensure that you are running the htcacheclean daemon in order to prevent excessive use of disk space. In our situation we ran it like this:
sudo htcacheclean -d30 -n -t -p /var/cache/mod_proxy -l 512M |
This will purge content once the cache reaches 512M every 30 minutes. See the Apache documentation for htcacheclean for details of the options.