October 23, 2013 at 2:52 am
What is the best practices around this? Should SQL Server be stopped to allow the disk to fully defrag? What are the implications \ potential risks with defragging whilst SQL is online?
October 23, 2013 at 6:09 am
Make sure that SQL is stopped for the entire duration (or if it's just one database out of many, that the database is offline)
If you have a tool that claims to be able to do online defrags, see previous point
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 23, 2013 at 7:28 am
Do have RAID setup ? if nto then think about that too .
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
October 23, 2013 at 7:35 am
Thanks guys
November 4, 2013 at 4:49 am
You need to know how the drive letters that Windows sees are mapped to your underlying storage. If your storage uses thin provisioning then you are probably wasting time doing a Windows-level defrag. Even with thick provisioning you need to know how disk tracks are assigned within the storage subsystem, as many vendors use a common track allocation algorithm for both models.
With thin provisioning, the typical way space is allocated within a SAN os NAS device is on a track by track basis. When you want to write data to a disk track, a new one is taken out of the free space pool and used. When you want to update a track, a new track is taken out of the free space pool and used, with the old track put into garbage collection and eventually returned to the free space pool.
Therfore at physical disk level your data can be completely fragmented regardles of what is seen by Windows. In this situation the only advantage of a Windows defragmentation is reducing the chain of pointers used by NTFS to map space at the Windows level - this may save a few CPU cycles but would have no impact on IO speed.
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
November 4, 2013 at 8:15 am
SQLSteve (10/23/2013)
What is the best practices around this? Should SQL Server be stopped to allow the disk to fully defrag? What are the implications \ potential risks with defragging whilst SQL is online?
DISKKEEPER will do all of this in the background for you with the servers ONLINE. I've not used it in the last 3 years but it was never a problem before and it took care of things auto-magically without any intervention required from me.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply