Tech Off Thread

13 posts

H.D.D fragmentation

Back to Forum: Tech Off
  • User profile image
    Custard555

    Hi,

    I was wondering if this was normal.

    I have a Windows 2000 and Exchange 2000 setup but the thing is the volume which holds all the Exchange stores is really fragmented.

    If it isn’t normal how do I get around this?

     

    Here is a log below of last night’s attempt of Windows Disk Defragmenter.

     

    Volume Data Disk (E:):

        Volume size                                = 26,874 MB

        Cluster size                               = 4 KB

        Used space                                 = 18,038 MB

        Free space                                 = 8,835 MB

        Percent free space                         = 32 %

     

    Volume fragmentation

        Total fragmentation                        = 41 %

        File fragmentation                         = 83 %

        Free space fragmentation                   = 0 %

     

    File fragmentation

        Total files                                = 4,264

        Average file size                          = 5,909 KB

        Total fragmented files                     = 7

        Total excess fragments                     = 7,380

        Average fragments per file                 = 2.73

     

    Pagefile fragmentation

        Pagefile size                              = 1,536 MB

        Total fragments                            = 5

     

    Directory fragmentation

        Total directories                          = 156

        Fragmented directories                     = 1

        Excess directory fragments                 = 1

     

    Master File Table (MFT) fragmentation

        Total MFT size                             = 89,391 KB

        MFT record count                           = 4,519

        Percent MFT in use                         = 5 %

        Total MFT fragments                        = 3

     

    --------------------------------------------------------------------------------

    Fragments       File Size       Files that did not defragment

    2               148 KB          \Exchsrvr1\tmp.edb

    3               108 KB          \Program Files\VERITAS\Backup Exec\NT\adamm.log

    2               272 KB          \Program Files\VERITAS\Backup Exec\NT\Catalogs\BeTopCat.idx

    2               39,058 KB       \Program Files\VERITAS\Backup Exec\NT\Catalogs\{01719594-B8AB-4FE9-89F8-8033023FF79F}.U01

    69              1,842 MB        \exchangedb\priv1.stm

    6,870           13,264 MB       \exchangedb\priv1.edb

     

     

     

  • User profile image
    ThMoJe

    Your Exchange databases should defragment it self but in some cases both the database and the file holding the database will become fragmented, and you can do an off-line defragmentation of the database, and since exchange will be unavaileble during that operation, you might as well defragment the file.

    The process includes.

    - Clean the drive for any unsued and/or temp
      files to gain free space.
    - Dismount the Exchange stores
    - Defrag files on the disk using Disk Defragmenter
    - Use Eseutil to perform an off-line
      degragmentation of the exchange database
    - Defrag files on the disk again using
      Disk Defragmenter
    - Mount the stores

    For information on using Exeutil see http://www.microsoft.com/exchange/techinfo/tips/defragmentation.asp

    ThMoJe

  • User profile image
    Custard555

    ThMoJe wrote:

    Your Exchange databases should defragment it self but in some cases both the database and the file holding the database will become fragmented, and you can do an off-line defragmentation of the database, and since exchange will be unavaileble during that operation, you might as well defragment the file.

    The process includes.

    - Clean the drive for any unsued and/or temp
      files to gain free space.
    - Dismount the Exchange stores
    - Defrag files on the disk using Disk Defragmenter
    - Use Eseutil to perform an off-line
      degragmentation of the exchange database
    - Defrag files on the disk again using
      Disk Defragmenter
    - Mount the stores

    For information on using Exeutil see http://www.microsoft.com/exchange/techinfo/tips/defragmentation.asp

    ThMoJe



    not sure if i want to use Exeutil.exe, looks hard to use (not really good at exchange) and also I don't have 110% free H.D.D Space :-< ! is there an easier way, maybe a program in is nice and easy to use? (any Microsoft people wanna make one just for me ???????)

  • User profile image
    PerfectPhase

    Custard555 wrote:

    not sure if i want to use Exeutil.exe, looks hard to use (not really good at exchange) and also I don't have 110% free H.D.D Space :-< ! is there an easier way, maybe a program in is nice and easy to use? (any Microsoft people wanna make one just for me ???????)


    The internal fragmentation of the edb file has nothing to do with the fragmentation of your disk.  The edb are like a mini file system of their own, but fragmentation of the edb will not be included in the report you listed above.  When you run an offline defrag on an edb, it will basically create a new edb file and copy the records from the old to the new, hence the free space requirements.

     

    If you are really worried about the fragmentation (remember that the edb is random access anyway so the disk head is going to be jumping all over the place anyway) all the tools I have used need to be run repeatedly, it's not like the old dos days when a single defrag would nicely stack up all the files on your harddisk.  In my experience at least 4 or 5 passes have been needed to get a good result and the more disk space you have free the better, temporally get as many files as you can off the machine as you can.

     

    Have a look at something like http://smallbiz.executive.com/diskeeper/diskeeper.asp?RId=1&SId=1&CId=13 this will allow you to set the defrag on a continuous loop, leave it for a couple of nights and it will sort your disk out for you, then change the schedule to once a night and make it part of your routine maintenance.

     

    Of course the ultimate defrag is to back up all the files from the disk format it and then restore the files, just remember to use a proper backup program that will preserve you file permissions!

     

    Stephen.

  • User profile image
    ThMoJe

    Have a look at something like....

    DONT RUN ANY FILE/DISK DEFRAGMENTATION ON DRIVES WITH EXCHANGE DATABASE!

    Stephen is right about file and Exchange database (the edb files) is two different things, and that the edb files is like a "mini file system" in a single file, used to store exchange items, mail, contacts, etc.

    The edb file get becomes "internally fragmented" when a user deletes an email, and the area where it was stored is marked as not in use. Over time this will cause many blank spaces in the edb file, but exchange will defragment those blank spaces in the edb file, during regular maintance (default set to run once a day). This is done with the database mounted and users accesing their mail. In most cases this is suficient, and will keep the exchange database (the edb file) compact, and prevent the edb file size from increasing unless it has to.

    It is only when the edb file increase in size that it may become file fragmented, and especially if you use the drive for other files than the exchange edb files, which is not recommended. It is only if the edb file is extremely fragmented, that it will impact performance serverly. The internal fragmentation of the edb file, affects performance a lot more, but the daily maintence sould take care of that, and therefor it is only when you have an extremely fragmented edb file (and 6,870 fragmenst is extreme) you should do a file/disk defrag.

    BUT YOU SHOULD NOT DO FILE/DISK DEFRAG WITH THE EXCHANGE DATABASE MOUNTED.

    The reason is that disk/file defragmentation is a very I/O intensive operation, that will really slowdown your Exchange server, and you will properbly also experiense exchange starting to log I/O problems (Failures and delays). Doing continous defragmentation with a tool like Diskeeper, is a sure performance killer.

    So, do the defrag as I described in my post above. And is you do not like the EXUTIL, then just do the other steps, as the daily maintance will do the internal defrag next time it runs. I just like doing it, when i have the database dismounted anyway Smiley

    ThMoJe

  • User profile image
    PerfectPhase

    Of course it will kill performance while it's running on a loop but that's why I said do it over night, and only until you have the problem fixed Smiley
     

    Once you have sorted the initial problem out, the defrag only takes a couple of minutes at most to sort that days fragmentation out and stop it building to a point where you have to take the store off-line again.

     

    It all depends on what sort of environment your in, but for me when virtually no one is using the system overnight a few minutes at lower performance is worth it to prevent future problems.


    Also the original post referenced disk fragmentation only, so I not quite sure how we got on to exchange edb defrags.  Checking for event ID 1221 will give you a good idea if there is any point to an offline defrag.


    This is quite intreasting as well
    http://blogs.msdn.com/exchange/archive/2004/07/08/177574.aspx
     

    BTW Diskeeper V9, actively monitors the amount of disk IO on the drive it is defraging and backs down it's activity when there is other IO queuing for the drive, which helps maintain a decent level of IO.

     

    YMMV

     

    Stephen.

  • User profile image
    Custard555

    I did try installing Diskeeper V9, but it says it can't be installed on windows server 2000 or 2003 (I tried the "pro" Diskeeper V9)

    anymore help out there?

    Also just to let you know, no one uses the server @ night and also the history is with this server is, it use to be our file server as well as exchange server (the share was on the same disk as exchange) also when we ran out of space we delete all the messages from "mail backup" mail box.

    But now it’s just an exchange server.

  • User profile image
    Custard555

    ThMoJe wrote:
    Have a look at something like....

    DONT RUN ANY FILE/DISK DEFRAGMENTATION ON DRIVES WITH EXCHANGE DATABASE!

    Stephen is right about file and Exchange database (the edb files) is two different things, and that the edb files is like a "mini file system" in a single file, used to store exchange items, mail, contacts, etc.

    The edb file get becomes "internally fragmented" when a user deletes an email, and the area where it was stored is marked as not in use. Over time this will cause many blank spaces in the edb file, but exchange will defragment those blank spaces in the edb file, during regular maintance (default set to run once a day). This is done with the database mounted and users accesing their mail. In most cases this is suficient, and will keep the exchange database (the edb file) compact, and prevent the edb file size from increasing unless it has to.

    It is only when the edb file increase in size that it may become file fragmented, and especially if you use the drive for other files than the exchange edb files, which is not recommended. It is only if the edb file is extremely fragmented, that it will impact performance serverly. The internal fragmentation of the edb file, affects performance a lot more, but the daily maintence sould take care of that, and therefor it is only when you have an extremely fragmented edb file (and 6,870 fragmenst is extreme) you should do a file/disk defrag.

    BUT YOU SHOULD NOT DO FILE/DISK DEFRAG WITH THE EXCHANGE DATABASE MOUNTED.

    The reason is that disk/file defragmentation is a very I/O intensive operation, that will really slowdown your Exchange server, and you will properbly also experiense exchange starting to log I/O problems (Failures and delays). Doing continous defragmentation with a tool like Diskeeper, is a sure performance killer.

    So, do the defrag as I described in my post above. And is you do not like the EXUTIL, then just do the other steps, as the daily maintance will do the internal defrag next time it runs. I just like doing it, when i have the database dismounted anyway Smiley

    ThMoJe


    Just to double check, where do I find the option for the regular maintance in system manager, is it under the data base tab on mail box store?


  • User profile image
    PerfectPhase

    Custard555 wrote:

    I did try installing Diskeeper V9, but it says it can't be installed on windows server 2000 or 2003 (I tried the "pro" Diskeeper V9)



    You need the standard server version, trial from here...

    http://smallbiz.executive.com/downloads/diskeeperdownloads.asp?RId=1&CId=13&SId=1

    Stephen.

  • User profile image
    PerfectPhase

    Custard555 wrote:

    Just to double check, where do I find the option for the regular maintance in system manager, is it under the data base tab on mail box store?


    The exchange online defrager should run by default at 2AM everyday.

    Maintance options are at

    Administrative Groups->[site name]->Servers->[Server Name]->[Storage Group]

    Right click on the store your intreasted in and right click properties then on the database tab.  Or you can set it via system policies (mailbox store).

    Stephen.

  • User profile image
    Custard555

    Do you think this is a good idea, or will work?

     

    I don’t have the space nor the downtime in the day time (and not doing this at night!) to run Eseutil on the Exchange server, so I have read that you can copy the store to a different PC (with some files from exchange) and run the tool there, but

     

    The server is on a raid 5 with dual CPU windows 2000 and I want to copy it to a PC with just a simple setup (1x IDE H.D.D 1x P4 with 512 DDR Windows XP pro) is this a good idea? (I also know I will have to take offline the ADSL connection so no new E-mails will a be downloaded , our ISP will back them up if we ever go off line)

     

    But back to my point, will copying the file from one H.D.D setup to a different one will cause any problems?

     

    Thanks

  • User profile image
    PerfectPhase

    What do you want to achive, why do you feel the need to do an offline defrag, your original post was about DISK fragmentation, not EXCHANGE fragmentation.

    Simply moving the priv1.edb to another disk running the DISK defrager and then move the edb back whould help massively with your DISK fragmentation problem. 

    Stephen

  • User profile image
    Custard555

    PerfectPhase wrote:
    What do you want to achive, why do you feel the need to do an offline defrag, your original post was about DISK fragmentation, not EXCHANGE fragmentation.

    Simply moving the priv1.edb to another disk running the DISK defrager and then move the edb back whould help massively with your DISK fragmentation problem. 

    Stephen


    well since the disk only has exchange stuff on there now and I don't have 110% free space, I thought it was a good idea, anyway, I will do what you say (as its way easier) (moving unmount > cut and paste > defrag > move back the files).

    Thanks



Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.