Best practices for EMS performance
Running the Kentico EMS on-line marketing functionality typically increases the performance requirements for websites with very heavy traffic. This page helps determine the hosting requirements for EMS projects and provides best practices for optimizing performance.
Project parameters and hosting requirements
Kentico EMS has been tested with the following on-line marketing parameters:
Total number of stored contacts: 100 million (108)
Total number of logged activities: 1 billion (109)
Used on-line marketing features:
- 10 condition-based contact groups
- 2 scores for evaluating contacts
- 2 personas
- 3 marketing automation processes (process triggers: 1 activity-based, 2 score-based)
- 2 running campaigns
Two different hosting configurations were tested with the following traffic loads:
Hosting configuration |
Page requests per second |
Concurrent visitors |
Load balanced web farm with 4 servers (Kentico instances)
|
1600 (800 from new contacts) |
25000 |
1 web server |
600 (300 from new contacts) |
9000 |
With the above traffic loads, the page load time was under 1 second for at least 95% of all live site web requests.
The following server specifications were used:
Web server |
|
Database server |
|
Important
- The specifications described above assume that the environment and Kentico instances follow all performance best practices.
- The hosting requirements may vary based on the used on-line marketing features and their configuration.
Higher parameters may be achievable with more powerful hosting configurations. In general, the following scaling recommendations apply:
- To increase the supported traffic load (requests per second, new contacts per second, concurrent visitors), increase the number of servers in the web farm.
- To increase the supported volume of on-line marketing data, increase the size and performance of the database server.
Performance best practices
To achieve optimal performance with Kentico EMS websites, follow the recommendations in the sections below.
Note: In addition to the instructions listed on this page, also follow the general performance best practices for all types of websites: Optimizing website performance
- Set up a web farm environment
- Separate the on-line marketing database
- Set up the SQL server
- Optimize database indexes
- Use JavaScript logging for analytics and activities
- Set up automatic deleting of contacts
- Disable event logging for automation and marketing emails
- Optimize scoring and contact group recalculation
Set up a web farm environment
You may need to host your website in a web farm with multiple servers to handle high traffic loads. To learn how to set up the web farm synchronization features in Kentico, see Configuring web farm servers.
When using a static web farm, you can optimize on-line marketing performance by having one designated server perform all recalculation of on-line marketing data (contact scores, contact groups, personas, marketing automation triggers).
To configure recalculation on only one designated web farm server, you need to disable the recalculation on all other servers. Set the CMSCreateContactActionsLogWorker web.config key to false in the appSettings section of the web.config file on all servers except for the selected recalculation server:
<add key="CMSCreateContactActionsLogWorker" value="false" />
Keep in mind that you must always leave recalculation enabled on one server.
Note: Using one server for recalculation improves the web farm’s overall performance, but you may experience longer delays between actions on the website and results in the administration interface (calculation of contacts scores, assignment of contacts to contact groups or personas, etc.).
Separate the on-line marketing database
Running the on-line marketing features on a high-traffic website places a significant load on the database server. To distribute the load of Kentico’s standard and on-line marketing functionality, separate your on-line marketing database to a second database server.
Set up the SQL server
If you have the option to administer the website’s database server, we recommend that you perform the following steps:
Optimize the database’s Log and Data files:
- Set a large initial size for the data file and disable Autogrowth
- Store the log and data files on different drives
- Store the SQL server error log files on the same drive as the main data file
- Store the server’s tempdb database to the same drive as the main data file
Enable the Lock Pages in Memory Option on the database server
Optimize database indexes
By default, the Kentico database tables have indexes optimized for the most common scenarios. However, each EMS website uses a different set of on-line marketing features, with different visitor behavior, and a unique distribution of data.
For optimal performance, we recommend that you regularly use a tool (for example the Database Engine Tuning Advisor) to analyze your database performance. Consider the suggestions and implement any database index adjustments that are suitable for your specific project.
Additionally, the default database indexes are optimized for live site performance, not for operations in the Kentico administration interface. With extremely large volumes of data (millions of records), you may encounter slow performance or timeouts in object lists – for example if you change the default list ordering or when filtering according to certain fields. You can address these problems by creating custom database indexes with the corresponding columns (note that this may have a negative impact on live site performance).
Optimizing Salesforce integration
The default Kentico indexes are optimized without considering the Salesforce integration. If you are using the Salesforce integration with a large number of contacts, we recommend that you optimize database operations by manually creating a database index with the following columns on the OM_Contact table:
- ContactSalesForceLeadID
- ContactSalesForceLeadReplicationDisabled
- ContactSalesForceLeadReplicationSuspensionDateTime
The index should be non-clustered and non-unique. See the Create Nonclustered Indexes article for more information.
Use JavaScript logging for analytics and activities
For optimal performance and data accuracy, make sure that JavaScript logging is enabled for web analytics and activities:
- Open the Settingsapplication in Kentico.
- Navigate to On-line marketing -> Web Analytics.
- Enable the Log via JavaScript snippet setting.
- Save the settings.
For more information, see Enabling web analytics.
Set up automatic deleting of contacts
The contact management features create contacts and log activities for every visitor, which generates a very large amount of data on high‑traffic websites. Extremely large numbers of stored contacts and activities may slow down certain operations in the system and be overwhelming for your marketers.
To reduce the volume of data, we recommend that you configure the system to regularly delete contacts that meet certain conditions and are no longer relevant.
Disable event logging for automation and marketing emails
To reduce system overhead on EMS instances with a very large number of contacts, we recommend that you disable event logging for the following actions:
- Transitions between steps of automation processes
- Sending of marketing emails (within email feeds)
Add the following keys to the appSettings section of the web.config file:
<add key="CMSLogMATransitions" value="false" />
<add key="CMSLogNewsletterIssueEvents" value="false" />
Optimize scoring and contact group recalculation
Recalculation of contact scores and contact groups can be a resource intensive process that may reduce website performance.
- When scheduling score recalculations and contact group rebuilds, avoid your website’s peak traffic hours.
- If you use custom macro rules in your scoring rules or contact group conditions, implement translators to significantly improve recalculation performance.