1

I have a MySql server (using innodb) running on a server that hosting several more process that does the main work on the DB.

I dont have a lot of experience with MySql tuning but here are the current values of some of the parameters that to my understanding are more relevant:

query_cache_size = 16M
query_cache_limit = 1M
#table_cache = 64 (currently commented out)

what values do you think these parameters should have? are there any other parameters i should change (my current parameters settings is the defaulted one)?

Thanks!

3
  • 1
    This is a very complicated issue. It depends on too many factors. First of all, do you use MyISAM engine or InnoDB (or both)? Commented Aug 12, 2011 at 9:50
  • 2
    For InnoDB, check this article: mysqlperformanceblog.com/2007/11/01/… Commented Aug 12, 2011 at 9:53
  • @Ran Please post your complete report from MySQLTuner.pl for additional meaningful suggestions. Commented Nov 16, 2019 at 22:40

4 Answers 4

3

The tuning parameters which are used commonly most frequently.

key_buffer_size: 
query_cache_size  
tmp_table_size 
innodb_buffer_pool_size 
innodb_additional_mem_pool_size 
innodb_log_buffer_size 
max_connections 
sort_buffer_size 
read_buffer_size 
read_rnd_buffer_size 
join_buffer_size 
Sign up to request clarification or add additional context in comments.

Comments

1

it depends on your database and the queries you throw against it. you could use mysql_tuner to get a brief check on what your database needs.

https://github.com/rackerhacker/MySQLTuner-perl

Comments

0

I always tune the following parameters:

query_cache_size  
tmp_table_size 
innodb_buffer_pool_size 
max_connections 
back_log

How to set your parameters? This depends on your workload and server. If your server had abundant memory, you should set innodb_buffer_pool_size more. And if you had high concurrency, you should give max_connections more, too. As the same time, there are some formulas, such as:

back_log = max_connections / 5 + 50

If you have no experience, I am here to suggest you read the following documents or use auto-tools:

https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
https://github.com/yahoo/mysql_perf_analyzer
https://github.com/major/MySQLTuner-perl

Finally, tuning is very risky, maybe you can choose RDS(relational database service).

1 Comment

Please view profile, Network profile for Utility Scripts with FREE downloadable scripts to find areas to improve instance performance. Such as finding fragmented tables or redundant indexes. What is NOT risky?
0

The optimal values of these parameters depend on your data and application. The "query_cache*" settings have been removed in the latest version of MySQL.

To improve the performance of MySQL, you can use the following tools:

  1. https://github.com/major/MySQLTuner-perl to analyze your current settings, get recommendations and calculate settings for your server manually.

  2. MySQL Performance Tuning as a Service to get recommended configuration automatically.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.