Performance Tweaks for Large Systems
From SugarCRM Wiki
Here is a quick list of the high level performance tweaks. Many of these are OOB in 4.2.0x but several have been back ported to 4.0.x.
Contents |
Saving calls or meetings is slower than other operations
Problem: For some of my users, saving a Call or a Meeting takes a much longer time than all other operations on the system. Why?
Solution: By default, every time a save occurs for a Call or a Meeting, the Free/Busy information for associated users is rebuilt. This involves scanning the database for ALL calls and meetings for that user, and updating the vcals database table with all new information. If a user has thousands of calls/meetings, this can easily take as much as 30 seconds to complete.
Since this long delay is often unacceptable to users, you will need to determine whether or not users are relying on the Free/Busy functionality of Sugar. If your users are relying on the Free/Busy functionality, then the delay is something the users will have to live with (see related bug below).
However, if your users are NOT relying on the Free/Busy functionality, there is a simple workaround to put into place.
As of Sugar 5.2.0c, Sugar now provides a new setting, vCal Updates Time Period, in the Advanced section of the System Settings Page. Administrators can use this setting to specify the number of months in advance of the current date that Free/Busy information for calls and meetings is published. The minimum value is one month, and the maximum value is 12 months. To turn off Free/Busy publishing, enter “0”.
In versions prior to Sugar 5.2.0c, you can turn off the Free/Busy functionality by modifying the files modules/Calls/Call.php and modules/Meetings/Meeting.php. In those files there is a variable that looks like this:
var $update_vcal = true;
In both files, modify it to be:
var $update_vcal = false;
Your users should see an immediate and drastic improvement in the performance of saving Calls and Meetings.
Drop Absolute Totals From List Views
- Users see record count 1-20 of 21+ instead of 1-20 of 12984832.
- Most users don't care.
- Major improvement in DB performance
Make the configuration change in the config_override.php that resides in the same directory as your config.php file. If the config_override file does not exist, you should create it. Set the following configuration value:
$sugar_config['disable_count_query'] = true;
Disable DetailView VCR Control (4.2.1+)
- Removes the ability to page through records from the detail view.
- Very few users even know this functionality exists
- Removes the cost of a listview from the DetailView
Configuration change in config.php or config_override.php:
$sugar_config['disable_vcr'] = true;
Collapse Unused Sub-Panels
- Greatly decreases processing required to render the page.
- We don't retrieve information for hidden sub-panels. Users can expand them as they desire.
Configuration change in config.php or config_override.php:
// Always hide subpanels when a user views a detail record $sugar_config['hide_subpanels'] = true; //When a user first visits a detail view hide all subpanels for a module. Then whatever subpanels are opened in that module stay open throughout the session regardless of what the record id is. $sugar_config['hide_subpanels_on_login'] = true;
Don't Automatically Repeat Previous Query on List Views
- This change requires users to hit the search button or perform some other action for the list view to populate records.
- The results of the previous search may no longer be applicable to the current task.
- Unfiltered searches are really expensive and show the first 20 records of possibly millions.
Configuration change in config_override.php:
$sugar_config['save_query'] = 'populate_only';
Disable verification of client IP
$sugar_config["verify_client_ip"] = false;
This will prevent SugarCRM from trying to resolve your IP with every page refresh.
Use a PHP Session Cache
- Saving and loading sessions can take a lot of time. Storing the sessions in memory or on a RAM disk can definitely decrease some of the disk IO wait times in the application. Cluster aware PHP accelerators can store sessions in memory without loss of high availability.
See also
- Data generator for stress testing
