views:

132

answers:

1

I'm hoping someone here can answer these definitively:

  • Does putting a VHD file in an NTFS-compressed folder on the host improve performance of the virtual machine, diminish performance, or neither?
  • What about using NTFS compression within the guest?
  • Does using compresssion on either the host or the guest lead to any problems like read or write errors?
  • If I were to put a VHD in a compressed folder on the host, would I benefit from compacting it?

I've seen references to using NTFS compression on quite a few VPC "tips and tricks" blog posts, and it seems like half of them say to never do it and the other half say that not only does it save disk space but it actually can improve performance if you have a fast CPU and your primary performance bottleneck is the disk.

A: 

This is all about tradeoffs. It takes the disk a certain amount of time to read a certain number of bytes. If you can compress the data such that the sum of the reduced amount of time it takes the disk to read it combined with the time it takes the CPU to decompress it is less than it took to read the uncompressed data from the disk then you win perf.

The problem is that there are so many variables in this, and it is likely to be quite fine either way. Your disk could read small blocks slower, or your data could not be very compressible, or your CPU might be really fast, or (and so on and so on). The only way to know if it makes a difference for sure is to try it and measure it. The answers you get for different data/machines is likely to be different.

Stewart