VMware Communities
Obeechi
Contributor
Contributor

Shrink. Before Or After Virtual Defrag?

I think I've asked this a few times already.

I understand that defragging should be from inner to outer, so its

1. Defrag Guest

2. Virtual Defrag

3. Defrag Host

I understand that both defragging in the Guest and deleting files in the Guest will cause the Virtual (sparse) Disk to grow. I further understand that Shrinking is a way for the Host to be made aware of the disk space that is available, but otherwise Host is oblivious to this.

I understand that Host defragging makes sense because Virtual Files are large files and OSX's native defragging is better suited for smaller files (isn't Unix all about smaller files anyways?...)

I understand that if you have a Preallocated disk that Virtual Defragging is not necessary.

So it makes sense to Defrag the Guest before Shrinking, as you would benefit from Shrinking after the Guest based Defrag so OSX knows it has free space available. This assumes one hasn't allowed their VM to overgrow it bounds by too much, and 2GB splits help to alleviate the need for available space during the Shrink process as well any future or further defragging process (all three types or two or one?).

What I don't know, and really wonder about, for basic maintenance, is it better to Shrink before or after the Virtual Defragging. It seems that it would be a good idea to Shrink after the Guest Defrag, but before the Host Defrag.

Tags (1)
0 Kudos
2 Replies
WoodyZ
Immortal
Immortal

I think I've asked this a few times already.

Then why are you asking it again.

I understand that defragging should be from inner to outer, so its

1. Defrag Guest

2. Virtual Defrag

3. Defrag Host

If you've already asked and you understand the steps then again why are you asking again.

What I don't know, and really wonder about, for basic maintenance, is it better to Shrink before or after the Virtual Defragging.

This contradicts what you've previously said.

It seems that it would be a good idea to Shrink after the Guest Defrag, but before the Host Defrag.

What you said you already understand "I understand that defragging should be from inner to outer, so its..." is exactly how you should do it although split-sparse disk are only unfragmented for a extremely short period of time and the benefit is short lived compared to using monolithic-flat or split-flat disks with monolithic-flat providing the best benefits since all the is necessary after defragging the host once (providing you don't move it) it to just defrag the guest from time to time.

Anyway this subject has been covered many times and a search of the forum would yield all that been covered before.

0 Kudos
drummelhart
Enthusiast
Enthusiast

you all compress each virtual Guest after you defrag?

Will compression damage data?

0 Kudos