![Page 1: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/1.jpg)
Improving File System Performance in a Virtual
Environment
Virtualization Deep Dive Day2/20/2009
Bob Nolan
Raxco [email protected]
![Page 2: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/2.jpg)
Topic Background
• Hardware is getting bigger and faster – CPU clock speeds > 3+Ghz Multi-core– 4GB RAM– 500GB-2TB+ capacity hard drives
• Limiting factor is still disk I/O• Anything that speeds up access to disk
improves performance
![Page 3: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/3.jpg)
Virtualization
• Uses host resources to run virtual guests• Multiple guests can strain host resources
and impact performance• Failure to optimize resources can be
crippling• Proactive problem management is best
approach
![Page 4: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/4.jpg)
NTFS in a Virtual Machine
• Uses slightly more resources in a VM• Maintains a bitmap of VM disk • Allocates free space • Fragments files and free space• Degrades performance with use
![Page 5: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/5.jpg)
Logical vs Physical Clusters
• Logical Clusters– File system level– Every partition starts at logical cluster 0– No idea of hard drive technology in use
• IDE• SCSI• RAIDx• # platters or read/write heads
![Page 6: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/6.jpg)
Logical vs Physical Clusters
• Physical Clusters– Hard drive level– Hard drive controller translates logical-to-
physical and positions heads
![Page 7: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/7.jpg)
Disk Disk Disk
Disk Controller
O S
File System
ApplicationRequests
File
Logical ClusterView
Physical ClusterView
![Page 8: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/8.jpg)
Cluster Size and Performance
• Smaller clusters– less wasted space– Worse performance – especially large files
• Larger clusters– more wasted space– Better performance – especially large files
![Page 9: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/9.jpg)
Fragmentation Causes
• What causes fragmentation?– Occurs when files are created, extended or
deleted– Happens regardless of how much free space is
available (After XP/SP2 installation – 944 files/2943 fragments)
– More than one Logical I/O request has to be made to the hard drive controller to access a file
![Page 10: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/10.jpg)
Fragmentation Impacts
• What does fragmentation do to my system?– Slows down access to files– Extra CPU/Memory/Disk resource usage– Some applications may not run– Slow system boot/shutdown– Audio/Video record/playback drops frames or
“skips”
![Page 11: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/11.jpg)
Measuring Impact of Fragmentation
• Measuring the performance loss in reading a fragmented file
![Page 12: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/12.jpg)
Defragmenting - Results
• What does defragmenting do?– Locates logical pieces of a file and brings them
together• Faster to access file and takes less resources• Improves read performance
– Consolidates free space into larger pieces• New files get created in 1 piece• Improves write performance
![Page 13: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/13.jpg)
Measuring Impact of Fragmentation
• Measuring the performance difference in reading a contiguous file
![Page 14: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/14.jpg)
Defragmenting - Issues to Consider
• Free Space– How much is enough?– Where is free space located?
• Inside MFT Reserved Zone• Outside of MFT Reserved Zone
– Consolidation of free space
![Page 15: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/15.jpg)
Advanced Defrag Technology
• Complete Defrag of All Files• Free Space Consolidation• Single Pass Defragmentation• File Placement Strategy• Free Space Requirement• Minimal Resource Usage• Large Drive Support• Easy to Schedule and Manage• OS Certification• Robust/Easy Reporting
![Page 16: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/16.jpg)
Defrag Completeness
• Data Files• Directories• System Files
– Pagefile– Hibernate File– NTFS metadata
![Page 17: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/17.jpg)
Free Space Consolidation
• Allows new files to be created contiguously– Maintains file system performance longer– Requires less frequent defrag passes– Reduces split I/O’s
![Page 18: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/18.jpg)
Free Space Consolidation
• Defragmenting files improves read performance
• Free space consolidation improves write performance
• Reduces wasted seeks by over 50%
![Page 19: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/19.jpg)
CaseStudy-Auto Company
Problems• Overall poor workstation performance• Slow boot times• Increased help desk calls• Increased backup time on servers
![Page 20: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/20.jpg)
Case Study ROI
• 4000 Windows XP workstations• 400 servers• $30/hr end user cost• $40/hr system admin/help desk cost• Saved 20 seconds per day per Ws• Reduced help desk by 20% (800 hrs. ann.)• Cut backup time 65%
![Page 21: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/21.jpg)
CaseStudy ROI
• Saved 22 hrs per day- 4840 hrs annually• $145,200 annual productivity savings• $32,000 help desk savings• ~$20,000 backup savings • 66 days to recover investment• Proactively maintains optimal disk
performance
![Page 22: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/22.jpg)
Conclusion
• To improve file system/drive performance– Use appropriate disk technology– Use the most appropriate file system– Use the most appropriate cluster size– Align on cluster boundaries– Make sure free space is consolidated– When you defragment, make sure that it is
being done effectively.
![Page 23: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/23.jpg)
Resource Usage
• Run in the background• Low Memory Usage• Low CPU Usage
![Page 24: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/24.jpg)
Volume Shadow Copy (VSS)
• VSS and defragmentation• Multiple of 16k cluster size• Default cluster size is 4k because NTFS
compression hasn’t been modified to support greater than 4k cluster size.
• BitLocker (Vista) also restricted to 4k cluster size
![Page 25: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/25.jpg)
DiskPar/DiskPart
• Want to avoid crossing track boundaries• Align on 64k for best MS SQL performance• Win2k8 – default is 64k when creating
volumes• Contact storage vendor – i.e. EMC
recommends 64k
![Page 26: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/26.jpg)
Performance Measuring Tools
• Windows Performance Monitor – Split I/O Count (fragmentation)– Disk Queue Length (<= 2/spindle)
• hIOMon – www.hiomon.com– Device AND File based metrics
• SQLio – Microsoft– Stress Test I/O subsystem
![Page 27: Improving File System Performance in a Virtual Environment](https://reader035.vdocuments.net/reader035/viewer/2022070500/56816810550346895ddd9e75/html5/thumbnails/27.jpg)
Cluster Size Recommendations
Drive Use
File System/Cluster
Size Notes/ConsiderationsWindows OS NTFS - 4k (Default)
Pagefile (separate physical drive) FAT32
Need to also have pagefile on OS drive if you want to capture memory dump on Windows crash.
File Server - general Office data NTFS - 16k
Windows 2003/2008/Vista - minimizes shadow copy/Restore Point purges. For Windows 2000, use 4k.
Databases NTFS - 64k Windows 2000, use 4k.Exchange NTFS - 64k Windows 2000, use 4k.
Virtual - VHD/VMDK NTFS - 64k Windows 2000, use 4k.Video/Graphics NTFS - 16k Windows 2000, use 4k.
* You can’t use compression if cluster size greater than 4k