Sonarqube is very slow after upgrade to 8.4.1

we are using community edition upgraded sonarqube from 7.7 version to 8.4
It is a java project with 730k LOC , using sonar scanner 4.5 version for jenkins.
Database is postgres 10.11 version.Java code analyser version is 6.5.1, the analysis time is 10-12 hrs.

Previously when we are using 7.7 the scan was completed in 2 hours.

Tried the full vacuum on postgres and reindexing of elastic search but no luck

Executed in Virtual machine (16GB) OS : Oracle Linux

Kindly suggest memory options to improve the performance (t