Skip to main content

MySQL optimization for a 16GB ram server.

Comments

5 comments

  • cPanelMichael
    Hello :) I just wanted to note that the mysqlmymonlite script might be better suited as a tuner for MySQL version 5.5: mysqlmymonlite.sh server stats gathering tool for cPanel Server Thank you.
    0
  • thinkbot
    lower table_cache to something like 6000 since it scales bad on high numbers table_definition_cache to 2000 Many of the values you put there are too big, it seems like it was copied from somewhere without thought The best thing would be to add caching to wordpress
    0
  • johnburk
    [quote="cPanelMichael, post: 1581151">Hello :) I just wanted to note that the mysqlmymonlite script might be better suited as a tuner for MySQL version 5.5: mysqlmymonlite.sh server stats gathering tool for cPanel Server Thank you.
    I will give it a try, but I am not comfortable with adding my mysql root password in a plain text environment. [COLOR="silver">- - - Updated - - - [quote="thinkbot, post: 1581772">lower table_cache to something like 6000 since it scales bad on high numbers table_definition_cache to 2000 Many of the values you put there are too big, it seems like it was copied from somewhere without thought The best thing would be to add caching to wordpress
    All sites already work with caching. The values are based on advice of tools such as mysqltuner.pl and tuning-primer.sh which both seem to love giving the advice to increase values.
    0
  • thinkbot
    Exactly, tools always suggest to increase and increase :) put there this, it's cleaned up version of your my.cnf with enabled slow query log, after it gatherers some slow queries for few days, you can run pt-query-digest and review them Also install Munin module from WHM, you will have there server resource monitoring nicely displayed on graphs [mysqld] local-infile=0 connect_timeout=360 wait_timeout=2400 interactive_timeout=2400 default-storage-engine=MyISAM max_connections = 400 max_user_connections = 100 key_buffer_size=1400M join_buffer_size=2M sort_buffer_size=256K slow_query_log=1 slow_query_log_file=mysql-slow.log long_query_time=0.1 query_cache_type = 1 query_cache_size = 150M query_cache_limit = 1M max_allowed_packet=32M tmp_table_size=256M max_heap_table_size=256M open_files_limit=100000 table_definition_cache=2000 table_open_cache=6000 thread_cache_size=64 innodb_buffer_pool_size=512M innodb_file_per_table=1
    0
  • johnburk
    [quote="thinkbot, post: 1582691">Exactly, tools always suggest to increase and increase :) put there this, it's cleaned up version of your my.cnf with enabled slow query log, after it gatherers some slow queries for few days, you can run pt-query-digest and review them Also install Munin module from WHM, you will have there server resource monitoring nicely displayed on graphs [mysqld] local-infile=0 connect_timeout=360 wait_timeout=2400 interactive_timeout=2400 default-storage-engine=MyISAM max_connections = 400 max_user_connections = 100 key_buffer_size=1400M join_buffer_size=2M sort_buffer_size=256K slow_query_log=1 slow_query_log_file=mysql-slow.log long_query_time=0.1 query_cache_type = 1 query_cache_size = 150M query_cache_limit = 1M max_allowed_packet=32M tmp_table_size=256M max_heap_table_size=256M open_files_limit=100000 table_definition_cache=2000 table_open_cache=6000 thread_cache_size=64 innodb_buffer_pool_size=512M innodb_file_per_table=1

    Thank you. Unfortunately cPanel has not updated Munin for a few years. They still use 1.4.7 which has some bugs in term of memory usage.
    0

Please sign in to leave a comment.