Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Defragmenting and Virtualization

I can't find it now, but I read an Apple support article that listed the reasons that HFS+ doesn't need to be defragmented. Among the reasons was that Macs completely re-write files into physical locations that have enough space every time they are changed. What about virtual machines with "dynamically expanding" virtual hard drives? Surely the OS isn't going to re-write the entire virtual drive every time I do stuff in Virtual Box, VMware, or Parallels. I therefore NEVER use dynamically expanding drives, but that is a pain because I love trying lots of different OS's in Virtual Box (I'm installing PC-BSD now). Does my Mac somehow keep dynamically expanding VM drives defragmented somehow? Or should I stick with static-sized drives? Or should I find a defragmenting utility for OSX?

MacBook Pro, Mac OS X (10.6.7)

Posted on Apr 20, 2011 5:26 PM

Reply
2 replies

Apr 20, 2011 7:21 PM in response to R. Toby Richards

The Mac doesn't know or care what goes on with an application, including a virtual machine. It treats them all the same. The optimization takes the size of the file into consideration. For example, if you open a small word processing document, the operating system may be able to read the entire document into memory. Then, when you save, it can write the entire document to disk in the same or less time than it would take to update the old version on disk. It isn't going to be able to do this with a virtual machine. It is up to the virtual machine software to keep it's filesystem defragmented. You wouldn't want the Mac involved with that.


Don't try to second-guess the software. Just use the defaults and they will be fine. It is designed to work that way. Depending on the guest operating system, you may need to run a defragmentation tool in the client. You don't need to that in MacOS X.

Defragmenting and Virtualization

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.