Some Best Practices for your Next MySQL Installation with SSD
The Performance Zone is presented by AppDynamics. Scalability and better performance are constant concerns for the developer and operations manager. Try AppDynamics' fully-featured performance tool for Java, .NET, PHP, & Node.js.
Do you plan on installing a new MySQL server?
Did you ask yourself what is the best file system for it?
What modification are recommended?
What MySQL version to use?
Do you consider using SSD?
You got to the right place.
Linux, SSD and MySQL. The Best Practices
- Up to date CentOS (6.3). MySQL RPM are easily available for this platform w/o the need to compile them.
- ext4 file system. It is has some goodies over ext3 and is even more recommended if you plan to use SSD (and you may need SSD if your system is resource demanding).
- File system discard option. Recommended for SSD to avoid the need to read before write.
- Consider some extra cheaper disks. SSD disks are highly expensive and can have a relatively short life if they are not used properly. Consider placing some cheaper disks (SAS or SATA) to handle tasks that do not require the high end SSD disks.
- Some more recommendations about Linux and SSD from Patrick's:
- File system layer: remove 'relatime' if present and add 'noatime,nodiratime,discard' to reduce writes and improve performance and disk life expectancy.
- Scheduler: use the 'deadline' scheduler instead of 'CFQ' to match SSD behavior.
- Swap: set a small swappiness
- tmp: move /tmp and /var/tmp to RAM disk to improve performance and avoid unneeded writes to disk.
- Partition Alignment: when creating a partition, enter a start sector of at least 2,048 and divisible by 512 to align pages.
- MySQL 5.6. 5.6 if finally in GA and it good idea to start working with it before 5.5 become obsolete.
Few decisions can enhance your MySQL performance. Make your decisions right.