This page last changed on Aug 07, 2008 by smaddox.

This page tells you how to enable page-request profiling. With profiling turned on, you will see a record of the time it takes (in milliseconds) to complete each action made on any Confluence page. If Confluence is responding slowly, an internal timing trace of the slow page request can help to identify the cause of the delay.

You will need access to the Confluence server to view a profile.

In this page:

Error formatting macro: toc: java.lang.NullPointerException

Enabling Page-Request Profiling

There are two ways to turn on profiling for your Confluence instance:

  • Append ?profile=on to the URL of any Confluence page.
  • Use the 'Logging and Profiling' option in the 'Administration Console'.

Both methods are described below.

Using a Page's URL to Enable/Disable Profiling

  1. Go to any page in your Confluence instance.
  2. Turn profiling on or off as follows:
    • To turn profiling on: In your browser address bar, change the URL by appending ?profile=on to the end of the URL for static pages, or &profile=on if the URL is dynamic and already has parameters.
      For example, if your Dashboard link is:
      http://localhost:8080/dashboard.action
      

      then you must manually add ?profile=on to the end of the URL:

      http://localhost:8080/dashboard.action?profile=on
      
    • To turn profiling off: In your browser address bar, change the URL by appending ?profile=off to the end of the URL for static pages, or &profile=off if the URL is dynamic and already has parameters.
      For example, if your Dashboard link is:
      http://localhost:8080/dashboard.action
      

      then you must manually add ?profile=off to the end of the URL:

      http://localhost:8080/dashboard.action?profile=off
      
  3. Press Enter.

Using the Administration Console to Enable/Disable Profiling

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

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.
    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.
    If profiling is already disabled, the button will be labelled 'Enable Profiling' instead.


Screenshot: Changing Log Levels and Profiling

Profiling an Activity

  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. Perform the activity that is resulting in unusually slow response time.
  4. Copy the profile for that action. When deciding which profiles to copy, look for the links that took a long time to respond. If a single page is slow, only that profile is necessary. If Confluence is generally or intermittently slow, copy all profiles logged during the slowdown until a reasonable sample has been collected.
  5. If you were instructed to profile your instance by Atlassian technical support, attach all relevant profiles to your support ticket.
  6. Turn profiling off again, using either of the methods described above.
  7. Confirm that profiles are no longer being printed to the Confluence log file.

Example of a Profile

Below are the first few lines of a normal profile for accessing a page called Confluence Overview.

[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())
           ...
RELATED TOPICS

Requesting Performance Support
Working with Confluence Logs


LogLevels.png (image/png)
Document generated by Confluence on Aug 07, 2008 19:05