Enable profiling and access logging to diagnose acute performance problems
Purpose
If Bamboo is slow to render specific data (that is, Bamboo is performing normally otherwise) the development team will benefit if you enable detailed profiling to help guide us to the originating source code.
Solution
Enable profiling
Profiling logs a considerable amount of data so we recommend reverting this change as soon as you've performed the requested tests.
- Stop Bamboo.
- Edit
<Bamboo installation folder>/bin/setenv[.sh | .bat]
. - Find the section: JVM_SUPPORT_RECOMMENDED_ARGS=
- Append the following parameter and value:
-Datlassian.profile.activate=true
- Save the file.
- Start Bamboo.
For example:
2016-11-30 23:39:31,715 INFO [ajp-bio-127.0.0.1-8009-exec-4] [AccessLogFilter] drohan GET http://bamboo.drohan.com/chain/result/viewChainResult.action?planKey=SAN-BAM803&buildNumber=2440 10395092kb
2016-11-30 23:39:34,677 INFO [ajp-bio-127.0.0.1-8009-exec-4] [FreemarkerContext] Web panel chainresult.summary.right bamboo.deployments:chainResultBranchIntegrationDetails was being rendered for 2012ms
2016-11-30 23:39:34,775 DEBUG [ajp-bio-127.0.0.1-8009-exec-4] [UtilTimerStack] [2953ms] - com.atlassian.bamboo.ww2.interceptors.ChainAwareInterceptor.intercept
[4ms] - ChainAwareInterceptor.intercept()
[2949ms] - com.atlassian.bamboo.ww2.interceptors.ResultsSummaryAwareInteceptor.intercept
[2948ms] - com.atlassian.bamboo.ww2.interceptors.BuildResultsSummaryAwareInteceptor.intercept
[2948ms] - com.atlassian.bamboo.ww2.interceptors.NavigationAwareInterceptor.intercept
[2596ms] - com.atlassian.bamboo.ww2.interceptors.ResultsListAwareInterceptor.intercept
[2596ms] - com.atlassian.bamboo.ww2.interceptors.StatisticsAwareInterceptor.intercept
[2596ms] - com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.intercept
[2595ms] - com.atlassian.bamboo.ww2.interceptors.BambooXsrfTokenInterceptor.intercept
[2595ms] - com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.intercept
[2595ms] - com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.intercept
[2594ms] - com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.intercept
[0ms] - PaginationAwareInterceptor.intercept()
[102ms] - PlanAwareInterceptor.intercept()
[344ms] - com.atlassian.bamboo.ww2.interceptors.ChainAwareInterceptor.intercept
[0ms] - ChainAwareInterceptor.intercept()
[344ms] - com.atlassian.bamboo.ww2.interceptors.ResultsSummaryAwareInteceptor.intercept
[342ms] - com.atlassian.bamboo.ww2.interceptors.BuildResultsSummaryAwareInteceptor.intercept
[342ms] - com.atlassian.bamboo.ww2.interceptors.NavigationAwareInterceptor.intercept
[9ms] - com.atlassian.bamboo.ww2.interceptors.ResultsListAwareInterceptor.intercept
[9ms] - com.atlassian.bamboo.ww2.interceptors.StatisticsAwareInterceptor.intercept
[9ms] - com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.intercept
[7ms] - com.atlassian.bamboo.ww2.interceptors.BambooXsrfTokenInterceptor.intercept
[7ms] - com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.intercept
[7ms] - com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.intercept
[6ms] - com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.intercept
[0ms] - PaginationAwareInterceptor.intercept()
2016-11-30 23:39:35,718 DEBUG [ajp-bio-127.0.0.1-8009-exec-4] [UtilTimerStack] [820ms] - com.atlassian.bamboo.ww2.interceptors.ChainAwareInterceptor.intercept
[0ms] - ChainAwareInterceptor.intercept()
[820ms] - com.atlassian.bamboo.ww2.interceptors.ResultsSummaryAwareInteceptor.intercept
[820ms] - com.atlassian.bamboo.ww2.interceptors.BuildResultsSummaryAwareInteceptor.intercept
[820ms] - com.atlassian.bamboo.ww2.interceptors.NavigationAwareInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.ResultsListAwareInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.StatisticsAwareInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.BambooXsrfTokenInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.intercept
[1ms] - com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.intercept
[0ms] - com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.intercept
[0ms] - PaginationAwareInterceptor.intercept()
Enable access logging
Customized loggers don't persist past restarts so there is no need to revert this change but understand that your log files will fill up more quickly.
- Navigate: Administration > Log settings
- For Classpath, enter:
com.atlassian.bamboo.filter.AccessLogFilter
- For Type, select:
DEBUG
- Click the Add button.
For example:
Before
2016-11-30 23:39:31,715 INFO [ajp-bio-127.0.0.1-8009-exec-4] [AccessLogFilter] drohan GET http://bamboo.drohan.com/chain/result/viewChainResult.action?planKey=SAN-BAM803&buildNumber=2440 10395092kb
After
2016-11-30 23:39:31,715 INFO [ajp-bio-127.0.0.1-8009-exec-4] [AccessLogFilter] drohan GET http://bamboo.drohan.com/chain/result/viewChainResult.action?planKey=SAN-BAM803&buildNumber=2440 10395092kb
2016-11-30 23:39:35,776 DEBUG [ajp-bio-127.0.0.1-8009-exec-4] [AccessLogFilter] END: 200 drohan GET http://bamboo.drohan.com/chain/result/viewChainResult.action?planKey=SAN-BAM803&buildNumber=2440 10395092kb-583500kb 4062ms
Collecting the data
- Visit the page or action on the component that renders slowly.
- Take note and provide the URL.
- Generate and provide Support with the Support Zip (Administration > Support Tools > Create Support Zip (tab) and then click the Create button).