Discussion Locked

Defragmenting on Win NT based ERP server

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Normally defragmenting on a Win NT based is recommended for performance reasons. Is this recommendation valid for a database server(such as ERP)and RAID architectures. Are there possibilities of data corruption after defragmenting?

7 replies

by timthetoolman

Hi,

Yes defragmentation is valid and should be safe for RAID architectures and database servers.

That doesn't mean you shouldn't do regular backups (which I'm sure you do) - and I'd suggest a special backup before you're first defrag.

Microsoft products have been known to have bugs... :-)

Fragmentation mostly effects files that grow. Put simply when a file grows enough it runs out of room in that part of the disk and the rest of it has to be written elsewhere on the disk.

This means that to re-read the file, the drive has to read the first part and then seek to the next bit and read some more. Seeking is the slowest part of the process and so if a file has many fragments, it can take a long time to read the file!

Defragmentation re-arranges all the bits back together on the disk so a read happens in one hit.

(continued...)

by timthetoolman

This applies to DB servers mostly when the DBA didn't preallocate enough space for the all the data in the tables. If a table fills to capacity, it will extend itself (by the amount decided by the DBA, but by 10% by default I think) and yep, this islikely to be "elswhere on the disk".

If for some reason a file has to stay in one place on the disk - conceptually a good example of this is the boot sector! then Microsoft has allowed for a special property to be set on the file that means it doesn't get moved during a defrag.

Any half decent software provider will have taken advantage of this if their file has to stay put for one reason or another.

In a modern file system (Like NTFS) this is very rare, though.

OK, so how about RAID? Well the same argument applies here. Even though the file is split up over more than one disk, each part of the file shouldn't be in multiple places over its disk.

Unfortunately you dont have direct control over where the raid controller placesits bits and so you have to hope that the algorithms used are good ones!

Hope this helps,
Cheers,
Tim.

by timthetoolman

And it just occured to me to mention that open files cannot be defragged so you will need to close the database before defragging.

Fortunately you dont need to defrag a DB server very frequently so it could happily be part of any regular maintenance schedule you have.

Having said that, I would arrange for regular defrags on the system disk of the server, though. This disk changes frequently and would benefit from frequent defrags.

This discussion is closed to new replies.