Linux performance tuning tips for MySQL

来源:互联网 发布:网上打麻将软件 编辑:程序博客网 时间:2024/06/11 09:54

Linux performance tuning tips for MySQL

 

by Alexander Rubin, mysqlperformanceblog.com

December 7th 2013

Because most MySQL production systems probably run on Linux, Ive decided to place the most important Linux tuning tips that will help improve MySQL performance. There is nothing new here, most of them are well known, however, Ive decided to collect those Linux configuration tips into 1 blog post.

Filesystem

    1.  use deadline or noop

(For more info see Linux Schedulers in TPCC like benchmark)

Memory

      If using Percona Server we can place it into mysqld_safe script, as Percona Server supports NUMA control.

      Jeremy Cole blog contains excellent overview of NUMA as well as additional NUMA tools

      (and do not forget about innodb_flush_method=O_DIRECT)

      CPU

      Make sure there is no powersave mode enabled:
      Check /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
      and make sure it is not ondemand
      Check /proc/cpuinfo and compare cpu MHz number to what is listed under the 
      model name
      Disable the 
      ondemand if it is running

      Example: ondemand is running on all the servers

      and we have this:

      In this case we will need to disable ondemand.

      These simple Linux tuning tips will increase MySQL performance and make it more stable (and avoid swapping). Im am also interested in hearing about your experience with different Linux configurations and MySQL. Please share those in the comments.

      0 0
      原创粉丝点击