Mysql – Install MySQL on SSD, best mount options

mountMySQLperformancessd

I want to install the mysql-server on my SSD, what are the best mount options for this? (/etc/fstab)

What else I can do to increase the SSD Speed?

My current configuration:

/dev/sdc /ssd ext4 errors=remount-ro,noatime,nodiratime,discard 0 0

I installed first the package via apt-get and after I changed in the my.cnf the datadir to the ssd.

Thank you very much!

Best Answer

"Best mount options" is like asking for the "best flavor of pizza." Different mount options provide different functionality (obviously!). You should read the mount(8) man page, for a description of all the various mount options, for your file system.

This blog provides several speed-optimizing mount options you might consider, and explains some of the risks of using some of them.

Really, I don't think there's much difference between the mount options you would use for an SSD versus a traditional hard drive--except that there should be much less need to care at all for an SSD, since it's already much faster--especially for random seeks. So things like 'noatime', while they will likely improve performance on an SSD, will probably improve it almost imperceptibly, compared to a physical disk, where writing a single 'atime' record is a lot more expensive, relatively speaking.