Condusiv Technologies Blog

Condusiv Technologies Blog

Blogging @Condusiv

The Condusiv blog shares insight into the issues surrounding system and application performance—and how I/O optimization software is breaking new ground in solving those issues.

Optimizing Virtual Platform Disk Performance (ESX)

by Michael 28. June 2011 07:38

Overview 

The intensified demand for IT network efficiency and lower operating costs has been driving the phenomenal growth of virtualization in the past decade, with no signs of slowing. At present, many corporations run more virtualized servers than physical servers.

 

While virtualization provides opportunity for consolidation and better hardware utilization, it’s critically important to recognize and never exceed hardware capacities.  

The importance of ensuring sufficient CPU and memory are well understood, with many processes and management tools available to help plan and properly provision VMs for these critical resources. I/O traffic, network and disk, are more complicated to account for in virtual environments as they tend to be more unpredictable.

In order to better accommodate disk I/O, most virtualization platforms will implement a Storage Area Network (SAN) which can offer greater data throughput, and a dynamic environment to address fluctuations in I/O demands.

While a storage infrastructure can be built out to meet expected demands, there are uncontrollable behaviors that will still impede performance. 

File Fragmentation

As files are written to a general purpose local disk file systems, such as Windows NTFS, a natural byproduct is file fragmentation. File fragmentation is a state in which the data stream of a file is stored in non-contiguous clusters in the file system. Fragmentation occurs on logical volume, and by device drivers is translated to logical blocks, and eventually to physical sectors residing on a storage device. It can be demonstrated as pieces of a file located in a non-contiguous manner. The effect of this file fragmentation is increased I/O overhead, leading to slower system performance for the operating system.

In the case of virtual platforms, a guest operating systems is stored as a file (i.e. set of files) on the virtual platforms file system as a “virtual disk”. A virtual disk is essentially a container file, housing all the files that constitute the OS and user data of a VM.  A virtual disk files can fragment just as any other file can resulting in what amounts to a “logically” fragmented virtual hard disk, which still has typical file fragmentation contained within it. The picture represented to the right would appear as “VirtualServer1.vmdk, 30GB in size, in 4 pieces”.  

 

This situation equates to hierarchical fragmentation or more simply fragmentation-within-fragmentation. Given the relatively static nature and large size of virtual disks, and large allocation unit size of VMFS (typically 1MB), fragmentation of these files is unlikely to cause performance issues in most cases. The focus and solution to fragmentation should be directed at the guest operating system.

Fragmentation within a Windows VM will cause Windows to generate additional unnecessary I/O. This added I/O traffic can be discovered using Windows Performance Monitor, where it is one of the principal causes for Split I/O.  

 

Fragmentation prevention and defragmentation technologies exist to eliminate unnecessary I/O overhead, and improve system performance. Fragmentation prevention solves fragmentation at the source, by actively causing files to be written contiguously via advanced files system drivers. Defragmentation is the action in which file fragments are re-aligned within the file system, into a single extent, so that only the minimal amount of disk I/Os are required to access the file, thereby increasing access speed.  

Partition Alignment 

Depending on your storage protocol and virtual disk type, misaligned partitions can cause additional unnecessary I/O[1]. In the example below in which the ESX and SAN volumes are not properly aligned, a Word file spanning four NTFS clusters causes additional unnecessary I/O in both VMFS and the SAN LUN.  

 

Similarities between Partition Alignment and Fragmentation 

Much like misaligned partitions can cause additional I/O at multiple layers, so does fragmentation. While partitions can be properly aligned once and never require further corrective action, fragmentation will continue to occur, and needs to be regularly addressed.

In the example below, which assume proper partition alignment, a file in eight fragments in the guest OS, causes additional I/Os to be generated at the virtualization platform layer[2] and at the LUN.   

 

Defragmentation in the guest operating system (of this file), eliminates excess I/O when accessing the file as Windows only generates one I/O. This reduction in I/O traffic translates to the host file system and SAN LUN, ensuring efficiencies at each layer.   

 

Best Practices 

Defragmentation of Windows file systems is a VMware recommended performance solution. The VMware Knowledge Base article 1004004[3] states “Defragmenting a disk is required to address problems encountered with an operating system as a result of file system fragmentation. Fragmentation problems result in slow operating system performance.” In order to validate the Vmware statement, tests were performed.

 

Test Environment

  
Configuration

Test Environment Configuration Host OS: ESX Server 4.1 with VMFS (1MB blocks)

Guest OS: Windows Server 2008r2 x64 (3GB RAM, 1 vCPU)

Benchmarking Software: Iometer (http://www.iometer.org/)

Fragmentation Program: FragmentFile.exe (used to fragment a specified file)

Defragmentation Software: V-locity® 3.0 (http://www.diskeeper.com/business/v-locity/)

 

Storage: 10GB test volume in a 40GB virtual disk. VMFS Datastore of 410GB. HP Smart Array P400 controller. RAID 5 (4x 136GB SCSI at 10K RPM) Stripe size of 64KB with a 64KB offset (properly aligned).

Load Generation 

The industry standard benchmarking tool Iometer was used to generate I/O load for these experiments.  

Iometer configuration options used as variables in these experiments:

• Transfer request sizes: 1KB, 4KB, 8KB, 16KB, 32KB, 64KB, 72KB, and 128KB

• Percent random or sequential distribution: for each transfer request size, 0 percent and 100 percent random accesses were selected

• Percent read or write distribution: for each transfer request size, 0 percent and 100 percent read accesses were selected 

Iometer parameters that were held constant for all tests:

• Size of volume: 10GB

• Size of Iometer test file (iobw.tst): 8,131,204 KB (~7.75GB)

• Number of outstanding I/O operations: 16

• Runtime: 4 minutes

• Ramp-up time: 60 seconds

• Number of workers to spawn automatically: 1 

The following is excerpted from a VMware white paper[4], and helps to explain why the Iometer parameters were used. 

Servers typically run a mix of workloads consisting of different access patterns and I/O data sizes.

Within a workload there may be several data transfer sizes and more than one access pattern.There are a few applications in which access is either purely sequential or purely random. For example, database logs are written sequentially. Reading this data back during database recovery is done by means of a sequential read operation. Typically, online transaction processing (OLTP) database access is predominantly random in nature. 

The size of the data transfer depends on the application and is often a range rather than a single value. For Microsoft Exchange, the I/O size is generally small (from 4KB to 16KB), Microsoft SQL Server database random read and write accesses are 8KB, Oracle accesses are typically 8KB, and Lotus Domino uses 4KB. On the Windows platform, the I/O transfer size of an application can be determined using Perfmon.

In summary, I/O characteristics of a workload are defined in terms of the ratio of read operations to write operations, the ratio of sequential accesses to random accesses, and the data transfer size. Often, a range of data transfer sizes may be specified instead of a single value.  

Create Fragmentation 

The FragmentFile.exe tool was used to fragment the Iometer test file (iobw.tst) into 568,572 fragments, a mid-range amount of fragmentation for a production server. The statistics collected from an analysis of the volume (shown below) were performed with V-locity.

Test Procedure 

The primary objective was to characterize the performance of fragmented versus defragmented virtual machines for a range of data sizes across a variety of access patterns. The data sizes selected were 1KB, 4KB, 8KB, 16KB, 32KB, 64KB, 72KB, and 128KB. The access patterns were restricted to a combination of 100 percent read or write and 100 percent random or sequential. Each of these four workloads was tested for eight data sizes, for a total of 32 data points per workload.

In order to isolate the impact of fragmentation only the test VM was powered on and active for the duration of the tests.

For the initial run, Iometer created a non-fragmented file, and performance data was collected. Then FragmentFile.exe tool was used to fragment the Iometer test file, the VM rebooted, and the test procedure re-run. This resulted in data sets for both non-fragmented and fragmented scenarios. The results are graphed below.  

Performance Results  

As the graphs show, all workloads show an increase in throughput when the volume [file] is defragmented (i.e. not fragmented).  It also becomes clear that as the I/O read/write size increases, the fragmentation-induced I/O latency increases dramatically.  The greatest improvements of a contiguous file are found with file reads; both random and sequential. 

 

Random Reads  
 
Random Writes 

Sequential Reads

Sequential Writes

Conclusion

 

Fragmentation demonstratively impedes performance of Windows guest operating systems.  While the tests depicted were executed on a singular VM, the issue becomes exponentially worse in a multi-VM environment wherein each VM suffers from file fragmentation.  As server virtualization establishes a symbiotic relationship, it is important to remember that generating disk I/O in one virtual machine affects I/O requests from other virtual systems.  Therefore latencies in one VM will artificially inflate latency in co-located virtual machines (VMs that share a common platform).  

Fragmentation artificially inflates the amount of disk I/O requests which, on a virtual machine platform, compounds the disk bottleneck even more so than on conventional systems.

Eliminating fragmentation in VMs, and the corresponding unnecessary disk I/O traffic, is vital to platform-wide performance and enhances the ability to host more VMs on a shared infrastructure.

You can download the PDF white paper here: Optimizing Virtual Platform Disk Performance.pdf (1.04 mb)

[1] VMware guide to proper partition alignment: http://www.vmware.com/pdf/esx3_partition_align.pdf
[2] It should be noted that VMFS, in the example above need only read the actual amount of data requested in multiples of 512 byte sectors, and does not need to read an entire 1MB block.  
              

Tags:

SAN | Defrag | V-Locity | SAN | VMware | V-Locity | white paper | VMware | white paper

The Summer Blockbuster Sequel: V-locity 3.0

by Michael 24. June 2011 07:00

Coming Soon: V-locity 3.0 (virtual platform optimizer)  has some fantastic new features in it we're sure you’ll like, including:

+Full Support for ESXi Server (in addition to existing support for ESX and Hyper-V)

+Reduced installation effort for ESX Servers (no installation on Host)

+New CogniSAN technology (for storage area networks)

+New V-Aware technology (for any virtualization platform)

+Automatic zeroing of free space (for thin/dynamic virtual disks)

+Added support for virtualization platforms such as XenServer, RHEV, Oracle VM and more

We are just a few short weeks from releasing it, and could use your help. If your interested in catching a “sneak peak” (our final release candidate build), and are interested and able to install, evaluate and then comment (fill out a 10 minute online survey) on this software, simply fill-out a Non-Disclosure Agreement (NDA) located here.

Fax the signed NDA to:
Fax: 818-252-5514

Please add the following to the Fax cover page:
Attn: Field Test Administrator/V-locity Field Test

Alternatively you can email the signed NDA (scan in the pages with your signature) to our Field Test administrator. Please add "V-locity Field Test" in the subject line.

UPDATE July 28, 2011:

Congrats to Benjie Henderson, Virtualization Architect at SS&C, winner of the iPad2 raffle held for release candidate testers! 

Tags: , , , , ,

Hyper-V | SAN | virtualization | V-Locity | VMware

Storage VMotion and GOS fragmentation

by Michael 3. December 2010 06:57

I had a test run here internally in order to make a point about what does, or more specifically "does not", happen when you VMotion/SVMotion a Windows Guest OS (GOS). We wanted to demonstrate that, while VMware is copying the VM to another host/storage, it does nothing about the internal fragmentation of files in Windows.

We felt this was a valuable demonstration as one of the old (1980s) ways to "fix" fragmentation was to copy off the files/backup, reformat the volume, and then copy back/restore. This offered a degree of success, but required taking the data offline in order to get rid of most of the fragmentation. On a side note, backing up/copying fragmented files takes a lot longer than it would on contiguous and ordered files.

Anyway, S/VMotion is such a cool feature because it works on live VMs. So, if the VMDK movement somehow did align/reorder files in Windows, it could be a great solution to Windows file system fragmentation! So here's how we tested...

1. Setup 2 ESX 4.1 Servers with iSCSI storage and vCenter with SVMotion capability.

2. Create a VM with Windows 7 in one of the ESX Server storage (Ex: Storage1) and a 20 GB Thin virtual disk.

3. Using an internal tool, create moderate fragmentation on the virtual disk (80k fragments, average fragments per file around 3.0, around 50% free space).

4. Install V-locity with all features (e.g. defrag, IntelliWrite, etc...) disabled. This is just so we can run a fragmentation analysis and save the reports.

5. Save the "Before SVMotion" analysis report, and then stop V-locity Windows Service (to make sure it is entirely inactive).

6. Using SVMotion move the live VM to the other ESX Server storage (Ex: Storage2).

7. Once the move is completed, restart the V-locity Windows Service and perform a post "After SVMotion" analysis.

8. Save this job report.

We saw what we expected, given VMotion leverages Changed Block Tracking (CBT) technology and is block, not file based. I attached the report, so you can see the side-by-side analysis data, files in Windows are not defragmented in an SVMotion. Now, that's not to say possible fragmentation of the VMDK files themsleves (on VMFS datastores) was not affected, but that's a topic for another post. 

V-locity is VMware Ready

by Michael 12. November 2010 06:16

As a long term VMware Premier Technology Alliance Partner, we're excited to now announce that V-locity has, after passing stringent testing, been certified by VMware as VMware Ready. V-locity is the first and only certified solution for virtual disk I/O optimization. 

You can see the product listed at VMware's site here.

  

Tags: , , ,

V-Locity | VMware

Month List

Calendar

<<  November 2017  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar