Results 1 to 14 of 14
  1. #1
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts

    Trim Function: Windows 10 Preview running under VMWare Virtual Machine in Windows 10

    I am using Windows 10 as my OS on a Solid State Drive. I test/evaluate Windows 10 Preview builds installed on a VMware virtual machine. From time to time, VMWare advises me to either "Compact Disk" or to "Defragment Disk" to free up disk space (presumably to free up the "virtual" C: drive). Does this indicate that the "Trim" Function is not working within VMWare? I am reluctant to run "Defrag" as the only time I chose to do so within the virtual machine it ran for several hours and was clearly not performing a Trim as one would expect with Windows 10 on an SSD.

    I can understand the need to use the VMWare "Compact" command on the disk to free up unused virtual disk space for the main (non virtual OS) to use.

    Any comments/suggestions/advice?

    Last edited by petesmst; 2016-03-03 at 05:06. Reason: Corrected a typo
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    Virtual Machines don't use the disk, they write to a file that is treated by the VM as a disk.
    Compact / defrag refers to the file the VM is using and it's safe to do as suggested.

    cheers, Paul

  3. The Following User Says Thank You to Paul T For This Useful Post:

    petesmst (2016-03-11)

  4. #3
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: A belated thanks! (I suspect the defrag in this context is pretty heavy on SSD Read/Write activity?)
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  5. #4
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    So what? SSDs are tough and you want the speed...

    cheers, Paul

  6. #5
    Super Moderator jwitalka's Avatar
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    6,793
    Thanks
    117
    Thanked 798 Times in 719 Posts
    A good explanation of how Windows "defrags" SSDs:
    http://www.hanselman.com/blog/TheRea...ntYourSSD.aspx

    Jerry

  7. The Following 2 Users Say Thank You to jwitalka For This Useful Post:

    access-mdb (2016-03-12),petesmst (2016-03-12)

  8. #6
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: Thanks. I am not concerned about SSD activity (excessive or otherwise), but I did want to place on record the "facts" because there are many posts in the Lounge by those who continually warn against "defragmenting" SSDs "because of excessive wear" (which is effectively what the VM will do when it compacts the disk.

    Having said that, jwitalka's thread (#5 above) is worth reading and I would suggest posting under "Hardware" in the Lounge. Very interesting! (Thank you)
    Last edited by petesmst; 2016-03-12 at 06:55. Reason: Corrected typos
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  9. #7
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    Pete, what are you saying the VM will do during a compact? If it's just some disk IO, then the VM has plenty of that when it's running and I can't see a bit more for a file compaction being an issue.
    When we suggest you don't defrag your SSD it's because it's a waste of time as all areas are accessed at the same speed, unlike a mechanical disk which has to move physical heads.

    Bit slow there Jerry!
    http://windowssecrets.com/forums/sho...=1#post1025309

    cheers, Paul

  10. #8
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: I am not sure of exactly what the compact function does (when it reduces the size of the space used by the VM). I have run it (once) and it ran for nearly an hour(!) This was after an upgrade to a new build of Windows 10 (on Fast Track) having then run a "Disk Clean" from within Windows 10 to remove Windows.Old and Windows Update files. -- And I don't exactly have a slow system (see my signature below).
    Last edited by petesmst; 2016-03-13 at 05:48. Reason: Added last senetence
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  11. #9
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    That will be a complete file re-build, which is useful in a mechanical disk, but probably not much value on an SSD.
    Did it make any difference to the speed of the VM?

    cheers, Paul

  12. #10
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: No noticeable difference in speed. I think all that happens is tidying up of the virtual drive, which as you say, may be useful for a mechanical disk. (It's just annoying to have to see the "compact disk now" pop-up menu each time I shut down the VM!)

    To Confuse things, there are three optional processes available in VMWare Workstation Pro (V12):

    - Compact Virtual Hard Drive.

    - Defragment Virtual Hard Drive.

    - Clean Up Hard Drive.

    According to the VMWare Workstation User Guide:

    Compacting Virtual Hard Disk

    Compacting a virtual hard disk reclaims unused space in the virtual disk. If a disk has empty space, this process reduces the amount of space the virtual disk occupies on the host drive.


    Defragment a Virtual Hard Disk

    Like physical disk drives, virtual hard disks can become fragmented. Defragmenting disks rearranges files, programs, and unused space on the virtual hard disk so that programs run faster and files open more quickly. Defragmenting does not reclaim unused space on a virtual hard disk.

    Defragmenting disks can take considerable time.



    Solid-State Drives

    If your host machine has a physical solid-state drive (SSD), the host informs guest operating systems they are running on an SSD.


    This allows the guest operating systems to optimize behavior. How the virtual machines recognize SSD and use this information depends on the guest operating system and the disk type of the virtual disk (SCSI, SATA, or IDE).

    On Windows 8, Windows 10, Ubuntu, and Red Hat Enterprise Linux virtual machines, all drive types can report their virtual disks as SSD drives.


    And to further confuse everyone:


    Clean Up a Virtual Disk


    Clean Up a Virtual Hard Disk on Windows Hosts

    When you delete files from your virtual machine, the disk space occupied by those files is not immediately returned to your host system. If a virtual disk has such empty space, you can use the Clean up disks command to return that space to the hard drive on a Microsoft Windows host.

    The Clean up disks command is similar to the Compact command in the Workstation Pro virtual machine settings and the shrink command provided by VMware Tools. The Clean up disks command has these advantages:

    You can use the Clean up disks command with virtual machines that have snapshots or are linked clones or parents of a linked clone.

    The Clean up disks command reclaims more disk space than the Compact command.

    The Clean up disks command reclaims disk space from the current state of the virtual machine, from any powered-off snapshots, and from any powered-on snapshots where the guest operating system is Windows XP or later and you have installed a version of VMware Tools that is compatible with Workstation 8 or later.

    Unlike the Defragment command and the shrink command provided by VMware Tools, the Clean up disks command does not require any extra disk space on the host. The Clean up disks command operates directly on the virtual disk (.vmdk) files.


    And lastly, there's this (although I note the post is quite old: September 2011):

    http://blogs.vmware.com/vsphere/2011...-guest-os.html
    Last edited by petesmst; 2016-03-14 at 06:32. Reason: Added link in last few lines
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  13. #11
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    I think that's called "comprehensive" documentation!

    cheers, Paul

  14. #12
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: Yes, detailed indeed. But despite that, I am still not sure which of the three options is the most "necessary" when using an SSD (if any). It is clear (at least to me) that an OS in a VM can NOT trim the SSD on which it is mounted. It can (in the case of VMWare) Defragment; or Compact its drive. Both involve a fair amount of r/w activity. When the VM is shut down, VMWare can "Clean" the allocated drive space for it's VMs. This also involves much r/w activity. Once this has been done, the host OS of the system can trim the SSD in the usual way. Whether or not the user is paranoid about "too much" SSD r/w activity is a personal choice.

    Regardless of the foregoing, I have not noticed any visible change in speed of my VMs over time when none of the above three options have been used.

    So what does all this mean? I have no idea!!!

    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

  15. #13
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,180
    Thanks
    47
    Thanked 983 Times in 913 Posts
    As you see no difference I'd not bother doing any sort of compact / defrag.

    cheers, Paul

  16. #14
    5 Star Lounger petesmst's Avatar
    Join Date
    Dec 2009
    Location
    Cape Town, South Africa
    Posts
    790
    Thanks
    38
    Thanked 43 Times in 33 Posts
    @Paul T: I concur and have been acting accordingly.
    (My Setup: Custom built: 4.00GHz Intel Core i7-6700K CPU; MSI Z170A Gaming Carbon Motherboard (Military Class III); Win 10 Pro (64 bit)-(UEFI-booted); 16GB RAM; 512GB SAMSUNG SD850 PRO SSD; 120GB SAMSUNG 840 SSD; Seagate 2TB Barracuda SATA6G HDD; 2 X GeForceGTX 1070 8GB Graphics Card (SLI); Office 2013 Prof (32-bit); MS Project 2013 (32-bit); Acronis TI 2017 Premium, Norton Internet Security, VMWare Workstation12 Pro). WD My Book 3 1TB USB External Backup Drive). Samsung 24" Curved HD Monitor.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •