Am I killing my SSD?

ChRoNo16

[H]ard|Gawd
Joined
Feb 3, 2011
Messages
1,522
I have a small esx host here the host OS runs on an SSD, and a linux vm and 1 windows VM.

If I defragment that windows VM, amd I killing the ssd? i know ur not supposed to defrag an ssd. but this is a file within that right?
 

Blue Fox

[H]F Junkie
Joined
Jun 9, 2004
Messages
11,811
The wear would be similar, even if you defragment within a VM. There's no reason for you to do it as you really won't have any performance gains from it.
 

Absalom

Gawd
Joined
Oct 3, 2007
Messages
922
If you do it infrequently, it won't kill the SSD, at least anytime soon. But that act of doing it, even on a VM, is pretty much pointless. Assuming that the virtual filesystem is not passthrough and configured as a single contiguous file, then the only difference is that the VM would be reading/writing to/from a single file instead of many files. The underlying hardware still has to seek within that file just like any other file on the host filesystem. On an SSD, whether that file is physically contiguous (i.e. defragmented) or not means nothing to the SSD. All requests for data by the host get translated into hardware commands for the SSD controller. At that point, the controller doesn't know or care what a file or filesystem is. It just goes and fetches the data.
 

Brian_B

2[H]4U
Joined
Mar 23, 2012
Messages
3,356
If your host were running on a platter drive, and you were talking about defragging the host - would get some benefit there.

But defragging an SSD, or inside a VM that is stored as a file on the host - neither one of those is doing you any good.
 

pendragon1

Fully [H]
Joined
Oct 7, 2000
Messages
32,764
windows knows the difference between a hdd and a ssd. when you optimize/defrag a ssd it does the trim stuff not a normal hdd defrag.
 

Pandur

Limp Gawd
Joined
Apr 4, 2000
Messages
320
windows knows the difference between a hdd and a ssd. when you optimize/defrag a ssd it does the trim stuff not a normal hdd defrag.

You are in theory correct. This would depend entirely on the configuration of the VM host. Since you can choose if the virtual drive will identify as a hdd or ssd in the settings (at least this has been the case with all the host setups I have used before). But like you said, if this is a modern Windows, the defrag client will say optimise for ssd and defrag for hdd.

To add my answer to the pile; I would optimise the host os and leave the guest os alone, OP. No need to run the defrag in the Windows VM. The virtual drive is stored on a ssd so access times are good even if the virtual drive looks fragmented inside the VM.
 

Seagate_Surfer

Official Seagate Rep
Joined
May 18, 2017
Messages
53
Hello ChRoNo16! Seagate here. SSD’s by their very nature don't have a file structure as they are a group of flash memories. Defragmenting an SSD will just shorten the drive's lifespan and does not have an effect on its performance. There is an optimization technique that replaces defragmentation which is called TRIM Command. You can read more about it at here.
 
Top