Performance Zone is brought to you in partnership with:

' ! Moshe Kaplan constantly helps successful firms getting to the next level and he is thrilled to uncover some of his secrets. Mr. Kaplan is a seasoned project management and cloud technologies lecturer. He is also known to be a cloud and SCRUM evangelist Moshe is a dSero.com Co-Founder. He was a R&D Director at Essence Security, led RockeTier and served as a board member in the IGT and as a department head at a top IDF IT unit. Moshe holds M.Sc and B.Sc from TAU. Moshe is a DZone MVB and is not an employee of DZone and has posted 59 posts at DZone. You can read more from them at their website. View Full User Profile

Some Best Practices for your Next MySQL Installation with SSD

03.06.2013
| 3420 views |
  • submit to reddit

 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

  1. Up to date CentOS (6.3). MySQL RPM are easily available for this platform w/o the need to compile them.
  2. 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).
  3. File system discard option. Recommended for SSD to avoid the need to read before write.
  4. 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.
  5. Some more recommendations about Linux and SSD from Patrick's:
    1. File system layer: remove 'relatime' if present and add 'noatime,nodiratime,discard' to reduce writes and improve performance and disk life expectancy.
    2. Scheduler: use the 'deadline' scheduler instead of 'CFQ' to match SSD behavior.
    3. Swap: set a small swappiness
    4. tmp: move /tmp and /var/tmp to RAM disk to improve performance and avoid unneeded writes to disk.
    5. Partition Alignment: when creating a partition, enter a start sector of at least 2,048 and divisible by 512 to align pages.
  6. MySQL 5.6. 5.6 if finally in GA and it good idea to start working with it before 5.5 become obsolete.

Bottom Line
Few decisions can enhance your MySQL performance. Make your decisions right.
Keep Performing,
Moshe Kaplan



Published at DZone with permission of Moshe Kaplan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)