TRIM helps keep SSDs running at their full speed. You can find out more about this on the Wiki page: http://en.wikipedia.org/wiki/Trim_%28computing%29
I am guessing you know if you have an SSD or not. If you are unsure run this command:
If you got 0 it's a SSD. If the output was 1 it's a HDD.
Even if you have an SSD not all of them support TRIM.
To find out if yours does run:
If what you get back is this:
Then you are all good to go. If there's no output, your SSD doesn't support TRIM.
Next run:
You should see an output that looks something like this:
If everything went OK it's time to make a CRON job so fstrim run's once a day.
To do this run:
and paste this into Gedit and save it.
That's it. You now have TRIM enabled.
I am guessing you know if you have an SSD or not. If you are unsure run this command:
Code:
cat /sys/block/sda/queue/rotational
If you got 0 it's a SSD. If the output was 1 it's a HDD.
Even if you have an SSD not all of them support TRIM.
To find out if yours does run:
Code:
sudo hdparm -I /dev/sda | grep "TRIM supported"
If what you get back is this:
Code:
* Data Set Management TRIM supported
Then you are all good to go. If there's no output, your SSD doesn't support TRIM.
Next run:
Code:
sudo fstrim -v /
You should see an output that looks something like this:
Code:
/: 87781376 bytes were trimmed
If everything went OK it's time to make a CRON job so fstrim run's once a day.
To do this run:
Code:
gksu gedit /etc/cron.daily/trim
and paste this into Gedit and save it.
PHP Code:
#!/bin/sh
LOG=/var/log/trim.log
echo "*** $(date -R) ***" >> $LOG
fstrim -v / >> $LOG
fstrim -v /home >> $LOG
That's it. You now have TRIM enabled.