Icon explained    
Articles marked with this logo are 'subscriber' only articles. Click here to become a subscriber
Small Business Server articles and howto's    

Current Articles | Search

Do I need to defrag the drives in my server?
By Mariette Knap :: 1 Comments :: :: Exchange Server 2000, Server issues, SBS 2003, SBS 2000, Public articles
TERMS
This document and what comes with it are provided as-is with blunt warning: Use at your own risk, buyer beware. You break your system; you own the resolution as well. We have no liability for what you do, or can't do, or fail to do with this information. Your entire protection is to start over again with a protected backup, or from protected system. If you don't want to accept this idea, please don't use this document.

You can defrag:

  • The file system on your server using Diskeeper for Windows 2000 Server. Executive Software (the maker of Diskeeper) claims significant performance increase when you regularly use Diskeeper. Well, I don't see that. I have some servers running for years without a defrag but other claimed improved performance.
  • Exchange by using eseutil. This should only be done when you have deleted a lot of mailboxes or public folder items. I do this for maintenance reasons once a year.

There are two things to consider when you want to do a file defragmentation of your drives:

  • Never try to defrag your Exchange databases using a program like Diskeeper. Those are normally placed in C:\Program Files\Exchsrvr\MDBDATA directory. If you have moved them to another location you should excluded this folder in your favorite defragmentation software.
  • Never try to defrag the M: drive using a program like Diskeeper. Exclude the M: drive in your favorite defragmentation software

If you have deleted a lot of email messages or other stuff that is stored in Exchange you can do an offline defrag of the Exchange databases using the esutil tool from the Exchange bin folder. More information on how to use eseutil: 192185 - XADM How to Defragment with the Eseutil Utility (Eseutil.exe)

Before you can do an offline defrag of your Mailbox Store and Public Folder Store. In the picture below I dismount the Mailbox Store. If you do this when users are connected to Exchange they will loose the connection and maybe even data. An offline defrag can take from several minutes to several hours or even a day. I once did a defrag of a 36 Gb Mailstore and that took more then 13 hours to complete! A defrag of the stores with eseutil defrags the internal file structure of the stores and will shrink the total 'on disk size' of the stores when you have deleted many items in Outlook. It does not do a file based defrag.

In the C:\Program Files\Exchsrvr\MDBDATA you will see a lot of files:

The file you will defrag with eseutil are priv1.edb and pub1.edb. If you type eseutil /? you will get an explanation of the several command line options. For a defrag I choose eseutil /d priv1.mdb. Below you see a picture with the eseutil output after running the command.

Before the users can use Outlook and connect to Exchange you have to mount the store(s) again:


Comments
By Anonymous User @ Wednesday, March 15, 2006 3:03 AM
Hello. I am the Product Manger for Diskeeper and would like to add a couple comments here. I am biased of course, but do have experience on the matter of "disk/file" defrag.

Diskeeper and other API-compliant defragmenters can safely process live/active databases. Defrag products call API's built into the OS and integrated with the I/O Manager. File System controls actually move the file, not the third party product. I would agree that using the built-in defragmenter on a live DB would cause Exchange slows, but advanced third party products such as Diskeeper do not.

Performance is relative. If a datastore stays within preset size limits, the value of defrag will be marginal. If a database expands beyond preset limits the benefit can be quite beneficial, especially with queries that extend across large parts of the database.

ExIFS (M: drive) issues with third party software are, from my understanding, related to those that employ file-filters (i.e. apps that lock files) such as antivirus. Diskeeper does not use file-filter drivers, not does the built-in.

It is debatable whether defragging this drive is of any benefit, but it is not an "issue" that I've ever seen. Though clearing up free space may be helpful for faster future file writes.

I wrote articles on the subjects I discussed above:
http://files.diskeeper.com/pdf/DKandEmailServers.pdf
http://files.diskeeper.com/pdf/FileFragmentation_SANsNASandRAID.pdf

I hope this helps, or at least opens the topic for further discussion.

You must be logged in to post a comment. You can login here