Adobe Connect Database Performance and Monitoring
Following SQL database performance best practices and monitoring the health of you Connect database will help to insure a responsive Connect server providing excellent end user experience.
It is best to always place the operating system, data and log directories on separate disk drives; this will result in improved performance. If you must put Connect on the same server as the DB (never a best practice but sometimes a practical necessity), you should ensure that the Connect installation and content directories are on a different disk drive than is the database data. The Temp DB should also be on a separate disk drive. Putting the SQL data on striped disks, provides a tuning benefit as well.
Be sure to aggressively re-index and update statistics. De-fragment the operating system data and log files on a regular schedule. Ensure that there is minimal latency between the Connect server and the SQL Server. Be wary of network maintenance and backups that can produce latency between the Connect server and the SQL server and be sure to avoid heavy Connect use during any such maintenance.
Make sure that the SQL server has plenty of RAM; the more RAM the better. Everything works much faster in memory. The more of the database that you can keep in memory the better off you will be. Only virtualize the DB server if absolutely required.While Connect runs fine on supported VMWare servers, the SQL database server is best run on a dedicated platform
With reference to the use of separate disks, here is a prioritized list of what should have its own disk:
- Operating System
- Adobe Connect (Separate Server if possible)
- SQL database
- Transaction logs
For best performance, set the initial size of the transaction log file based on estimated use. This avoids unnecessary fragmentation. The transaction log should be on a different drive than is your data file, temp database and operating system. Manually shrink the transaction log files based on monitoring. If you try to do this as a nightly or weekly job, you will end up with unnecessary fragmentation. De-fragment the transaction log file as necessary and consider putting transaction logs on striped disks. Ensure regular backups as transaction log backups empty the space inside the log file and prevent it from continuing to grow.
Manage the memory by setting the minimum server memory for SQL server. Remember to leave enough for the operating system and any other applications running on the server:
SQL Server uses the tempdb database as a working area for temporary tables, sorting, sub-queries etc.; the tempdb should be stored on its own drive away from other DBs whenever possible. The default location is on the SQL install disk. Increase the size of the tempdb database based on expected usage and available space. SQL Server automatically adjusts the size over time, but each change causes a performance hit and causes fragmentation. By increasing the size, you avoid constant growth. SQL 2008 uses the tempdb more than prior versions of SQL. Never try to backup the tempdb.
Monitor the disk space of the data files and log files. Disk space is inexpensive when compared with the benefits it provides when available in abundance. You should aim to keep at least 30% free disk space in case you need to expand the data/log files, or if they are set to autogrow. Sudden increases in size should be cause for investigation.
Monitor the fragmentation levels. If the database and log were set to autogrow at small intervals, there is a high likelihood that they are fragmented. If you regularly shrink the DB data files or log files, that could also lead to fragmentation
Monitor for slow queries; you can see slow queries in the Connect debug log. Just search for Slow Query. Query times are returned in msec. Also look for lock timeouts in the debug log. Generally this is a sign of database problems. A lock timeout is a query that attempts to get a lock on a database resource. It times out because something else is already holding a lock. A lock is usually held until the transaction has completed, so if there is a long running query it could cause lock timeouts. You can also run traces against the database to gather information on long running queries. In SQL 2008 you can query dynamic management views to get this information.
Monitor indexes liberally keeping in mind that re-indexing regularly should decrease the need to monitor indexes. Sometimes re-indexing may start taking too long to complete and you will want to be more selective about what to target. Knowing which tables or indices are most fragmented allows you to only re-index them. You can query dynamic management views in SQL Server to get this information (see SQL Server books online). Many 3rd party products offer monitoring of SQL server and you might consider these products if you want a more automated GUI interface to monitoring indexes. Some of the products offer monitoring for other areas of SQL Server as well.
Windows performance monitor or perfmon is useful; you can use perfmon to monitor SQL counters. Here are 3 common counters which, if they reveal something will warrant further scrutiny.
- Pages/sec – How much your SQL server is paging in and out of memory
- Disk Queues – If the write or read disk queues are too high, you will need more RAM
- CPU Queue length – If the CPU queue is consistently over 2 per CPU for an extended period of time, you might have a CPU bottleneck.
Be aware of load and activity when monitoring with perfmon as database backups and other maintenance activities can cause spikes in these numbers. It is best to connect to the server from a different PC if you intend to monitor it with perfmon.
A good maintenance plan will include scheduled re indexing during off hours. Fragmented indices can cause Connect to become sluggish and might even cause fast-fails in a Connect cluster. If you start to see a lot of slow queries in the debug log, you should ensure that the Connect DB is being re-indexed regularly: Index maintenance is one of the easiest ways to keep your DB healthy and SQL Server provides wizards that help make index maintenance easy.
Open SQL Server Management Studio and open the management folder.
- Right Click on the Maintenance Folder
- Choose Maintenance Wizard
Give the Maintenance plan a name:
Choose the desired maintenance tasks: Rebuild Index & Update Statistics
Choose the Database you want to re-index:
Reorganize with the default amount of free space; the default amount is what it was initially created with.
Choose the same database to update statistics after you re-index.
Schedule a job to run the maintenance plan; provide a name and choose a schedule that suits your infrastructure:
Database performance and monitoring best practices will insure a responsive Connect server providing excellent end user experience.