scsi commands

VMware Recommends VM Defrag, So What’s Your Excuse?

The vSphere 5.1 documentation has a section entitled Disk I/O Performance Enhancement Advice that offers 12 actions that can be taken to improve I/O on virtual machine. The second recommendation is:

“Defragment the file systems on the all the guests.”

The most common performance complaints in a virtualized environment are:

  • clogged queues,
  • poor disk latency,
  • I/O congestion, and
  • sluggish virtual machines.

scsi commandsVMware saw these conditions occurred when guest file systems are badly fragmented. The recommendation to defragment guest file systems is an effort to solve the problem at its source.

Inside the Guest - What Isn’t Readily Apparent

What is generally not recognized is that Windows guest systems fragment files before anything is ever written to the disk. Windows reserves logical space for every file. The address and length of each piece of reserved space is recorded in the Master File Table (MFT). To access a file, each address becomes a SCSI command to the controller. If the MFT contains 100 logical addresses for a file then it will take 100 SCSI commands to access the file. (See illustration). The ideal number of SCSI commands per file is one (1). As logical file fragmentation increases in the guests, less data is moved with each SCSI command. This excess SCSI traffic causes the clogged queues and I/O contention.

On the Disk – A Minimum of 1 I/O per SCSI Command

The controller maps the SCSI address data to physical disk space in the SAN. Wide-striping algorithms in the controller will spread a write across multiple disks. As a result, each SCSI command generates more than one disk I/O. If a file request comes in 100 SCSI commands the absolute minimum number of disk I/O needed to access the file is 100 ( 1 I/O per SCSI command).

If the same file request came in a single SCSI command the absolute minimum number of disk I/O needed to access the file would be one I/O. Since we don’t know how many disk I/O a SCSI command generates when it hits the controller we will compare the SCSI traffic and absolute minimum disk I/O for a file fragmented in 100 logical addresses and a contiguous file in a single address.

Fragmented File (Defragmented) Contiguous File % Change
SCSI Commands 100 1 -99
Absolute Minimum Disk I/O 100 1 -99

This chart shows that file fragmentation in the guest system has a direct correlation on the number of physical disk I/O the SAN has to perform. As fragmentation increases the volume of SCSI commands increases. The increased SCSI traffic causes a lot of unnecessary physical disk I/O in the SAN. This overload of disk I/O contributes the disk latency issues that often plagues virtualization performance.

The #1 Misconception System Admins Have When Moving to Virtualization

Robert Nolan, Raxco’s President, explains the common misconception systems administrators have regarding defragmentation and its dramatic impact on virtualized systems:

“There has been a certain amount of confusion in the marketplace about the need for defragmentation in a virtual and SAN environment.

“We conducted an informal survey with 10 customers who used PerfectDisk on their physical servers; not a single one understood the correlation between guest fragmentation and dramatically larger SCSI workloads for queues and controllers and the related disk I/O workloads on the SAN. We are pleased that VMware is finally recommending the defragmentation of guest systems.”

Nolan has been debunking virtualization defrag myths for years, including at VMworld and on the VMblog: How NTFS Causes IO Bottlenecks on Virtual Machines.

Even VMware Agrees: Defrag Your VMs. Now!

Last year, we wrote about VMware recommending defrag as their second listed solution for improving disk I/O performance, only behind increasing memory.

Many system admins don’t realize just how much defragmentation (and preventing fragmentation) improves virtualization performance. We have heard customers say, “we’re not using physical servers anymore, so we don’t need a defragmentation solution.”  That idea couldn’t be further from the truth. And we can back that statement up. Just look at these real-life enterprise VM defragmentation scenarios:

Case Study: 33% Improvement in VMware Backup Time (Town of Castle Rock, CO):

“After all the tweaking of the hardware, it was the Windows file system that was killing us. PerfectDisk now keeps everything organized and I/O rates are much better. I would say it was an investment that helps us get the most from our hardware and our virtual environment.”

How Easter Seals Boosts Windows Hyper-V Server Performance: “It Would Be Crazy Not To”:

“There is no question that PerfectDisk Hyper-V would be valuable to any shop, big or small, running Hyper-V. In fact, it would be crazy NOT to implement a comprehensive solution like PerfectDisk, especially because implementation is easy.”

Defrag and optimization in the enterprise — real value, real ROI (Certara):

“[PerfectDisk] does an incredible job without eating all the process power of the servers” [with the] the ability to schedule around backups.

“As a Microsoft Engineer and systems architect, I truly appreciate what your software does. All I needed was the proof (system alerts) in quantity and the ability to show what the ROI is.”

Maintaining High Availability & Performance in a Virtualized Environment (NSC):

“PerfectDisk vSphere can’t be beat for reliability, speed and effectiveness.

“We spend just a few hundred dollars per host to get maximum performance from $10,000+ servers; that’s a remarkable return on investment. PerfectDisk vSphere gave us more of what we needed and at a lower cost than any other available solution.”

PerfectDisk Case Study: Improving Virtualization Performance (Americall):

“With PerfectDisk, there’s no excuse for loss of revenue from a production outage or for unnecessary administrative costs to maintain healthy and optimized disk drives.”

Real-Life Success Story: PerfectDisk Enterprise Suite in Action at Fives Stein:

“In a virtual environment, we’ve also found PerfectDisk to be very seamless. The product deploys easily to the guest machines just as it does on the physical ones. Importantly, we’ve found the fact that the guests are aware of the host it runs under is a great value. We don’t have to worry about concurrent defrags running on multiple hosts or guests at the same time on already heavy-loaded I/O volumes. Again, the job gets done, it gets done quickly and efficiently.”

Raxco Software’s PerfectDisk offers defragmentation solutions for both VMware and Hyper-V. We’re also a VMware Technology Alliance Partner. Learn more about PerfectDisk vSphere and Hyper-V. Or download any of our PerfectDisk enterprise solutions.

Category: PerfectDiskVirtualization

Tags:

Leave a Reply