Return to doc.sitecore.com

  Database Administration
Prev Next

An unresponsive database server will result in an unresponsive Sitecore solution. Correctly configuring any type of caching will reduce the load on SQL Server. Sitecore’s design results in periodic peaks in resource requests but no increase in database connections. Assuming caching is well configured, the number of requests should be relatively low. When database load is high, check other databases hosted on the same configuration, custom and third-party code accessing SQL servers directly and ensure database connection pooling is properly configured on the server. To diagnose database connection issues follow these reccomended steps.

1.  Testing Database Performance

Testing Database Performance

The recommendation below is primarily addressed to Sql Server environments.

A fast database connection is an important prerequisite for a stable Sitecore environment. Although data is cached in memory, you will eventually end up with an empty cache, resulting in a read from the database on each Item request for the first requests to your web server. Imagine your website’s front page navigates through 8000 Items to render itself, and each read from the database takes 5ms. On that initial request to the front page, 40 seconds would be the smallest timeframe this request would take to execute. Meanwhile new incoming requests could pile up and overload the server.

So what is a fast connection, and how do we measure it?

You can download the test aspx code which allows to obtain the basic benchmark.

Downloads for Sitecore CMS version before 5.3 and for CMS 5.3

Specify in the aspx file, if you use Sitecore 4 or  Sitecore 5 version, how many reads you want to perform, and the connection string for your database. Default is 10000 reads.

Sample output for  Sitecore 4 test:

Test done, 10000 reads in: 7500,79972465599 milliseconds

Sample output for Sitecore 5 test:

Test done, 10000 reads in: 4923,05249413557 milliseconds

If your own measurements are significantly slower than this, you should keep this in mind if you experience performance problems. Could a firewall between your webserver and database explain the slow response times? Is the database server or network connection overloaded? One way or the other, you are better off knowing how your database performs.

SQL Server Required Permissions:
ALTER permission
CONTROL permission


Prev Next