Short answer: to your question on the effect of disabling TRIM in Trim ready SSDs, I would not do it.
Long answer: here's why:
Loosely quoting from an earlier post:
TRIM prepares at-least-once written physical blocks on an SSD for new write operations (Wop's), obviating the need to actually erase the targeted blocks immediately before the Wop occurs (as would be the case in a setup w/o TRIM). For that the SSD must have a hardware controller that is TRIM-ready. It is not always the case.
In a first phase of use is, i.e. when the brand new SSD has just been installed and is still relatively new, all the SSD blocks have not yet been written over at least once. During that phase TRIM does not kick in systematically and brings limited benefit to the overall r/w speed.
After that early phase, which depends on a number of factors, among them how much you write・access the SSD, Wop's will slown down to reach a speed plateau.
At that stage, a rule of thumb is that TRIM more than halves write-times on TRIM-ready SSDs with respect to the same hardware without TRIM enabled. Some maintain that the regular use of fstrim
, the garbage-collection utility that actually carries out the zero-rewrite on already once written but now discarded blocks, will boost your write-speed by a factor of 4 (yes, 400%!) or more. I (and most people) have no way of controlling that, short of isolating and looking at blocks being written with and without fstrim
's garbage collection at work.
HTH, at least conceptually. To know more you will have to delve in a number of rather technical white papers. They get seriously abstruse to the non-expert.
On the matter of disabling TRIM, first check that your SSD IS TRIM ready and TRIM is enabled:
$ sudo hdparm -I /dev/sda | grep "TRIM supported"
CAUTION: read your man page on hdparm
before using it. You can thoroughly corrupt your system in case of misuse. The command above is completely harmless though.
On Ubuntu, there are two possibilities (known to me):
you may have a discard
as mount option in your /etc/fstab file, for any SSD device typically formatted as either ext3 or ext4. In case your mounted volume has the ext3 format, the discard
mount option is known to actually constrain the volume to be read-only. That would get anybody's attention rather rapidly I think. So chances are any volume with the discard
mount option will be ext4.
you can program fstrim
to run automatically on a regular basis (hourly, daily, weekly or otherwise). To check that you have fstrim
so programmed, enter the following in terminal:
$ find /etc/ trim | egrep fstrim
At least on Ubuntu 14.04.x, which is what I run these days, fstrim
is scheduled to kick in once a week, which is about right for any normal desktop user. You might want to go up to a daily frequency if you run a data write-intensive services, i.e. a performance oriented database management system. WADR, somehow, if you had to ask, I doubt it is the case.
Finally, yes, suppressing fstrim
or removing it from its /etc/cron.{hourly,daily,weekly,monthly}
directory will stop the trimming process on your machine.
My opinion (provided at your request and not as a recommendation you should necessarily follow):
You are probably safe leaving that fstrim
file where it is. If you prefer disabling it, go and buy an equivalent conventional disc based (HDD) drive to replace it. You might be better off than with an SSD with no TRIM activated, having paid a premium for it. But frankly using your extracted SSD as a paper-press would be a pity. That would be taking the discard
option for TRIM garbage collection quite literally.
Best Answer
fstrim
supports the option--all
on Ubuntu 16.04.By default, Ubuntu 16.04 mounts all file systems with
relatime
. This works much better thannoatime
while adding only a very small number of write operations.Do not mess with the I/O scheduler.
For peace of mind, you can use
smartctl
(install it withsudo apt-get install smartmontools
if needed) from time to time to check onLife_Curve_Status
,SSD_Life_Left
, andLifetime_Writes_GiB
:(
Life_Curve_Status
andSSD_Life_Left
have values in percentage points: you will want to replace the SSD when they decrease below 20% or 10%. If you can, make your terminal 132 columns before runningsmartctl
.)Finally, please remember that the 850 EVO is a high-quality expensive SSD from a reputable manufacturer. It is resilient and will last a long time, probably longer than any spinning disc. The only thing you can do which Samsung admits that it would help is to overprovision it a little, that is, when partitioning leave about 5% of unpartitioned space. (This will let the internal remapping / garbage collection algorithms work more efficiently; it you decide to do it then do it only when the SSD is new or after a full-disc trim or a security erase so that the overprovisioned space consists entirely of blocks known to be not in use.)