SuiteCRM 8.3 is a very powerful tool. Next to managing contracts, support cases and a knowledge base, it is very easy to expand. It has one major problem though, it is insanly slow in a php default configuration.
PHP Optimization
Step one is of course optimizing PHP, enabling opcache alone lead to a gain of about one third in speed. Besides that installing suggested php-extensions brought about another one-sixth performance gain.
max_execution_time = 0
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
[opcache]
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=5
Caching
By default SuiteCRM uses file system caching. Exchanging that for memcached by updating the configuration led to nearly 40% load time reductions. Keep in mind, that the cache was on an SSD already, so it was not that slow technically.
$sugar_config['developerMode'] = false;
$sugar_config['list_max_entries_per_page'] = '10';
$sugar_config['logger']['level'] = 'fatal';
$sugar_config['disable_vcr'] = true;
$sugar_config['disable_count_query'] = true;
$sugar_config['verify_client_ip'] = false;
$sugar_config['external_cache']['memcache']['host'] = '127.0.0.1';
$sugar_config['external_cache']['memcache']['port'] = '11211';
Database
We are using a few custom modules and have the default modules adjusted to match our needs. The reduction in fields to show and the addition of indexes brought another small speed improvement, but one that is, due to lack of records, not as big as expected.
Logging
SuteCRM logs a lot, a lot of Warnings, Notices and Deprecations. It logs that much, that reducing the logging level to Error brought about 15% higher speed on all load times.
Existing tipps
I found the existing tipps, that SuiteCRM provides not that helpful. Their benefit was in the single digit percentages and not as big as some of the harder to find solutions like using memcached. I hope, that with this blogpost we are helping to solve that a bit.