Exchange Server databases require regularly scheduled maintenance to keep them functioning at peak performance. This maintenance includes tasks such as getting rid of deleted mailboxes, cleaning up public folders, and defragmenting the database. Exchange Server 2003 performs these and other maintenance tasks automatically. Even so, it's important to have a good understanding of how this automated maintenance process works so that you can have more control over when and how the server carries out these tasks to optimize the process for your environment.
Exchange Server Maintenance Tasks
Exchange 2003 performs 11 tasks as part of its automated database maintenance
schedule. Those tasks are:
- Clearing the indexes on the mailbox and public folder stores.
- Performing tombstone maintenance on mailboxes and public folders.
- Removing expired messages from the dumpster for the mailbox and public folder
stores.
- Removing expired messages from public folders.
- Removing deleted public folders with tombstones more than 180 days old.
- Resolving message conflicts within public folders.
- Updating server-version information on public folders.
- Checking for and removing duplicate site folders on public folder stores.
- Removing deleted mailboxes on mailbox stores.
- Checking the message table for orphaned messages (messages with a reference
count of 0).
- Performing an online defragmentation of the Exchange Information Store (IS).
As you can imagine, performing all 11 tasks against an Exchange store can take
quite a while, depending on the size of the database and the condition that
the database is in at the beginning of the maintenance cycle. The problem is
that Exchange must perform the maintenance tasks while causing the least possible
impact on users. In most cases, this means performing the maintenance tasks
at night, and doing so in a way that doesn't interfere with the nightly backup.
This usually doesn't leave a lot of free time for IS maintenance.
Because time limitations might prevent all the maintenance tasks from running
on a nightly basis, Exchange performs the tasks in a prioritized manner according
to which tasks have run most recently and which tasks are most important. Fortunately,
the priorities are simple. The first 10 tasks on the list have equal priorities.
However, the 11th task (performing an online defragmentation of the IS) is considered
more important than the other 10 tasks.
The first time that the Exchange maintenance cycle runs, it begins with the first task on the list and works through as many of the other tasks, in the order listed, as time allows. If the maintenance period reaches the point where only 15 minutes remain and not all the tasks have been completed, then Exchange must make a decision. If Exchange has spent the entire maintenance period on one task, and that task hasn't finished running, then Exchange will continue to spend the remainder of the maintenance period on that task. However, if at least one task has finished, Exchange makes note of that last completed task, aborts the current maintenance task, and begins an online defragmentation. Because Exchange considers an online defragmentation to be more important than the other maintenance tasks, it allows the defragmentation to run for as long as an hour after the maintenance period has expired.
The next time that Exchange encounters a scheduled maintenance period, it checks to see which task was the last one to successfully finish (not counting the online defragmentation). Exchange then launches the next task on the list. By not restarting at the beginning of the task list each night, Exchange is able to guarantee that each maintenance task runs occasionally.
Adjusting the Maintenance Period
Before I show you how to modify the maintenance schedule for your stores, you
need to know two things. First, maintenance is performed at the IS level. This
means that if your Exchange implementation contains multiple stores, you'll
need to schedule maintenance independently for each store. Second, IS maintenance
is very resource intensive. It consumes a lot of disk space and CPU time. You
need to take this into account when scheduling maintenance. If the maintenance
cycle were to run during the nightly backup, the maintenance cycle and the backup
would both be competing for disk resources, greatly slowing both processes.
You probably have a good idea of when the periods of peak activity are for
your server and when the backup starts and finishes each night. Ideally, you'll
want to schedule maintenance around these times. For example, if you know that
your users start logging on around 7:30 A.M. and that almost everybody has gone
home by 6:00 P.M., and your backup is set to run at 11:00 P.M., then you could
schedule maintenance to run from 6:30 to 10:30 each night.
As you plan your maintenance schedule, keep in mind what I said about maintenance
being resource intensive and that it's performed at the IS level. If your Exchange
Server has multiple stores, you should configure the maintenance to occur at
different times for each store, although this isn't always practical if your
server has a large number of stores.
wooway December 08, 2006 (Article Rating: