Recipe6.15.Controlling the Online Maintenance Process


Recipe 6.15. Controlling the Online Maintenance Process

Problem

You want to change the schedule for Exchange Server's scheduled maintenance processes.

Solution

Using a graphical user interface

  1. Launch the Exchange System Manager (Exchange System Manager.msc).

  2. In the left pane, expand the appropriate Administrative Groups container, and then expand the Servers container.

  3. Locate the public folder or mailbox store for which you wish to control maintenance intervals.

  4. Right-click the store object and select Properties.

  5. Select the Database tab.

  6. Select one of the predefined Maintenance Intervals or click Customize to select your own schedule.

  7. Click OK.

Discussion

As with most other databases, the ESE holds on to space once it's allocated and reuses it internally instead of returning it to the filesystem. For example, if you create 50 10 MB Word documents and delete 20 of them, you'll regain 200 MB (20 * 10) of space. If your Exchange stores grow to 24 GB and you delete 1.5 GB worth of mailbox data, the stores will still take up 24 GB on disk, but Exchange will be able to recycle the 1.5 GB of free space within the database. The Exchange databases are like a balloon with a one-way valve attachedyou can blow it up bigger and bigger, but it doesn't normally get any smaller unless you do something purposeful to let some air out. Online maintenance performs several tasks to optimize the ways in which this whitespace is reused. These tasks include:


Defragmentation

Over time, your Exchange database files will become fragmented. This fragmentation is internal; as transactions occur, the contents of the database file itself are split into little islands of free space. Since the database must index each message component, along with the free space chunks, fragmentation slows down database performance. The more fragmented the store files become, the bigger the performance hit.

The IS automatically defragments its databases. This process, known as online defragmentation, is a scheduled maintenance task that runs nightly, or whenever else you schedule it. During an online defragmentation, the IS service shuffles data in the private and public databases to minimize fragmentation and keep mailbox and public folder stores in contiguous blocks wherever possible.

You can also use the eseutil tool to do an offline defragmentation, as described in Recipe Recipe 6.16. The difference is that during an offline defragmentation, the IS service must be stopped, and eseutil can do a more thorough job of defragmenting and recovering space. Offline defragmentations can actually shrink the size of the database files to match the actual size of the data in them; they return the unused space to the filesystem. Contrast this with online defragmentations, which move data around but don't shrink the database size. The offline defragmentation process actually creates a temporary database and moves data from the original database to the new one, defragmenting and compacting as it goes. When the defragmentation is done, the new database replaces the old one.

The scheduled online defragmentation process will do its thing unobtrusively, and in most cases, you won't need to run an offline defragmentation. However, there are times when you might want to force Exchange to defragment the database more thoroughly. For example, let's say you've just moved two hundred users from one server to another, and you want to reclaim the space those two hundred mailboxes were taking up on the old server, instead of waiting for the private IS to grow into the space. You'll need to run an offline defragmentation to regain the space.


Compaction

Exchange will automatically compact database entries, removing deleted items and periodically sweeping away expired public folders and views. This process is akin to opening a filing cabinet and removing any outdated or unnecessary files; it doesn't increase the total amount of filing space, but it does increase the amount you can actually use. Exchange's compaction process attempts to consolidate partially full pages into a smaller number of completely full pages. This consolidation speeds reading and writing to the database as transactions arrive.


Automatic maintenance tasks

Because the public and private stores are integral to Exchange's operation, you probably won't be surprised to see all the background maintenance tasks that take place. These tasks primarily do housekeeping, cleaning out expired data and flushing data from caches into the database. (We've already discussed the lazy commit system in the Introduction, which isn't really a maintenance task anyway.) Tasks fall into two categories: those that run according to the schedule set on the Database tab of the server properties dialog box (see Table 6-1) and those that run either when Exchange needs them or when a separate schedule fires (see Table 6-2).

Table 6-1. Tasks that run during scheduled database maintenance

Task

When it runs

What it does

Index aging

Controlled by registry values described in MS KB 159197

Clients can create custom views, each of which is stored as an index in the database. Once these indices hit a certain age without being used, Exchange purges them to free up table space.

Tombstone aging

Every 24 hours

Deleted public folders and mailboxes are marked with a "tombstone." This indicates that the marked item no longer exists and shouldn't be replicated. After the tombstone reaches a certain age, it's removed to keep the tombstone list from growing infinitely large.

Tombstone maintenance

Every 24 hours

This task compacts deleted items and replaces them with tombstones, which are then aged.

Public store expiration

Minimum of every 24 hours, unless overridden

Public folders may have a message age limit. Messages older than this limit are deleted as part of the maintenance process.

Public store version updates

Every 24 hours

Each server stores the version of Exchange that it's running in its directory; this allows any two servers to agree on a common schema and feature set. Once per day, the IS maintenance task updates this version number to reflect any changes to Exchange.


Table 6-2. Other automatic maintenance tasks

Task

When it runs

What it does

Background cleanup

Controlled by the BackgroundCleanup registry values (see MS KB 159306)

Reclaims empty space formerly used by deleted items. Space is marked as unused and can be moved or reallocated by the compaction task.

Storage warning notification

Every four hours (by default), or using schedule you set

Checks each mailbox or public folder in a store, sending "you're using too much storage" warnings to users who are over their assigned quotas.

Database grooming

Main task runs every 10 minutes; each grooming subtask has its own scheduled interval

Reloads and reapplies storage and per-user quotas from Active Directory and Exchange system policy objects.

Database compaction

Nightly at 1 a.m., unless changed

Moves all unused and reclaimed space to the end of the database.


See Also

Recipe 6.16 for adjusting the online maintenance schedule as part of shrinking the database, and MS KB 159306 (XADM: IS Maintenance Tasks Not on IS Schedule), MS KB 159197 (XADM: Controlling Folder Index Aging)



Exchange Server Cookbook
Exchange Server Cookbook: For Exchange Server 2003 and Exchange 2000 Server
ISBN: 0596007175
EAN: 2147483647
Year: 2006
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net