あらゆるサーバーアプリケーションと同様に、Confluence は頻繁に利用されるため、何らかのチューニングが必要になる場合があります。弊社では、Confluence が多種多様な環境下で十分なパフォーマンスを実現できるように最善を尽くしていますが、あらゆる人の環境や利用パターンに最適な単一の設定は存在しません。
If you are having problems with the performance of Confluence and need our help resolving them, you should read this document: Requesting Performance Support
アンチウイルス ソフトウェアによって、Confluence のパフォーマンスは大幅に低下します。ハードディスクへのアクセスを遮断するウィルス対策ソフトウェアの場合は特に有害であり、Confluence でエラーを引き起こす可能性もあります。Confluence ホーム ディレクトリ、インデックス ディレクトリ、およびすべてのデータベース関連ディレクトリを無視するように、アンチウイルス ソフトウェアを設定する必要があります。
You can find out which pages are slow and which users are accessing them by enabling Confluence's built-in access logging.
You can identify the cause of page delays using Confluence's built-in profiler according to Troubleshooting Slow Performance Using Page Request Profiling.
If bandwidth is responsible for bottlenecking in your Confluence installation, you should consider enabling HTTP compression. This may also be useful when running an external facing instance to reduce your bandwidth costs.
Take note of the known issues with HTTP compression in versions of Confluence prior to 2.8, which may result in high memory consumption.
The embedded database that is provided with Confluence is meant only to be used for evaluation, or for low-volume Confluence sites. Once your site grows, you will almost certainly need to switch to an external relational database management system. Beyond this, we do not recommend any particular RDBMS over another. We recommend using what you are familiar with, because your ability to maintain the database will probably make far more difference to what you get out of it than the choice of database itself.
If Confluence is running slowly, the most likely cause is that there is some kind of bottleneck in the database.
If you have the luxury of access to a DBA, it would be worthwhile having them tune the database specifically to the demands that your particular Confluence installation is placing on it. If you do not have a DBA, you may want to consult the database indexing advice that we have been gathering from customer reports and our own experience running and developing Confluence. The instructions on that page are for Oracle, but most of the indexes can be applied to (and will help with) any database.
(These database indexes are now created automatically when Confluence is installed, but existing installations upgrading to a more recent version may still need to add them manually)
To reduce the load on the database, and speed up many operations, Confluence keeps its own cache of data. Tuning the size of this cache may speed up Confluence (if the caches are too small), or reduce memory (if the caches are too big). Future versions of Confluence will allow you to tune the size of this cache from within the web application.
In Confluence 2.3 to 2.5, the cache is configured in confluence/WEB-INF/classes/confluence-coherence-cache-config.xml (or confluence/WEB-INF/classes/confluence-coherence-cache-config-clustered.xml for clustered versions). In Confluence 2.6, these files can be found in confluence/WEB-INF/lib/confluence-2.6.0.jar.
There is also a Cache Statistics page provided with Confluence. This page shows the size of each cache and its hit ratio.
com.atlassian.confluence.core.ContentEntityObject should be set to at least 20-30% of the number of content entity objects (pages, comments, emails, news items) in your system. To find the number of content entity objects, use the query select count
from CONTENT.com.atlassian.confluence.core.ContentEntityObject.bodyContents should be set to at least 20% of the number of content entity objects (pages, comments, emails, news items) in your system. To find the number of content entity objects, use the query select count
from CONTENT.com.atlassian.confluence.security.PermissionCheckDispatcher.isPermitted() should be set to at least the number of concurrent users you expect to access Confluence at the same timecom.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers must be set to at least the number of users with USE_CONFLUENCE permission (don't worry, it only takes up a few bytes per user). To find an upper bound for this, use the query select count
from OS_USER, or if you have configured atlassian-user.xml to use the Hibernate repository, select count
from users.com.atlassian.confluence.security.SpacePermission should be set to the number of space permissions in your deployment (a good rule of thumb is 20 times the number of spaces). You can find the number of space permissions using the query select count
from SPACEPERMISSIONS.The following are more specific performance problems that can be resolved from tuning the cache.
This is a known problem, please refer to CONF-11858 for the solution.
If your installation of Confluence is suffering from this problem, it may be due to a insufficient SpacePermissions cache size. To address this problem, first determine the number of space permission objects in your Confluence instance. You can do this by running this query against your database:
> select count(*) from SPACEPERMISSIONS |
Now locate the cache entry for SpacePermissions in your ehcache.xml file. It looks like this:
<cache name="com.atlassian.confluence.security.SpacePermission"
maxElementsInMemory="10000" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="0"
overflowToDisk="false" />
|
The equivalent for confluence-coherence-cache-config.xml would be:
<local-scheme>
<scheme-name>cache:com.atlassian.confluence.security.CachingSpacePermissionManager.permissions</scheme-name>
<scheme-ref>default</scheme-ref>
<high-units>10000</high-units>
<expiry-delay>0s</expiry-delay>
</local-scheme>
|
Adjust the maxElementsInMemory or high-units property to the number of space permissions you have (in the example above, I've used 10000). Also, just as important, you need to adjust the timeToLiveSeconds or expiry-delay property to 0.
Note: 10K of space permissions consumes approximately 8MB of memory. Please ensure there is enough memory allocated to your instance to cater for this.
confluence/WEB-INF/classes/com/atlassian/confluence/admin/actions/cache-name-mappings.properties. com/atlassian/confluence/core/ConfluenceActionSupport.propertiesconfluence-2.x.*.jar file. <cache-mapping> tag in confluence-coherence-cache-config.xml or confluence-coherence-cache-config-clustered.xml. If the tag doesn't exist, you can create it within the <caching-scheme-mapping> tag.
Attached to this page are corrected copies of confluence-coherence-cache-config.xml and confluence-coherence-cache-config-clustered.xml. These are updated from a bug CONF-11857. |
<scheme-name> will correspond to a <local-scheme> tag below. It refers to a scheme reference. Either change the high-units tag in the scheme reference, or add a high-units tag to override the scheme reference. For example, the following tag would change the Content Bodies cache from the default 1000 units to 2000 units:
<local-scheme> <scheme-name>cache:com.atlassian.confluence.core.ContentEntityObject.bodyContents</scheme-name> <high-units>2000</high-units> <scheme-ref>default</scheme-ref> <expiry-delay>0s</expiry-delay> </local-scheme> |
<local-scheme> <scheme-name>user</scheme-name> <scheme-ref>default</scheme-ref> <high-units>5000</high-units> <expiry-delay>300s</expiry-delay> </local-scheme> |
confluence/WEB-INF/classes/ directory. The file in this directory will override the settings in your jar file. If you want to back out the changes, you only need to remove the file from your confluence/WEB-INF/classes/ directory — then the default values in the confluence-coherence-cache-config.xml located in your jar file will apply.You can find more information about configuring the Coherence cache in the Coherence cache documentation.
If a cache has not been defined, then it will use the default cache size and expiry. As the start of your confluence/WEB-INF/classes/confluence-coherence-cache-config.xml file you will notice the following:
<cache-mapping> <cache-name>*</cache-name> <scheme-name>default</scheme-name> </cache-mapping> |
So basically all caches will default to using the default scheme, which is defined as below:
<local-scheme> <scheme-name>default</scheme-name> <class-name>com.atlassian.confluence.cache.tangosol.ExpiryCountingLocalCache</class-name> <high-units>1000</high-units> <expiry-delay>3600</expiry-delay> </local-scheme> |
I.e. with a size of 1000 and an expiry of 3600 seconds. Other schemas use the above as their default and either override the size of the cache, or the length of the expiry.
See Managing Application Server Memory Settings.
For high-load environments, performance can be improved by using a web server such as Apache in front of the application server. There is a configuration guide to Running Confluence behind Apache.
新しい web サーバーを設定する場合、負荷を処理するのに十分なスレッド/プロセスを設定するようにしてください。これは、web サーバーおよびアプリケーション サーバー コネクターの両方に適用されますが、通常は別々に設定されます。可能であれば、アプリケーション サーバーに対する web サーバー コネクション内のコネクション プーリングを有効にする必要があります。
If you have a large of CPU's on your server you can add -XX:+UseParallelGC to your JAVA_OPTS options. This will allow garbage collection to happen in parallel with the application and can boost performance. For more information please refer to http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#1.1.%20Types%20of%20Collectors%7Coutline.
Performance Testing Scripts
Working with Confluence Logs
Operating Large or Mission-Critical Confluence Installations
Confluence Clustering Overview
Requesting Performance Support
Administrators Guide
Configuration Guide