Yes, I've seen numerous places that talked about using the discard option in fstab, and I even experimented with it for a bit. But, I've also seen several places that said doing it that way wasn't considered a best practice, and that it was better to run it manually. Essentially what I took away from my research was that there's still a lot of debate about what is the best way to administer a system running on an SSD, and there is no clear "correct way" as of yet.
So, what do you do when you have lots of contradicting information? I generally take the more cautious approach, which in this case would be to just run it by hand occasionally...I was thinking maybe once a month would probably be reasonable.
Quote:
Your SSD ware-levels over the entire disk as the controller is not aware of the partition tables; and presents a map of blocks to the operation system that in most cases only it knows how map onto the physical memory cells. So you don't need to worry about part of the disk getting worn out first.
|
In regards to this statement, if I'm understanding you correctly, is that the disk controller automatically reads/writes to cells across the entire disk, regardless of where the partition tables are? I was under the impression that an SSD was similar to a traditional drive in that read/writes can be spread out within a partition, but not across the entire drive?
Quote:
With recent(recent being 3.2.x or newer)kernels if you are using ext4 you can mount it with the discard option as well and you really should never need to run fstrim at all. The exception being when you have been using the filesystem without the discard mount option.
|
Well, I do run ext4 within my root partition, but swap has it's own "swap" filesystem. I suppose I could try just using the discard option for swap in fstab, but I'll have to figure out how to test it (hadn't quite gotten that far yet.)
Quote:
Some corners of the web claim discard is a performance hit; it may be a small one but unless your work load is really unusual you won't notice.
|
Indeed, I have read this on numerous sites; I figured it probably wouldn't be noticeable, but I thought I'd go ahead and take the time to figure it out just so I would understand the whole thing better. Especially since there seem to be a lot of differing opinions, which makes it harder to get a solid answer.
I'll try simply mounting swap with the discard option in fstab, and see if I can confirm whether or not it works, and report back with my findings.