The default Exchange maintenance schedule allows it to perform maintenance
on all stores from midnight to 4:00 A.M. nightly. If you want to change the
maintenance schedule, you can do so by opening Exchange System Manager (ESM)
and navigating through the console tree to Administrative Groups, your administrative
group, Servers, your server, your storage group, your store.
Right-click the store for which you want to make the adjustment, and select
Properties from the context menu. Select the Database tab, as Figure
1 shows. The Database tab contains a Maintenance interval drop-down list
from which you can select a four-hour block of time to use as the IS's daily
(or nightly) maintenance period.
Although you can use the Maintenance interval drop-down list to specify a store's
maintenance period, you aren't limited to the choices presented on the menu.
You can click the Customize button to create a custom maintenance schedule for
the store. When you do, you'll see a scheduling box, such as the one Figure
2 shows. I strongly recommend that you set the maintenance schedule to allow
for at least four hours of maintenance a day, but you do have the option of
skipping days or of performing maintenance for shorter or longer periods of
time. If you're considering skimping on maintenance, just keep in mind that
the maintenance tasks are designed to keep the IS running at peak efficiency
and to prevent corruption. Skimping on maintenance increases your chances of
experiencing performance problems or corruption within the IS.
Customizing Online Defragmentation
As you can see, it's quite easy to control when Exchange performs maintenance
on a store. With a few registry tweaks, you can also control how and when online
defragmentation occurs.
As I said earlier, as long as at least one task has completed, online defragmentation
will begin 15 minutes before the maintenance period is set to expire and will
continue to run for up to one hour after the maintenance period expires. However,
you can modify the registry to allow online defragmentation to run for a longer
period of time or to adjust the schedule so that it doesn't interfere with a
backup.
The location that contains the registry keys that control automated online
defragmentation varies slightly, depending on whether you're referencing a private
store (i.e., a mailbox store) or a public store (i.e., a public folder store).
If you want to modify the way that online defragmentation runs against a private
store, you use the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\servername\Private
-GUID subkey, where servername is the name of your server, and GUID
is the store's globally unique identifier (GUID). If you want to modify
the online defragmentation settings for a public store, you'll use the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSEx
changeIS\servername\ Public -GUID subkey. Figure
3 shows the registry locations that control the behavior of online defragmentation.
The first trick that I want to show you is how to adjust the amount of time
to be used for online defragmentation at the end of a maintenance period. To
do so, create a REG_DWORD value named OLD Minimum RunTime for either of the
subkeys listed above, depending on which store you want to change. Assign the
subkey a value that reflects the number of minutes that you want to dedicate
to online defragmentation at the end of the maintenance cycle.
The second registry tweak that you can use to control the online defragmentation
task involves creating a REG_DWORD value named OLD Completion Time. This value
controls how long the online defragmentation process will run after the maintenance
period has expired (the default is one hour). The value that you assign to this
subkey should reflect the number of additional seconds that the online defragmentation
process should run (3600 seconds equals one hour). Note that if you change these
values, Exchange Server Best Practices Analyzer (ExBPA) will flag your configuration and display a nondefault configuration
message. (For more information, see the Microsoft article "OLD Minimum RunTime
for a public folder store is non-default" at http://www.microsoft.com/technet/prodtechnol/exchange/analyzer/5ba05346-788c-4d16-8f0f-d6631e418a83.mspx?mfr=true.)
Cleaning Up Deleted Mailboxes
Now that you know how to customize the maintenance schedule and online defragmentation
process, I'll show you some adjustments that you can make to some of the other
maintenance tasks (not all maintenance tasks are configurable).