VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
2 Replies Last post: Mar 17, 2009 10:59 AM by Obeechi  

Compression: to NTFS Compress the Virtual Disks or Not? posted: Mar 15, 2009 8:35 PM

Click to view Obeechi's profile Hot Shot 437 posts since
Jan 25, 2007
On the flip side of Increasing Virtual Disk size is the question of Compression. Both address availability of space. Someone here told me I need to shrink after compressing in the VM for the space to be available to the Host (OSX). I posed my question in terms of using Zip... but then the question of NTFS compression raised itself, and whether best practice would be to compress the whole virtual disk. I'm running Vista and have four virtual disks, two of which are for backing up (no. 3), and archiving (no. 4).

In a Vista virtual environment running on the Mac, is there a best practice that can be suggested, between NTFS compression and Zip compression, and between compressing the entire disks, or just folder(s), or individual files?

EDIT: I've never used compression on a Virtual Machine, and neither on a non-virtual. What I've read makes it seem that Zip compression can't be used for when you want to access individual files within a zip compressed folder. Neither does Zip seem to be offered for whole disk (virtual disks in this case). Though Zip compression is said to be greater compression, NTFS compression seems more sensible to use because you can compress the whole disk and access individual files. However, something I read somewhere suggested that if you use NTFS compression then it's going to eat up greater CPU usage, even when you're not accessing files on the compressed disk. As a VM already puts a good burden on the CPU, I hope this isn't true. What's the pragmatic truth in this, for compressing in a VM without losing access to individual files, without taxing the CPU (if that's even true). Is NTFS compression the best choice, and how will this affect the need to shrink? Will shrinking after turning NTFS compression on be required?
Click to view jim.gill's profile Hot Shot 245 posts since
Jan 6, 2005
NTFS compression works fine in a virtual machine. As with everything, there are tradeoffs: compressing your NTFS disks can reduce the amount of space your VM takes up on the Mac, but at the cost of some performance (Windows needs to decompress all this data after reading it from the disk).

The way virtual disks work, though, means your vmdk files don't get smaller just because you compress the files within them. A virtual disk grows whenever Windows writes to a part of the (virtual) disk for the first time. It doesn't shrink back when a file is deleted; that space stays as "unallocated" space in the Windows filesystem. So if you take an NTFS disk and have Windows compress it, all the space that's recovered becomes "free space" to Windows, It isn't released back to the Mac, but it can slow down further growth of the vmdk file.

To recover this empty space back for your Mac, you can shrink the disk: in Fusion 2.x, this works best if you right-click the VMware Tools icon in the tray and shrink from there. It won't let you shrink while there are outstanding snapshots.

One way to limit the compression performance hit is to compress particular files or folders, rather than the whole disk. That's what I do on my home Windows machine, where there's tons of stuff like Visual Studio sample code that I like to have around, but hardly ever look at.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities