2
1
As part of my coursework I need to show some evidence (screen shot) of myself defragmenting a computer. Since I missed out doing it at college, I need to do it at home. This requires me to use a Windows virtual machine since I have a Mac (needs to be Windows).
Is it safe for me to defrag a virtual machine where the host is a SSD? The reason why I am asking this is because I've heard that you shouldn't defrag SSDs.
The advice not to defrag SSDs to avoid harm is ancient and obsolete. It will do almost no good on a modern SSD, but it won't do any significant harm either. (The main reason to defrag an HD was to reduce latency. Defragging won't affect latency on an SSD. But it will slightly reduce the number of I/Os needed to read/write, which can provide some benefit in IOPS-limited workloads.) – David Schwartz – 2015-12-23T21:13:05.690
@DavidSchwartz So is it still safe to defrag a VM with the host using a SSD? – iProgram – 2015-12-23T22:05:53.903
Yes you can do that. The defrag saga for SSDs means that it is a useless exercise to defrag an SSD because the access time to any point on the SSD is the same and you gain nothing with a defrag - you don't lose anything either. – whs – 2015-12-23T22:16:06.717
1@whs It's not true that you gain nothing. Many SSD operations are IOPS limited, and accessing contiguous data takes fewer I/Os than accessing discontiguous data. – David Schwartz – 2015-12-23T22:58:48.650
Now you are slicing it awfully thin. I deal only with real cases. – whs – 2015-12-24T00:51:18.773
He's not, really. Left unchecked the drive could end up very fragmented, which could easily increase write amplification. That's why Windows 8 and up defrag SSDs monthly. http://www.hanselman.com/blog/TheRealAndCompleteStoryDoesWindowsDefragmentYourSSD.aspx
– afrazier – 2015-12-24T01:29:06.363