You are not logged in.
I read through the relevant Arch WIki entries on TRIM and there are a few things I need to do in particular for an LVM on LUKS setup to enable discard method (I don't think my Samsung 850 Pro 512 GB would suffer too much from using discard--would love to know if anyone things otherwise and would recommend fstrim over discard). My question is: how can I be sure TRIM via discard method is working 100%? I did some googling and found that there are some "tests" that can be performed--unfortunately, all of these small tests that I've come across do not seem to be accurate (they may say TRIM is working when it isn't based on another test, etc.).
Some users have recommended to simply run "fstrim -v /" and if it returns no errors, then TRIM is working, regardless of output. Others have yet that with this method, you need to get specific outputs in order to draw that conclusion (and run it more than once). Is running "fstrim -v /" a definite test for the proper implementation of TRIM? If so, what kind of output should I be looking at? What complicates this matter slightly further is that apparently the command behaves differently depending on the brand/type of SSD.
Thanks.
Last edited by mindstormer (2015-12-11 20:54:04)
Offline
This is a good read
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
Thanks, I actually came across that post in my googling but was wondering if there's a simpler way to test the implementation of TRIM, such as using `fstrim -v /`. If there are no more responses, then I'll do both to check, though I don't know what kind of outputs I should expect from `fstrim -v/` if I can use it to test for trim via discard method.
Offline
From my experience if you do 'fstrim -v /' and it doesn't complain then you have things setup properly and you can either use the discard option or the periodic fstrim. Which one you will have advantages and drawbacks but I'll leave that research to you
Regarding what you read back from the ssd after trim it depends on the ssd, some return zeros right after trim, others will return zeros only after they got around to actually doing some garbage collection and others might always return garbage or some fixed pattern.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Thanks for the information--i'll use both and report back if there are conflicting results when I get the chance.
Offline
Using both doesn't hurt but it's not needed. If you use the discard option then there should not be anything to trim periodically. The discard operation might still take time though, as the filesystem doesn't keep track of which sectors have been trimmed already (at least ext4 doesn't).
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I mean using both the fstrim command and the method described from the stackexchange thread to check if TRIM via discard is implemented correctly
Last edited by mindstormer (2015-12-12 07:19:48)
Offline