Article ID: 324358 - View products that this article applies to.
This article was previously published under Q324358
This article discusses some of the internal workings of the Microsoft Exchange Server information store maintenance interval and the online defragmentation period.
When a public or private Messaging Database (MDB) is started, a maintenance task is scheduled to run for that MDB.
When the maintenance task (also known as a thread) runs for the MDB, it exhibits the behavior that is described in the following sections.
Read maintenance scheduleExchange Server reads the maintenance schedule from the internal (in-store memory) MDB object if it is available, or from Active Directory if the MDB object is not available. The schedule uses one of the following styles:
If the schedule style is "Never," the maintenance task is skipped.
If the schedule style is "Selected," the program determines whether the maintenance task runs in the current 15-minute period. If not, the maintenance task is skipped.
If the maintenance schedule cannot be obtained, the default schedule of 12:00 midnight to 5:00 A.M. is used.
Determine maintenance task to performThe maintenance task (thread) next reads a table in the Extensible Storage Engine (ESE) database to determine the last maintenance subtask that was performed.
This value is used to determine which subtask is initiated first, and it makes sure that all of the maintenance subtasks are eventually run in a round-robin fashion. The following list describes the maintenance subtasks in the order in which they run:
More information about how the maintenance task to perform is determinedThe Extensible Storage Engine (ESE) database holds the information about when the last maintenance subtask was performed, and each IS maintenance subtask is performed only one time in a 24-hour period, with the default setting.
The time that is saved as the "last performed time" for each subtask is not always the same as the time of when the subtask is actually performed because the "last performed time" is calculated by adding the interval (default is 24 hours) to the current "last performed time."
For example, assume that the current "last performed time" for a subtask is 4/1/2010 2:00, and the next subtask is performed at 2:30 on 4/2/2010. When the subtask ends, the "last performed time" will be updated to "4/2/2010 2:00" (which results from adding 24 hours to 4/1/2010 2:00), not "4/2/2010 2:30."
Because of this behavior of updating the "last performed time," the subtask can be performed two times in a 24-hour period, depending on the IS maintenance schedule.
Example IS Maintenance Schedule
Monday through Thursday: 19:00 - 24:00
Saturday: 7:00 - 24:00
Sunday: 7:00 - 24:00
Event ID 1208 - "Starting the IS Maintenance tasks."
Perform maintenance subtasksA selected maintenance subtask is evaluated to determine whether it is appropriate to run at the current time. A subtask can start at any time during a specified maintenance window, but the subtask is not guaranteed to finish before the end of the maintenance window.
After a subtask is initiated, that subtask runs until it is complete. After a subtask is complete, the completed subtask is evaluated to determine whether it did the work that it was designed to do. For example, evaluation of the Purge Indices subtask will return a value of False if there were no indexes to clean up.
After a subtask is complete, the following event ID message is logged by the information store service:
Event ID 1210 - "The IS Maintenance task subtask name completed."The information store continues to operate on the next subtask unless that subtask is not scheduled to run in the current time interval or unless the service has completed all of the tasks one time during the current maintenance window.
When the last subtask is run for the current maintenance window, the maintenance subtask that is performed is saved to a table in the ESE database so that it can be read when maintenance is started again. Most tasks run only one time in a 24-hour period no matter how many information store maintenance intervals are scheduled.
Maintenance tasks endWhen the program determines that no more subtasks are scheduled for the current maintenance window, the following event ID message is logged by the information store service:
Event ID 1209 - "The IS Maintenance tasks completed."
Online defragmentationIf at least one subtask completed successfully and performed work that resulted in a database change, online defragmentation runs after information store maintenance is complete.
By default, online defragmentation runs for a minimum of 15 minutes and a maximum of 1 hour after the information store maintenance period.
To override the minimum time for Online Defragmentation, use the OLD Minimum RunTime registry value.
To override the length of time that online defragmentation can run beyond maintenance, use the OLD Completion Time registry value.
If the maintenance schedule style is not "Always," then a check is performed to see how long online defragmentation can run. The amount of time left in the maintenance window is determined and added to the OLD Completion Time value (by default, 1 hour). This accounts for situations where the last subtask runs a little longer than the configured maintenance schedule. If the calculated value is less than the OLD Minimum RunTime value, the calculated value is set to OLD Minimum RunTime.
After online defragmentation is complete, a store routine calculates the number of free megabytes left in the database and logs the following event ID message:
Event ID: 1221 - The database name has amount megabytes of free space after online defragmentation has terminated.
Note The free space that is reported in Event ID 1221 is only for the EDB file and does not include the free space for the STM file. Reference: http://technet.microsoft.com/en-us/library/aa996139(EXCHG.65).aspxAfter the online defragmentation process is complete, the next time period for maintenance to run is calculated and scheduled.
How to enable logging for a particular Exchange Server serviceTo enable logging for a particular Exchange Server service, follow these steps:
Contact us for more help
Connect with Answer Desk for expert help.