For performance matters, it is strongly recommended to have the database and the Sonar analyzer on the same network.
By default, Sonar is configured to run on any computer with a simple Java JRE. The first thing to do when installing an enterprise Sonar instance is to use a Java JDK and activate the server mode. Just uncomment the following parameter from conf/wrapper.conf :
To change the Java JVM used by the Sonar, simply edit conf/wrapper.conf and change the line
There are 2 well-known engines that can be used in MySQL : MyISAM and InnoDB. MyISAM is the older of the two engines and is being progressively replaced by InnoDB. InnoDB is clearly faster and scales better with Sonar when the number of projects under quality control increases.
If you have been an early adopter of Sonar, you probably have a series of table that are still using MyISAM. To improve performances, you should change the engine for all tables to InnoDB.
Once all Sonar tables are using the InnoDB engine, the first thing to do is allocate a maximum amount of RAM to your MySQL instance with the 'innodb_buffer_pool_size' parameter and give at least 15Mb to the 'query_cache_size' parameter. Read this article about "InnoDB Performance Optimization Basics" to get more information.