Does anyone really know when a TRIM takes place?

Discussion in 'Linux Guest OS Discussion' started by Parallels User, Mar 2, 2018.

  1. On a MacBookPro with the Apple SSD formatted for APFS. My Mint VM is configured with the hard disk box checked "Support Trim". Linux typically does not issue a TRIM after every delete, just runs a cron job once a week.
    Two questions:
    1. Does the Parallels support under 13.3 and MacOS 10.13.3 support queued TRIM commands? Are the native SSD characteristics passed thru to the VM?
    2. When is one or more TRIM commands ACTUALLY issued by Parallels? When the VM issues a TRIM? When the virtual disk is closed as Parallels quits?

    Kind of makes a difference if you are doing big compile/link/load testing for hours on end.
     
  2. mmika

    mmika Kilo Poster

    Messages:
    358
    "Support Trim" - means online compact feature for expanding virtual disk. Parallels will try to reduce disk size as a response on TRIM command came from Linux.
    So, if this command issued once a week, parallels will handle it at same time.
    Looks like you need to tune cron job or add fstrim call to your testing scripts.
    PS: yes, some sort of "native SSD characteristics" passed to VM when "Support Trim" checked. i.e virtual disk rotation rate reported as 1, meaning SSD.
    Regards.
     
  3. Thank you. There are actually THREE systems involved - Linux that issues a TRIM via cron job, Parallels when Linux issues the TRIM, and MacOS through APFS when a block is deleted. I have not noticed any shrinkage on the virtual disk file after a fstrim pass. Is Parallels really returning the freed blocks to APFS or just marking them free on the virtual disk image. I also haven't found any information on APFS use of TRIM and when it is issued. I guess my best path is to leave some free space on the MacOS X disk as well as on the Linux virtual disk and assume that deleted block reclaim is happening in a reasonable manner.
     
  4. mmika

    mmika Kilo Poster

    Messages:
    358
    I checked clean installation of linux Mint 18.3 on virtual SATA HDD with TRIM enabled setting.
    After I purged a set files I copied from cd to test and run `fstrim /` virtual disk file size significantly decreased.
    So basically this feature works. There could be issues with a size of data to be trimmed and it's location related to internal virtual disk block size.
     
    Parallels User likes this.
  5. Thanks ... I was going to do something similar. So "no worries mate" as far as TRIM.
     
  6. MejarkonS

    MejarkonS Bit Poster

    Messages:
    3
    iOS is the good operating system for security wise? when you installing the windows on the Mac then your System will be restart automatically then you are sure your iOS Installation and ROM. You can also search for the iTunes installation issue 0xe8000015 of iOS.
     
    Last edited: Oct 30, 2018
  7. MejarkonS

    MejarkonS Bit Poster

    Messages:
    3
    Send me please
     

Share This Page