none
Compressed drive and VM's

    Question

  • I have seen several postings regarding running compressed drives in the VM and subsequent performance increases by doing so. The thery is while there is a slight increase in cpu load the IO is decreased due to the ability of the system to grap larger data segments due to the compression.
    So I tried this and it does seem to be better in some cases however in general not a good practice, Exchange, SQL and Sharepoint do not handle compressed drive very well or at all.
    This being said I would say no to compression.
    Thursday, February 21, 2008 2:08 AM

Answers

  • This is complicated. There isn't a one size fits all answer. I ran many hundreds of tests using PassMark's PerformanceTest 6.1 benchmarking software. Instead of using the defaults, all of the tests were conducted without the 3D graphics tests because those are meaningless in a virtual machine and would only serve to skew the results.

     

    Speaking of skewing the results, there is a significant problem in benchmarking virtual machines due to caching. If the same performance tests are run one after another without rebooting the host, there is a marked improvement in running the tests a second time. Subsequent executions of the same tests show no improvement after the second execution. The point is that you must be very careful to make sure something hasn't skewed the results.

     

    I'm not allowed to publish benchmarking results from Hyper-V because of the NDA. The following results are from running Virtual PC and VIrtual Server.

     

    1. IBM laptop single core 32 bit Vista with 2 GB of ram

    2. Dell D820 dual core 64 bit Vista with 4 GB of ram with only 3.25 GB usable because of the chipset

    3. Compaq single core 64 bit Vista with 2 GB of ram

    4. Dell server with four dual core Xeons and a 15,000 rpm SCSI disk array with 32 GB of ram

    5. Dell dual core Pentium D with 2 GB of ram

     

    Hard drives tested

     

    1. USB flash drive

    2. 4200 rpm PATA

    3. 5400 rpm PATA

    4. 7200 rpm PATA

    5. 7200 rpm SATA

    6. 7200 rpm eSATA

    7. the 15,000 rpm SCSI disk array

     

    Hard drive configurations

     

    1. internal primary drive

    2. internal secondary

    3. external USB

    4. external Firewire

    5. external eSATA

     

    Virtual machines were supplied 1 GB of ram, except in the case of the server. Tests were run on the server with both 1 GB and also 3.625 GB of ram. Only one virtual machine was running at a time. During the tests, no other programs were running.

     

    Conclusions for the performance differences between a compressed vs. uncompressed vhd

     

    1. CPU performance metric differences were statistically insignificant.

    2. Memory performance was slightly better overall by a few percent with an uncompressed vhd.

    3. Disk read speeds were slightly better in most configurations using a compressed vhd. The best improvement was seen with the USB flash drive, which should probably be assumed to be the slowest device. This finding is consistent with what Taylor Brown postulated about slower disks.

    4. Sequential write to disk was much worse with a compressed vhd, anywhere from 2x to 6x worse.

     

    When the analysis focuses on the server, things get more complicated. With 1 GB allocated to the vm, the results are usually consistent with the other machines. But when 3.625 GB was allocated to the vm, the server results changed in favor of an uncompressed vhd. Disk, cpu, and memory were about 2x better on the server using an uncompressed vhd when large ram was allocated.

     

    I am inclined to not compress vhd files. The most compelling case for compressing vhd files is when you are running out of space. There's no argument they compress quite a bit.

     

    Monday, February 25, 2008 4:11 AM

All replies

  • I do not agree.

     

    We're talking about compressing the VHDs on the host here. This means that applications like SQL and Exchange have nothing to do with the file compression as we will not be compressing inside the VHDs.

     

    The general story is that decompressing the VHD is more efficient than reading the full load of data when no compression is being used. I have not fully tested this approach, but I think the scenario might be true for situations where you use fixed VHD drive sizes and drive activity mostly consists of reading.

     

    I am interested to see what the official MS standpoint is regarding compression and Windows Virtualization.

    Thursday, February 21, 2008 8:07 AM
  • I am talking about compressing the vhd's - and yes sql is effected if you virtualize sharepoint and other sql related apps.
    I know the sharepoint database can not be compressed as you can not add a new Web App unless the database is uncompressed.
    Typicaly the host is uncompressed also
    Thursday, February 21, 2008 2:09 PM
  • I will have to give this a try, this might get you some improvments on a machine with slow disks.  I expect that a server with decent storage would suffer from the increased CPU and memory requriments from the decompression and compression.

     

    Friday, February 22, 2008 5:58 AM
  • This is complicated. There isn't a one size fits all answer. I ran many hundreds of tests using PassMark's PerformanceTest 6.1 benchmarking software. Instead of using the defaults, all of the tests were conducted without the 3D graphics tests because those are meaningless in a virtual machine and would only serve to skew the results.

     

    Speaking of skewing the results, there is a significant problem in benchmarking virtual machines due to caching. If the same performance tests are run one after another without rebooting the host, there is a marked improvement in running the tests a second time. Subsequent executions of the same tests show no improvement after the second execution. The point is that you must be very careful to make sure something hasn't skewed the results.

     

    I'm not allowed to publish benchmarking results from Hyper-V because of the NDA. The following results are from running Virtual PC and VIrtual Server.

     

    1. IBM laptop single core 32 bit Vista with 2 GB of ram

    2. Dell D820 dual core 64 bit Vista with 4 GB of ram with only 3.25 GB usable because of the chipset

    3. Compaq single core 64 bit Vista with 2 GB of ram

    4. Dell server with four dual core Xeons and a 15,000 rpm SCSI disk array with 32 GB of ram

    5. Dell dual core Pentium D with 2 GB of ram

     

    Hard drives tested

     

    1. USB flash drive

    2. 4200 rpm PATA

    3. 5400 rpm PATA

    4. 7200 rpm PATA

    5. 7200 rpm SATA

    6. 7200 rpm eSATA

    7. the 15,000 rpm SCSI disk array

     

    Hard drive configurations

     

    1. internal primary drive

    2. internal secondary

    3. external USB

    4. external Firewire

    5. external eSATA

     

    Virtual machines were supplied 1 GB of ram, except in the case of the server. Tests were run on the server with both 1 GB and also 3.625 GB of ram. Only one virtual machine was running at a time. During the tests, no other programs were running.

     

    Conclusions for the performance differences between a compressed vs. uncompressed vhd

     

    1. CPU performance metric differences were statistically insignificant.

    2. Memory performance was slightly better overall by a few percent with an uncompressed vhd.

    3. Disk read speeds were slightly better in most configurations using a compressed vhd. The best improvement was seen with the USB flash drive, which should probably be assumed to be the slowest device. This finding is consistent with what Taylor Brown postulated about slower disks.

    4. Sequential write to disk was much worse with a compressed vhd, anywhere from 2x to 6x worse.

     

    When the analysis focuses on the server, things get more complicated. With 1 GB allocated to the vm, the results are usually consistent with the other machines. But when 3.625 GB was allocated to the vm, the server results changed in favor of an uncompressed vhd. Disk, cpu, and memory were about 2x better on the server using an uncompressed vhd when large ram was allocated.

     

    I am inclined to not compress vhd files. The most compelling case for compressing vhd files is when you are running out of space. There's no argument they compress quite a bit.

     

    Monday, February 25, 2008 4:11 AM
  • Good work and I believe your analysis is correct and logical. Generally speaking you conclude uncompressed may be slightly better from the performance stand point and I would agree.

    Monday, February 25, 2008 4:30 AM
  • Hi John,

     

    That's very interesting indeed. Thanks for sharing the results.

     

    Regards,

     

    Ray

     

    Monday, February 25, 2008 7:28 AM
  • I just wanted everybody to know I corrected my original post. In case you missed the correction, here it is:

     

    If the same performance tests are run one after another without rebooting the host, there is a marked improvement in running the tests a second time.

     

     

    Just to reassure you, my published results are based on initial executions. I rebooted lots and lots of times, which made it quite tedious to collect all of the data.

     

    Monday, February 25, 2008 5:45 PM