User Tools

Site Tools


diskio
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


diskio [2013/01/28 04:29] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Improve VMware Workstation Disk IO ======
 +Even on an 8 GB RAM workstation, VMware virtual machines can run slowly with disk IO being the main culprit.  This can depend on numerous factors but we can reduce this to 4 critical issues:
  
 +
 +===== Antivirus real-time protection =====
 +You probably run VMware Workstation on your everyday working computer, and you probably want to stay secure running an antivirus software.
 +
 +The most useful feature of any AV is the real-time protection, catching and monitoring I/O accesses of every process for suspicious activities.
 +This feature can greatly impact on your VM's performances and should be fine-tuned for virtualization.
 +
 +So be sure to create an exclusion filter on your real-time protection settings for .vmdk (VMware virtual disk) and .vmem (VMware virtual memory) files. In this way continuous I/O operations on your virtual machines will not be hit by antivirus checking.
 +
 +Note: if you plan to run !LiveCD operating systems (like Backtrack) inside your VM's or simply often use CD images for installing new software, I highly recommend to exclude .iso files too from AV checking.
 +
 +===== Host OS disk fragmentation =====
 +A really performance hitter for virtual machines is a fragmented host OS disk.
 +
 +VM's virtual disks are very large (8 GBs at minimum on the average) and are created by default as non-preallocated. In other words, your virtual disk grow as you install more software on the guest OS until reaching your defined disk limit.
 +If you use only one physical disk for everyday work and VM's storing, you probably will use space around a growing virtual disk, allowing your host OS to fragment virtual machines more and more.
 +
 +So be sure to:
 +
 +  * Create a dedicated partition for virtual machines only
 +  * Create guest OSes virtual disks with "Allocate all disk space now" option (Split the disk into 2 GB files)
 +  * Schedule a daily defragmentation for your virtual machines directories (maybe at launch time or during the night)
 +    * You may want to look at third party defragmentation software, since Windows defrag has a hard time with large files
 +
 +===== Memory trimming =====
 +Workstation checks which part of the guest OS virtual memory is not used and allocates it back to the host OS. This permits to have more concurrent virtual machines running but everytime the guest OS asks back for its memory it suffers a performance degradation.
 +
 +So, if you have enough free RAM for all planned concurrent VMs, be sure to disable memory trimming for guest OSes adding the following line to the virtual machine configuration (.vmx) file:
 +<file>
 +MemTrimRate''"0"
 +</file>
 +Note: Memory trimming can be disabled through GUI since Workstation 6.0.
 +
 +You can disable memory trimming for a guest in the virtual machine settings editor (VM > Settings > Options > Advanced). In the Settings section of the Advanced panel, select Disable memory page trimming.
 +
 +===== Page sharing =====
 +VMware uses a page sharing technique to allow guest memory pages with identical contents to be stored as a single copy-on-write page. Page sharing decreases host memory usage, but consumes system resources, potentially including I/O bandwidth.
 +
 +You may want to avoid this overhead for guests for which host memory is plentiful and I/O latency is important. To disable page sharing, add the following line to the virtual machine configuration (.vmx) file:
 +<file>
 +sched.mem.pshare.enable''"FALSE"
 +</file>
 +
 +===== References =====
 +  * [[http://virtualization.info/en/news/2005/11/how-to-improve-disk-io-performances.html|http://virtualization.info/en/news/2005/11/how-to-improve-disk-io-performances.html]]
 +  * [[http://www.vmware.com/support/ws55/doc/ws_performance_diskio.html|http://www.vmware.com/support/ws55/doc/ws_performance_diskio.html]]
 +
 +-- Main.FredPettis - 2011-06-01
diskio.txt · Last modified: 2013/01/28 04:29 by 127.0.0.1