CentOS 6.6, Best way to trim SSD

General support questions
Post Reply
jimgb17
Posts: 1
Joined: 2015/07/25 03:48:14

CentOS 6.6, Best way to trim SSD

Post by jimgb17 » 2015/07/25 04:15:29

Hi am i am new here..
I have a always on server running with CentOS 6.6 as a VOIP Pbx.
i have a 256gb samsung pro SSD installed on the box.
What is the best way to Trim the ssd ?
via ,discard fstab
Or the fstrim -v / via webmin cronjob.
or both?
I have been reading and some say using the ,discard mount option is not good.
At this time i have ,discard for all my mounted ext4 partitions.
if i run the fstrim -v / command manualy after some time it trims some data..
Is this normal ? shouldn't ,discard trim the ssd and fstrim -v / should give 0 bytes were trimmed ?

rklrkl
Posts: 75
Joined: 2005/10/22 22:06:04
Location: U.K.

Re: CentOS 6.6, Best way to trim SSD

Post by rklrkl » 2015/07/26 10:13:29

I've used the noatime,discard options in my /etc/fstab's SSD partition lines for several years now for both SATA and PCIe SSDs without any issues. However, yoiu may find some brands of SSDs (mine are Intel, Corsair and OCZ) might not like the discard option. A very thorough SSD optimisation Debian Wiki is worth a read on this point:

https://wiki.debian.org/SSDOptimization

I max out my motherboard RAM at 32GB which allows me to have no swap partition at all on the SSD (ideally you don't want one because of possibly heavy writes to it if your RAM is tight). Your aim with an SSD is minimise the number of large writes you do to it, so I store all my media on boring old (but still as fast as I can find on the market) 3TB/4TB HDDs.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: CentOS 6.6, Best way to trim SSD

Post by toracat » 2015/07/26 19:05:44

That is a nice article to read. By the way, Red Hat recommends use of fstrim over discard. Some relevant links can be found in this blog.
CentOS Forum FAQ

Post Reply