2

I have set TRIM to be done weekly using the program that is used for WD BLACK SSDs:

WD Black Tool

This schedule should be fine since I don't really write that often to the drive, and I read that some I/O or OS operations will still write so it should be a good idea.

I'm also wondering if the TRIM operation takes a long time, I can't see it in the background but I'm assuming it takes less than half an hour to complete the operation?

I've also seen other posts that show people using "TRIM" by utilizing the optimize and defrag tool, but I believe all it does is defrag, not TRIM on SSD. Win Optimization

To confirm the WD application I'm using to use TRIM is all I need and the optimize tool just defrags the SSD and not TRIM?

1
  • Some point of reference: in my Kubuntu fstrim takes less than 5 seconds for a Btrfs filesystem occupying almost entire SSD of 500 GB. Sep 24, 2021 at 15:50

3 Answers 3

0

Admin tools, Defragment and Optimize will Optimize your SSD drive and do a TRIM at the same time.

Windows will NOT defrag an SSD drive and you should not try to do that either. The Windows App will do the correct thing.

You only need the Optimize app and that does TRIM.

Time:

Laptop: 1 TB NVMe SSD drive: Trim is well under 10 minutes, although I have never stopped to measure.

Desktop: 2 x 2 TB SATA SSD drives: Trim is also under 10 minutes for each drive.

TRIM is very fast and should be scheduled to run at least monthly.

No harm or outcome running TRIM this way.

2
  • Thanks, I set the optimize app to not do a scheduled check, but set a weekly check for the WD Black application. I guess it doesn't matter which one I use since both just use the TRIM command but I should stick to the one meant for the drive?
    – ShangWang
    Sep 24, 2021 at 16:15
  • Yes TRIM can be very fast
    – John
    Sep 24, 2021 at 16:33
1

The TRIM operation will finish almost immediately. It is simply the process of your operating system notifying the drive controller of what space is "free" to be recycled back into the empty blocks pool to be erased.

How long it takes for the blocks to be erased is almost impossible to know because it depends entirely on the controller, how many blocks were freed, and how heavily the drive is in use. The operating system may also submit TRIM commands as files are deleted, and just use the main "Optimise" to catch everything else so there may or may not be a lot to actually erase in the first place.

The controller will try to use idle time to erase blocks. "Idle" is a vague classification but so long as you are not constantly reading or writing at the full drive speed then chances are that the relevant blocks will most likely be erased within at least a few minutes to a few hours.

The Windows built-in disk "Optimise Drives" tool does indeed issue TRIM commands. If it were defragmenting the drive, something which is entirely pointless on an SSD, then it would say "defragment" instead of "optimise".

2
  • I see, so there is no way to manually defragment a SSD even if you tried. It seems the optimize button does the exact same thing as the TRIM function on the WD Black application as you mentioned, so I guess it doesn't matter which one I use: prnt.sc/1th5x5i So to confirm all the optimize button will do is a manual TRIM correct? It seems like it took more than a few minutes for the TRIM operation to complete for me on 500GB.
    – ShangWang
    Sep 24, 2021 at 16:07
  • 1
    There is no point in defragmenting an SSD. Not only do you not see the actual flash blocks, as all the OS can see is an intermediate "logical" layer that the controller presents as "the disk", all blocks essentially have the same access time characteristics so fragmentation is largely irrelevant. All defragmentation does is read and rewrite blocks on the disk in that case and is considered actively harmful as it is wasting flash write cycles with little actual benefit. HDDs are a physical spinning disk and it is features of the medium that make defragmentation worthwhile on them.
    – Mokubai
    Sep 24, 2021 at 16:11
0

TRIM is not an operation, it's a command to inform the drive about LBA blocks the OS no longer needs. IOW it sort of 'tells' the drive about a file it just deleted that was stored in LBA 12048 - LBA 14077 for example.

Various protocols have different names and commands (ATA, NVMe, SD Card) but they essentially all do the same thing: tell a drive about sectors no longer needed by OS.

In general when a drive receives a TRIM command it 'unmaps' those LBA addresses that were discarded by the OS which can be done almost instantly as it only needs to edit translation tables. For the SSD it is beneficial to know about these so it can consolidate them and erase them (at IDLE time and as part of garbage collection).

If one tries to read the unmapped sectors, in most cases the SSD controller simply returns zeros without even reading the sectors, which explain why recovery of deleted files on SSD drives is close to impossible (although specific circumstances could prevent TRIM from executing or being processed by the drive).

Windows refers to optimization now, no longer to defragging. Although fragmentation still occurs at the file system level, it has no effect on performance of SSD drives, it can affect file recoverability though.

Although Windows Drive Optimization still performs limited defrag I believe, it also TRIM's not in use cluster space. This in addition to Windows sending TRIM commands immediately after file deletion (if TRIM at OS level is enabled).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .