0

I want to understand if and how fstrim will improve performance on a ssd drive that hasn't been trimmed for some good time because it was used by an OS that didn't support trim or assume OS/filesystem was not SSD aware. Assume a recent ssd with trim support. This is purely for my understanding and knowledge.

As per my understanding a trim command can only be issued if you know the sectors that have been freed in OS/filesystem but were not notified to SSD and therefore SSD didn't really delete them. Hence writing to these sectors will require deleting the existing data and then writing the new data.

Let's consider this example.. 1. A recent SSD with native trim support but an old OS that is not SSD aware (say windows 2000) 2. I use the system for a year or so and assuming that windows 2000 is not SSD aware my system will become slow over time. 3. Now assume that I delete a lot of files from this system (say deleted everything except the OS), freed almost 200gb. I assume that this information does not go to SSD as trim is not supported 4. Now i plan to use a SSD aware OS say a recent Linux distribution 5. During Linux installation I formatted the drive using ext4 6. I run fstrim

So this is where my question comes. Will running fstrim will help here? I assume not because for the newly installed Linux system there hasn't been much of deletion yet so there is nothing to trim from the perspective of Linux.

If my understanding is correct, I assume the ATA Secure Erase would be only option to reset the performance here? Anything else?

Many thanks in advance.

1 Answer 1

0

I think I found the answer and blkdiscard is the answer. Before formatting the existing windows2000 partition with ext4, I can discard all the blocks belonging to that partition using blkdiscard application.

Probably I don't even need to do it explicitly as formatting with a recent linux distribution (mkfs.ext4) will implicitly perform a blkdiscard of the partition.

blkdiscard is better than ATA Secure Erase because it works at partition level but ATA secure erase will reset the whole drive.

Now if somebody can confirm my findings that'd be great.

Thanks.

You must log in to answer this question.

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