ページ リクエスト プロファイリングを使用してパフォーマンス低下をトラブルシューティングする

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

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

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

tip/resting Created with Sketch.

遅いマクロの実行をただ確認するには、「遅いマクロの実行の特定」を参照します。

 

(info)プロファイリングを有効化または無効化するためにはシステム管理者権限が必要です。

ページ プロファイリングを有効化する方法:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration
  2. 左側のパネルの「ログとプロファイルの作成」を選択します。
  3. The 'Logging and Profiling' screen appears. Choose 'Enable Profiling'.
    (info) If profiling is already enabled, the button will be labelled 'Disable Profiling'.

ページ プロファイリングを無効化する方法:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration
  2. 左側のパネルの「ログとプロファイルの作成」を選択します。
  3. The 'Logging and Profiling' screen appears. Choose 'Disable Profiling'.
    (info) If profiling is already disabled, the button will be labelled 'Enable Profiling'.

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

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

  1. 上記のメソッドのいずれかを使用して、プロファイリングを有効化します。
    すべてのページ ヒット、すべてのユーザーに対するプロファイルは、Confluence が再起動されるまで、アプリケーション サーバーのデフォルト ログに記録されるようになります。ユーザがリンクを訪れる度、1つのプロファイルが出力されることに注意してください。
  2. プロファイルが Confluence ログ ファイルに記載されることを確認します。 — ログファイルの場所とその他の詳細については、「Confluence ログを使用する」を参照してください。
  3. 異常に応答時間が遅いアクティビティを実行します。
  4. そのアクションについてのプロファイルをコピーします。コピーするプロファイルを決定したら、応答にかかる時間が長いリンクを探します。1つのページが遅い場合、そのプロファイルのみが必要です。Confluence が全体的または断続的に遅い場合、妥当なサンプルが集まるまで、遅くなっている間に記録されたすべてのプロファイルをコピーします。
  5. アトラシアンのテクニカル サポートからインスタンスをプロファイリングするように指示された場合は、関連するすべてのプロファイルをサポート チケットに添付してください。
  6. 上記の方法のいずれかを使用して、再度プロファイリングをオフにします。
  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())
           ...

(info) インデントされた各行は、親の行にロール アップする再帰呼び出しであることに注意してください。この例では、Confluence の概要ページに 344ms かかっています。その一部の 313ms は sitemesh にかかっています。 

プロファイルを有効化して 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 に戻すことを忘れると、ログが非常に大きくなります。

最終更新日: 2015 年 12 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する

このセクションの項目

Powered by Confluence and Scroll Viewport.