We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Why or when to defrag exchange?  Not how to defrag.

schwembley asked
Medium Priority
Last Modified: 2012-05-06
How does one know if exchange needs to have an offline defragment run?  I do not need to know how to defragment exchange or whether or not to do a file system defrag or an offline defrag.  I am just trying to determine if I NEED to do an offline defragmentation of exchange. Thank you.
Watch Question

check the event view for the result of online defrag, it will tell you how much white space in your store.
It is really a judgement call. I usually do it when I have a large deletion of mail or from the exchange store. I do it also when I delete users-mailboxes. Remember you need twice the size of the mail store plus about 10 percent to do the defrag. If you mail store is getting close to the limit could also be a good time to defrag.
Nitin GuptaSolutions & Presales

EnterpriseEdition Exchange 2003:, Then, the answer would be NEVER. It is a time consuming process and as the name suggests you need to keep your server database offline. Assuming that your Server has 100 GB DB, now to do a offline defrag, the time taken would be anywhere between 20-25 hours. All this while , all users cannot access their mails. Now an eaiser option is to create another DB and move mailboxes, this is a faster affair without any downtime.
Standard Edition Exchange 2003: Well if the Event ID 1221 in Event Viewer shows a lot of white space and you feel that time has come to reduce the space. Oterhwise generally I would never run it more than once in 6 months. In Standard you cannot have 2 or more DB, hence Mailbox movement using new DB is the solution and Offline Defrfag is required.
Exchangew 2007 - Well, not required at all, due to high availability solutions and multiple DB options
Hope this helps
Nitin Gupta (gupnit)
SurajSenior System Engineer

IT runs as per the settings :

open Exchagne sys manager--> go to properties of your Store --> Database tab

There you will find MAINTAINANCE INTERVAL...This is the time set for Defrag.... You can customise it ...
Hope that answers your Question

SurajSenior System Engineer

OOps i am sorry.. i take my comment back.. that was for Online maintenance...

I agree to gupnit. You need to plan it your self as per the database size...



gupnit - thank you for responding with 3 different version solutions!  I should have specified that I am running

Enterprise Edition Exchange 2003 to save you and others the trouble of having to wonder.

So I understand why you say to never run offline defrag but to move mailboxes instead.  That's fine.  I get it.  

But my question is still not answered so I will re-phrase it.  How does one know that the time has come to rid the

exchange db of fragmentation?  Or phrased alternately how does one know if an exchange db is fragmented severely

enough that defragmentation is in order?    

Now if I were to apply your answer for Standard Edition Exchange 2003 I would have two questions based on these

facts about my environment:

The 1221 event shows that the DB "has 2391 megabytes of free space after online defragmentation has terminated".  

The size of the edb file is 231 gig and the stm file is 50 gig. I think when you refer to white space you are

referring to the amount of free/writeable space within the DB (.edb), 2391 MB, or about 24 gig in my case, and you

are not referring to the amount of free space on the drive that holds these two files, which FYI is 260 gig.  So my

two questions of your response for Standard Edition are:

1) You said "Event Viewer shows a lot of white space and you feel that time has come to reduce the space". Why

would I want to reduce the amount of white space?  I thought defrag was meant to increase the white space.

2) If you move mailboxes to a new DB you will have a defragmented DB so Offline Defrag should NOT be required after

moving all mailboxes to a new DB, right?

Thanks again in advance for you patience and effort on this.
Solutions & Presales
Coming back to your points
  • "By default, Exchange databases run a defragmentation process daily. The defragmentation option makes used storage contiguous, eliminates unused storage, and compacts the database. This reduces the database's size. Eseutil copies database records to a new database. When defragmentation is complete, the original database is deleted or saved to a user-specified location, and the new version is renamed as the original. If the utility encounters a bad record, the utility stops and displays an error message" Source http://support.microsoft.com/kb/328804 (now read my lasst para)
  • Hope my first point answers your second question also. Once you have moved Mailboxes to new DB, Offline Defrag is not required.
Ok, not after seeing your response, I see another major issue. SOmeone might not agree, but I am talking from my experience of designing/supporting major MEssaging Setups [Ex: with more than 40K users across many locations]. You said 250GB is your DB size, well even though you have Enterprise Edition you are not utilizing it.
Recommended size of a DB is not more than 100GB, so pleasse create additonal DBs and maybe group users into different DB based upon - Department / Hierarchy / Location (your call), but this would ensure if one DB has an issue not all users are affected. In your curent scenario all users would be affected. Also backup/recovery time is more. With lower DBs you can also plan your Backup Window properly
Hope this helps
Nitin Gupta (gupnit)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Expert of the Quarter 2009
Expert of the Year 2009

Offline defrag - never - unless Exchange 2000 standard or Exchange 2003 SP1 or RTM.

A move to another store - if you have at least 40% of the store in white space, then it is something to consider. Based on the numbers you have provided above I wouldn't even consider doing any kind of data move, except for the design enhancements outlined above.



Thanks for your input gupnit.  I get it now.

Good thread here....
Quick question:  I have about 100 users all in a single storage group, which has 3 seperate stores.  when you guys are talking about moving mailboxes to anew database, are you referring to a new store?  Creating multiple stores for different departments or limits sounds like a REALLY cool idea, as my database is about 85GB and I'm scared to death of ever having to do a restore...
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.