Monday, 19 November 2012

Exchange Database Size and White Space - Part 1

A question that is often asked on the TechNet Forums and elsewhere:

 "I've moved/deleted mailboxes out of a database so why has the size stayed the same?"

The answer is straightforward: the size of an Exchange database file (.EDB) can only be reduced by running an offline defrag - eseutil /d.

However there are a few conditions and caveats which can sometimes make the situation a little more complicated:

  1. Unless you have a critical need for disk space you should not run an offline defrag as it may impact the performance of the database - this process should never be part of normal system maintenance.
  2. You need free disk space equivalent to 110% of the size of the used space in the EDB file. Used space is calculated by subtracting the amount of white space from the size of the database.
  3. The defrag may not reduce the EDB file by the amount you were expecting it to which could be due to a lack of white space in the database.
  4. The database will be offline during the defrag which could take several hours to complete.

In light of those points there must be a better solution - there is!  Create a new database, move all of the mailboxes over to it and then delete the original database.

This option has low user impact for Exchange 2003/2007 mailboxes and the impact reduces to negligible in 2010 and zero in 2013.   Additionally it needs 10% less disk space than a defrag but the whole process does take a bit longer.

There is third even lower impact option which is often overlooked ... just leave it alone.  Unless your database is so large that it has become unsupportable, it would take too long to restore for example, then  the normal operation of Exchange will use up the white space over time.

To summarise, an offline defrag should be the option of last resort and doing nothing is normally the best approach to handling large amounts of white space in a database.

No comments:

Post a comment