Extract Report task takes 646220ms for an Analysis Report of 116.6 MB (too slow?)

  • Version: SonarQube CE (9.9.1.69595)

  • Deployment method: zip

  • Symptoms: The background task took 21 minutes but half of the time (10 min 46.22 seconds) was spent on the “Extract Report” task to uncompress an analysis report of 116.6 MB. As you can see in the sonarqube_ce logs below, the timestamp jumped from 2023.08.21 15:36:36 to 2023.08.21 15:47:21 and the logs indicated the time was spent on Analysis report is 116.6 MB uncompressed.

  • Question: Try to understand why extracting report could take up so much time and ways to improve the performance of the background tasks.

Any help is much appreciated. Thanks!


2023.08.21 15:36:35 INFO ce[][o.s.c.t.CeWorkerImpl] Execute task | project=FFM_sparta_AYdMzKGO1lkkK8u7rjt6:test_sparta | type=REPORT | id=AYoYvZd4eqMHzuGxc0OK | submitter=nicholas

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.a.ClassPathBeanDefinitionScanner] JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.a.ClassPathBeanDefinitionScanner] JSR-330 'javax.inject.Named' annotation found and supported for component scanning

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Searching for key 'spring.profiles.active' in PropertySource 'systemProperties'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Searching for key 'spring.profiles.active' in PropertySource 'systemEnvironment'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Could not find key 'spring.profiles.active' in any property source

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Searching for key 'spring.profiles.default' in PropertySource 'systemProperties'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Searching for key 'spring.profiles.default' in PropertySource 'systemEnvironment'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.e.PropertySourcesPropertyResolver] Could not find key 'spring.profiles.default' in any property source

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.a.AnnotationConfigApplicationContext] Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4ab1a536, started on Mon Aug 21 15:36:35 UTC 2023, parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@59af3db6

2023.08.21 15:36:35 DEBUG ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.p.PriorityBeanFactory] Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.p.PriorityBeanFactory] Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.p.PriorityBeanFactory] Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references

... MORE LOGS ...

2023.08.21 15:36:35 TRACE ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.p.PriorityBeanFactory] Finished creating instance of bean 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.ce.task.projectanalysis.step.ExtractReportStep'
**2023.08.21 15:36:36** TRACE ce[AYoYvZd4eqMHzuGxc0OK][sql] time=635ms | sql=SELECT input_data FROM ce_task_input WHERE task_uuid=? AND input_data IS NOT NULL | params=AYoYvZd4eqMHzuGxc0OK

**2023.08.21 15:47:21** DEBUG ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.t.p.s.ExtractReportStep] Analysis report is 116.6 MB uncompressed

**2023.08.21 15:47:21** INFO ce[AYoYvZd4eqMHzuGxc0OK][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=646220ms

1 Like

Hey there,

The unusually long time spent on the “Extract Report” task might be due to a few factors:

  1. Database Performance: Check the performance of the database backing your SonarQube instance. Network latency between your SonarQube server and the database can slow things down. If possible, have a database expert inspect this area.

  2. Zipping/Unzipping Issues: Something installed on your SonarQube server could be causing zipping or unzipping to be very slow. This could be security or antivirus software attempting to inspect the contents. If such software is running on your SonarQube server, excluding the SonarQube installation directory may alleviate the issue.

Here’s the code that describes what’s happening in this step just for reference.

1 Like

We found out our sonar.path.temp is set on an EFS volume. After changing it to the EBS where SonarQube is installed, we see a big time reduction from 22 minutes to 2.5 minutes.

Thanks to Colin and we really appreciated your help!

2 Likes

Thanks for the follow up! I honestly forgot that was configurable.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.