Confluence 3.0 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
This document describes tuning your application for improved performance. It is not a guide for troubleshooting Confluence outages. Check Troubleshooting Confluence Hanging or Crashing for help if Confluence is crashing. NEW: Garbage Collector Performance Issues
説明
あらゆるサーバーアプリケーションと同様に、Confluence は頻繁に利用されるため、何らかのチューニングが必要になる場合があります。弊社では、Confluence が多種多様な環境下で十分なパフォーマンスを実現できるように最善を尽くしていますが、あらゆる人の環境や利用パターンに最適な単一の設定は存在しません。
If you are having problems with the performance of Confluence and need our help resolving them, you should read Requesting Performance Support.
ツールの最新バージョンを使用する
Use the latest versions of your application servers and Java runtime environments. Newer versions are usually better optimized for performance. As an example, our internal performance tests show a 20% speed-up (when viewing pages under load) between Tomcat 6 on Java 6 vs Tomcat 5.5 on Java 5 out of the box.
RAM 不足に起因するスワッピングを回避する
Always watch the swapping activity of your server. If there is not enough RAM available, your server may start swapping out some of Confluence's heap data to your hard disk. This will slow down the JVM's garbage collection considerably and affect Confluence's performance. In clustered installations, swapping can lead to a Cluster Panic due to Performance Problems. This is because swapping causes the JVM to pause during Garbage Collection, which in turn can break the inter-node communication required to keep the clustered nodes in sync.
Choice of Database
The embedded database that is provided with Confluence is meant only to be used for evaluation, not for production Confluence sites. After the evaluation finishes, you will 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.
Database Connection Pool
Confluence に対する負荷が高い場合、データベースへの同時接続を増やす必要が生じることもあります。
- JNDI データソースを使用している場合、アプリケーション サーバーの設定ファイルでこれを行います。
- Confluence をデータベースに直接アクセスするように設定している場合は、手動で Confluence ホーム ディレクトリにある confluence.cfg.xml ファイルの hibernate.c3p0.max_size プロパティを編集する必要があります。このファイル内の URL を変更したあと、Confluence を再起動します。
To assess whether you need to tune your database connection pool, take thread dumps during different times (including peak usage). Inspect how many threads have concurrent database connections.
データベース インデックス
If Confluence is running slowly, one of the most likely cause is that there is some kind of bottleneck in the database.
Especially if you have more than a few thousand active users, you should consider enaging a database administrator (DBA) to tune the database specifically to the demands that your particular Confluence installation is placing on it. If you do not have a full-time DBA and can't even get one for temporary consulting, 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)
Cache Tuning
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. Vote for tuning the cache from the UI and getting cache recommendations to encourage Atlassian to build this feature into a Confluence release.
Please have a look at our documentation on Cache Performance Tuning for information on how to tune Confluence caches.
Antivirus Software
アンチウイルス ソフトウェアによって、Confluence のパフォーマンスは大幅に低下します。ハードディスクへのアクセスを遮断するウィルス対策ソフトウェアの場合は特に有害であり、Confluence でエラーを引き起こす可能性もあります。Confluence ホーム ディレクトリ、インデックス ディレクトリ、およびすべてのデータベース関連ディレクトリを無視するように、アンチウイルス ソフトウェアを設定する必要があります。
HTTP 圧縮の有効化
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.
Virtual Operating Systems
Virtual Environments such as VMWare can cause Confluence CPU to spike. Run Confluence on a native OS. See our List Of Supported Operating Systems.
パフォーマンスをテストする
You should try out all configuration changes on a demo system. Ideally, you should run and customize loadtests that simulate user behaviour. Learn about how to test performance issues using the Performance Testing Scripts.
アクセス ログ
You can find out which pages are slow and which users are accessing them by enabling Confluence's built-in access logging.
Built-in Profiler
You can identify the cause of page delays using Confluence's built-in profiler according to Troubleshooting Slow Performance Using Page Request Profiling.
Adjust Application Server Memory Settings
See Managing Application Server Memory Settings.
Use A Web Server
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 サーバー コネクション内のコネクション プーリングを有効にする必要があります。
Parallel GC
If you have multiple CPU's on your server, you can add -XX:+UseParallelOldGC to your JAVA_OPTS options. This will allow garbage collection of the Tenured Space to happen in parallel with the application and can boost performance and can reduce slow performance spikes. For more information, please refer to our detailed page on Garbage Collector Performance Issues, and Sun's summary of collectors.
Troubleshoot possible memory leaks
Some external plugins, usually ones that have been written a long time ago and that are not actively maintained anymore, have been reported to consume memory and never return it. Ultimately this can lead to a crash, but first this manifests as reduced performance. The Troubleshooting Confluence hanging or crashing guide is a good place to start. Some of the known causes listed there could result in performance issues short of a crash or hang.
Some 3rd-party plugins were not written to scale to large enterprises' needs
Confluence has been optimized to work under high load and with many pages. Some 3rd party plugins however have been written with small size companies in mind, and can't cope with large numbers of concurrent users, or large numbers of pages and permissions, or large numbers of spaces. It is impossible to tell which ones will fail under which conditions, but it will always help to turn off 3rd-party plugins that are not strictly mission-critical while investigating performance issues.
関連トピック
Garbage Collector Performance Issues
Cache Performance Tuning
Cache Performance Tuning for Specific Problems
Performance Testing Scripts
Working with Confluence Logs
Operating Large or Mission-Critical Confluence Installations
Confluence Clustering Overview
Requesting Performance Support
Administrators Guide
Configuration Guide