Category Archives: 16792

File-level Defragmentation of Exchange 2013 Volumes

By default, Windows Server 2012 automatically runs a weekly drive optimization (file-level defragmentation) on all drives. It also automatically optimizes new drives when they are added.



Now that you can install Exchange 2013 on Windows Server 2012 should you disable this feature as part of your server builds?



The latest information I could find from Microsoft on this subject is from Nino Bilic (2004): Do we need to file-level defragment Exchange database drives? and Mike Lagase (2011): How fragmentation on incorrectly formatted NTFS volumes affects Exchange.

Nino writes,
The bottom line really is – you do not HAVE to file-level defrag the Exchange database drives. Exchange reads and writes to it’s databases in very random fashion. Large sequential reads and writes will see much more improvement from file system defrag than Exchange databases will. But if you really WANT to do it – I would do it the old-fashioned way: move the databases off to some other volume, file system defrag the drive and then move the databases back… Or at least make sure you have a good backup, dismount the databases and file-system defrag them.
Mike writes,
Note that it is still not recommended to run disk defragmentation software on Exchange server volumes, but there are times where file level fragmentation can cause significant performance problems on a server merely by the way data is being written to the disk. If optimal and/or recommended settings are not used when creating the volumes, this file fragmentation issue can occur much quicker. The majority of Exchange files are in use so running any regular disk defragmentation programs on the server will not help with this situation. If necessary, the only way to resolve this is to take all Exchange resources offline to ensure none of the files are in use and then defragment the disk to make the files contiguous on the disk once again.

That’s Mike’s emphasis, not mine.

So, while it’s not necessarily going to break anything if you defragment your disks, it’s best practice NOT to do it.  Especially letting Windows Server 2012 do it automatically every Wednesday at midnight, as is the default.  Also consider other workloads that may be running at the same time, such as Exchange backups.

Note that this recommendation normally applies to all local disks on an Exchange server, not just the drives that contain mailbox databases and transaction logs.  That’s because the SMTP queue and temporary files are written to the same drive where the Exchange 2013 binaries are installed, usually the C: drive unless you’ve manually moved them to a different drive.

Here’s how to turn automatic drive optimization off in Windows Server 2012:

  • Using File Explorer, view the properties of the C: drive or any other local drive.
  • On the Tools tab, click Optimize.
  • You will see that all local drives are being optimized automatically every week:
  • Click the Change Settings button.
  • Clear the check box to Run on a schedule, as shown below:
  • Click OK, Close, and OK to save the settings.
Disabling drive optimization in this way will disable optimization for all drives.  It does not disable your ability to manually run a disk optimization on any drive.

Western Digital Green vs Black Drive Comparison

In a recent post I described my new blistering fast Windows 8 Server, which includes a parts list.  This server features a 120GB SDD SATA III 6.0Gb/s drive for the operating system and uses a single 2TB Western Digital Green SATA III 6.0Gb/s drive (WD20EARX-00PASB0) for VM and data storage.




It has been suggested by some of my readers that the WDC Green drive will not provide suitable performance compared to a WDC Black SATA III drive.  They also wondered what the true power savings is between the Green and the Black drive.  The Green drive uses less power by spinning at slower RPMs (variable ~5400 RPM vs 7200 RPM for the Black).




I decided to purchase a Western Digital Caviar Black SATA III 6.0Gb/s drive (WD2002FAEX-007BA) to run benchmarks against and compare the two drives side-by-side using HD Tune Pro 5.00 and Microsoft Exchange Server Jetstress 2010 (64 bit).




I ran each set of tests for the Green drive, then replaced it with the Black drive and ran the same set of tests on my new server.  I also ran the the tests while the server was plugged into a P3 Kill A Watt Electricity Load Meter and Monitor to accurately measure power consumption by the kilowatt-hour for comparison.




HD Tune Pro Benchmarks

The following are the benchmark test results for both drives.  The Green drive is on the left and the Black is on the right.




Benchmark Results

The Black drive delivers 17.9% better average transfer speed.  The access time was 17.6ms for the Green vs. 12.0ms for the Black.  I was surprised to see that CPU usage was much higher on the Green (6.0%) vs the Black (2.4%).







File Benchmark Results

The File Benchmark test measures read/write transfer speed using a 500MB file in 4KB blocks.  The Black drive achieved 11.5% better performance using 4KB sequential access and 28.2% better using 4KB random access.







Random Access Results

The Random Access test measures the performance of random read or write operations with varying data sizes (512 bytes – 1MB).  Again, the Black drive performed better across the board with an average 31.2% improved performance.  It also offers much better access times.




It’s notable that the Green drive performed this test nearly silently, while the Black drive sounded like a Geiger Counter at Fukushima.  Neither of these drives feature AAM (Automatic Acoustic Management) so this does not impact the results (and cannot be adjusted).







Other Test Results

This benchmark runs a variety of tests which determine the most important performance parameters of the hard drive.  The Black drive offers 35.3% better random seek and 18.3% better sequential read performance.  It also has better transfer speeds from its cache.  Both drives feature a 64MB cache.







Exchange JetStress

I ran Exchange 2010 JetStress on each drive to get an accurate IOPS profile for Exchange 2010 SP2 use.  JetStress was configured for a two-hour test using a single 1TB database and one thread.



  • The Green drive achieved 47.396 IOPS with 10.751ms latency.
  • The Black drive achieved 64.57 IOPS with 15.180 latency.



I’m not sure why the Black drive’s latency was higher than the Green, given the benchmark tests above, but I ran that test twice and got the same results each time.  Even so, the Black drive delivered 26.6% more IOPS.







Power Analysis

Green Drive1.10 KW at 27.5 hours

Energy use per hour = (1.1 KWH)/(27.5 hours) = 0.04 KWH per hour of use
Energy use per day = (0.04 KWH/hour)(24 hours/day) = 0.96 KWH over a full day
Cost per day = (0.96 KWH)(18.5 cents/KWH) =  17.8 cents per day

Energy use per year = (0.96 KWH/day)(365 days/year) = 350 KWH/year
Cost per year = (350 KWH/year)(18.5 cents/KWH) = $64.82 per year.



350 KWH = ~700 lbs of greenhouse gas to the atmosphere per year.


Black Drive0.72 at 14.75 hours

Energy use per hour = (0.72 KWH)/(14.75 hours) = 0.049 KWH per hour of use
Energy use per day = (0.049 KWH/hour)(24 hours/day) = 1.18 KWH over a full day
Cost per day = (1.18 KWH)(18.5 cents/KWH) =  21.83 cents per day

Energy use per year = (1.18 KWH/day)(365 days/year) = 431 KWH/year
Cost per year = (431 KWH/year)(18.5 cents/KWH) = $79.74 per year.



431 KWH = ~860 lbs of greenhouse gas to the atmosphere per year.



Result: The WDC Green drive uses 18.8% less energy than the Black drive.







Conclusion

It’s obvious from the test results above that the Western Digital Caviar Black drive performs better than the Green drive.  At the time of this writing the Green drive costs $139 and the Black is $249.  That’s a 44% premium for a drive that performs on average 24% better.



In real-life observations I don’t really see that much difference in performance between the two at this time.  However, this Hyper-V server has twice as much RAM as my last server so it will potentially be hosting many more VMs (and will have a higher IO load).  For this reason I decided to keep the Black drive, even though it costs more, it’s a bit noisier when it’s working hard and uses more energy.  I like muscle cars, too.  :)



If you plan to do RAID, I would most definitely recommend the Black drive because it spins at a consistent 7200 RPM.  Reports say that the variable RPMs on the Green drive can cause read/write errors.



I hope you find this information useful.