このページでは、ページ リクエスト プロファイリングを有効にする方法を紹介します。プロファイリングがオンの場合、Confluence ページで実行される各操作の完了にかかる時間(ミリ秒)のレコードが表示されます。Confluence の応答が遅い場合、遅延の原因を特定するのに遅いページ リクエストの内部タイミング トレースが役立ちます。

Confluence サーバーにアクセスし、プロファイルを表示する必要があります。

In this page:

ページリクエスト プロファイリングの有効化

To see just the slow performing macros, see Identifying Slow Performing Macros.

From Confluence 2.7, you can use the 'Logging and Profiling' option to enable or disable profiling.

(info) You need to have System Administrator permissions in order to perform this function.

To enable page profiling,

  1. Go to the 'Administration Console' and click 'Logging and Profiling' in the 'Administration' section of the left-hand panel.
  2. The 'Logging and Profiling' screen appears. Click the 'Enable Profiling' button.
    (info) If profiling is already enabled, the button will be labelled 'Disable Profiling' instead.

To disable page profiling,

  1. Go to the 'Administration Console' and click 'Logging and Profiling' in the 'Administration' section of the left-hand panel.
  2. The 'Logging and Profiling' screen appears. Click the 'Disable Profiling' button.
    (info) If profiling is already disabled, the button will be labelled 'Enable Profiling' instead.


スクリーンショット: ログレベルの変更とプロファイル作成

アクティビティのプロファイリング

  1. Enable profiling, using either of the methods described above.
    Profiles for every page hit, for all users, will now be logged to your application server's default logs until Confluence is restarted. Note that each time a user visits a link, a single profile is printed.
  2. Confirm that profiles are being written to the Confluence log file — see Working with Confluence Logs for location of the log files and other details.
  3. 異常に応答時間が遅いアクティビティを実行します。
  4. そのアクションについてのプロファイルをコピーします。コピーするプロファイルを決定したら、応答にかかる時間が長いリンクを探します。1つのページが遅い場合、そのプロファイルのみが必要です。Confluence が全体的または断続的に遅い場合、妥当なサンプルが集まるまで、遅くなっている間に記録されたすべてのプロファイルをコピーします。
  5. アトラシアンのテクニカル サポートからインスタンスをプロファイリングするように指示された場合は、関連するすべてのプロファイルをサポート チケットに添付してください。
  6. Turn profiling off again, using either of the methods described above.
  7. プロファイルが Confluence ログ ファイルに出力されなくなったことを確認します。

プロファイルの例

以下は Confluence の概要と呼ばれるページにアクセスするための通常のプロファイルの最初の数行です。

[344ms] - /display/ds/Confluence+Overview
  [313ms] - SiteMesh: parsePage: http://localhost:8080/display/ds/Confluence+Overview
    [313ms] - XW Interceptor: Before defaultStack: /pages/viewpage.action (ViewPageAction.execute())
      [0ms] - SpaceAwareInterceptor.intercept()
      [16ms] - PageAwareInterceptor.intercept()
        [0ms] - AOP: PageManager.getPage()
        [16ms] - AOP: PermissionManager.hasPermission()
          [0ms] - AOP: SpacePermissionManager.hasPermission()
          [16ms] - AOP: SpacePermissionManager.hasPermission()
        [0ms] - AOP: SpacePermissionManager.hasPermission()
      [0ms] - AOP: SpacePermissionManager.hasPermission()
      [281ms] - XW Interceptor: After defaultStack: /pages/viewpage.action (ViewPageAction.execute())
        [281ms] - XW Interceptor: After validatingStack: /pages/viewpage.action (ViewPageAction.execute())
           ...

プロファイルを有効化して Confluence を起動する

起動時に Confluence プロファイリングを有効にするための解決策がいくつかあります。頻繁に再起動したり、サポート/トラブルシューティング目的の場合にプロファイリングを有効にするのを忘れたりした場合に、これが役に立つ場合があります。

Edit the file CONFLUENCE_HOME\confluence\WEB-INF\web.xml. You should see a stanza similar to the one below. Set the parameter value for autostart to true:

    <filter>
        <filter-name>profiling</filter-name>
        <filter-class>com.atlassian.core.filters.ProfilingAndErrorFilter</filter-class>
        <init-param>
            <!-- specify the which HTTP parameter to use to turn the filter on or off -->
            <!-- if not specified - defaults to "profile.filter" -->
            <param-name>activate.param</param-name>
            <param-value>profile</param-value>
        </init-param>
        <init-param>
            <!-- specify the whether to start the filter automatically -->
            <!-- if not specified - defaults to "true" -->
            <param-name>autostart</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>

これを false に戻すことを忘れると、ログが非常に大きくなります。

関連トピック

Requesting Performance Support
Working with Confluence Logs