The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco...

24

Transcript of The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco...

Page 1: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.
Page 2: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

The Impact of Logical and Physical Fragmentation in a

Virtual Environment

Presented byRaxco Software, Inc.

October 29, 2009

Page 3: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

What The Experts Say

“Like physical disk drives, virtual disks canbecome fragmented. Defragmenting disksrearranges files, programs and unused space on the virtual disk so that programs run faster and files open more quickly.”VMware Defragmenting Virtual Diskshttp://www.vmware.com/support/ws55/doc/ws_performance_defrag.html

Page 4: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Experts…

“Performance in Windows guest operating systems may also be affected by disk fragmentation”VMware ACEhttps://www.vmware.com/support/ace/doc/disks_ntperf_ace.html

Page 5: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Experts…

“The two biggest reasons I see virtual machines get slower over time is due to (1) incorrect virtual machine additions installed and (2) disk fragmentation.”

Andrew ConnellFormer MS Share Point Developer Microsoft MVP-Content Management Server

Page 6: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

What is Fragmentation?

Page 7: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Sample Fragmentation Problems

• 10-15 minutes to launch Notes on laptops• Users locked out of servers due to insufficient

contiguous free space• Servers won’t boot• Application hangs and crashes• System errors due to metadata fragmentation• Video/audio “flickers”• Prolonged backup

Page 8: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Cost of Fragmentation

• Productivity• Support • Unnecessary hardware• Longer backups• Opportunity

Page 9: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

The Fragmentation Issue

• Logical fragmentation -How NTFS “sees” the disk• Physical fragmentation -How the disk controller “sees” the disk• Free space

Page 10: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

The Logical Level• To format a partition Windows needs to know

if it is NTFS/FAT, cluster size and disk size• Bitmap file is how NTFS views the disk• Cannot distinguish between physical disk

types• MFT is created along with metadata files NTFS

Page 11: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

NTFS and the MFTComponent Description

NTFS Boot Sector The BIOS parameter block that stores information about the layout of the volume and file system structures, plus the boot code that loads Windows Server.

Master File Table (MFT) The information necessary to retrieve files from the NTFS partition, such as the attributes of a file.

File System Data Stores data that is not contained within the Master File Table

MFT Copy Copies of the records essential for the recovery of the file system if there is a problem with the original.

Page 12: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

File Allocation (Writes)

• Create MFT record (one or more) name, parent dir, security, allocation, pointers to other records

• Bitmap accessed to locate free (blocks all) • MFT record is updated with content• NTFS passes LCN’s to disk driver

Page 13: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Anatomy of the MFT

Page 14: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

File Access (Reads)

• Load portion of MFT with correct record via directory

• Locate file in the MFT• Pass starting LCN and run length to disk

controller• Number of physical disk seeks determined by

the number of logical fragments

Page 15: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Wasted Seeks

Page 16: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

NTFS Expert Concludes…• Free space fragmentation slows down writes• Free space fragmentation blocks on write• File fragmentation causes needless seeks• Slower the disk the greater the bottleneck

Page 17: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

The Physical Level

• NTFS reports VCN the starting LCN and its length to the disk controller

• Disk controller maps LCN to PCN based on its software/firmware

• Data written to disk• RAID or other disk configurations may

physically fragment the file for faster access

Page 18: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Fragmentation and VM’s• Windows guests have all the same NTFS

behavior• Resource contention between Windows

guests can be an issue• Resource contention between guests and the

host (Windows-based host)

• Free space fragmentation not good for dynamic vmdk, vhd

Page 19: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

How Defragmentation Helps

• All defragmentation is at the logical cluster level

• Defragmentation puts files in strings of contiguous logical clusters ($Bitmap)

• Controller will work faster • Fewer unnecessary seeks to the disk • Fastest possible logical and physical I/O

Page 20: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Advantages• Centralized management

via console• Offline defragmentation of

system and metadata• Consolidates free space • Optimized boot files and

MFT• Requires only 1% free space

• Fast and light on resources• Flexible scheduling• Windows Certified• Full integration with AD• VSS Compatible• Integrated with vSphere 4• Virtualization Aware

Page 21: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

No Virtual Awareness

Page 22: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

Virtualization Awareness

Page 23: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

The Choices

Disk A

• Chaos• Slow • Short Life Cycle • Inefficient• Messy

Disk B

• Orderly• Fast• Long Life Cycle• Efficient• Perfect

Page 24: The Impact of Logical and Physical Fragmentation in a Virtual Environment Presented by Raxco Software, Inc. October 29, 2009.

For vSphereFor Hyper-VFor VMware WorkstationFor Server and WorkstationFor Exchange