Physical Disk Fragmentation

  • I have a SQL Server box that has some 'physical fragmentation' drive which houses some data files. Recently (Today) performance of said Server and drive has gone off the cliff with regard to high I/O operations.

    The 'drive' resides on a SAN and I believe to be configured with RAID 10. Average disk queue length has gone through the roof.

    I'm not at all convinced that this fragmentation is the cause of my problem but at the same time I would like to eliminate it... if I were to run defrag on the drives:

    1. Can this be done whilst the SQL Server is on-line and available?

    2. If so is there any risk of database corruption running a defrag in this way?

    Gethyn Elliswww.gethynellis.com

  • The only way I have successfully defragged my mdf/ldf files that reside on our SAN is to do it while SQL Server was shutdown. And in a couple of instances I actually had to move the mdf/ldf files to another disk first.

  • It will never complete if you leave SQL Server running (past experience) and you would end up cancelling the defrag.

    For best results, defrag while SQL Server is offline. Secondly, for faster results, sometimes you should move the files to a different lun and then back after a defrag of the lun has occurred. When copying back, the file should be placed contiguously on the disk. (There are some instances where that does not hold true.)

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Hi Lynn/Jason

    Thanks for your replies sorry it has taken me a while to respond...

    Out of curiosity, do you regularly defrag your SQL server disks...I have sized my database files accordingly which means there is no excessive file growth and I don't shrink the DB's etc

    But I have sysadmins suggesting that this should be done regularly perhaps even scheduled...what are your thoughts on this?

    Cheers

    Gethyn Elliswww.gethynellis.com

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply