How, why and when to defragment your Windows Server disks

Servers are particularly susceptible to file fragmentation as they deal with multiple requests from a wide range of users and often have more complicated drive setups such as RAIDs and SANs.

Regular defragmentation doesn't only speed up file access, it can extend the life of the drive

Scheduling depends largely on usage, but should never be less than once a month. If uncertain, you can initially manually run periodic scans of increasing time span to determine how fast drives typically fragment.

Windows does include its own defragmentation application however this has several limitations, including only being able to defragment local volumes and only being able to defragment one volume at a time. Although some of these have been addressed in Windows Server 2008, third-party tools like Diskeeper and O&O Defrag offer more features.

Automate defragmentation with batch files and command flags. For Windows' own utility, DEFRAG.EXE /f will force a defrag even if space is low.

Schedule the run through the GUI or with the AT command using the syntax "AT \\computername time /interactive | /every:date,... /next:date,... command". For example "AT 03:00am /every:M,W,F C:\defrag.bat" will run the batch file at three in the morning every Monday, Wednesday and Friday.
You can see the tasks created by the AT commands in the Task Scheduler (Control Panel > Administrative Tools).

For clients using virtualisation, you may need to set up defragmentation more often, perhaps even daily. That's because the VM files are usually a single very large file so even minimal fragmentation can affect performance.

Vendors such as Diskeeper also offer real time scanning, which constantly monitors performance and defragments drives when not in use, removing the need to schedule defragmentation.

Fragmented drives can severely impact disk performance and reduce drive lifetimes
Fragmented drives can severely impact disk performance and reduce drive lifetimes


Show other articles by this author

Share |
Write comment
security image
smaller | bigger



Subscribe and get the magazine in the post before it's online

Subscribe and get access to all of the back issues

To read a sample eMagazine - March 2010



If you're supporting en users who need to transfer files by FTP occasionally, explaining how to use FTP every time can get frustrating. Map an FTP site as a custom network location and they can do it through the familiar Explorer window. If you only have a couple of machines you can choose Tools >Map Network Drive… in Explorer and click the link 'Connect to a Web site that you can use to store your documents and pictures' to open a wizard that creates a network location. Select 'Choose a custom network location', type in the FTP address and fill in the user name and password. You can also create mapped drives and network places on the Environment tab of the user's Active Directory object - but if you have a lot of users to set up, put it in the logon script for the user profile under Active Directory Users and Computers.
If you're running into problems with Group Policy Objects, check this handy summary of the rules at read more


Unified communications


The #1 Bestseller for Only 77p

Key resources

Login to view Key Resources