Tuning tips for MySQL
Posted: Fri Jul 18, 2014 10:09 pm
Team,
Any tips for the tuning of MySQL ?
-> my.cnf
Thanks
JP
Any tips for the tuning of MySQL ?
-> my.cnf
Thanks
JP
mephivio wrote:Team,
Any tips for the tuning of MySQL ?
-> my.cnf
Thanks
JP
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=20
max_user_connections=20
wait_timeout=30
interactive_timeout=50
slow-query-log =1
long_query_time=5
#log-queries-not-using-indexes
slow-query-log-file = /var/log/mysql-slow.log
skip-external-locking
key_buffer_size = 8M
max_allowed_packet = 16M
table_open_cache = 4k
sort_buffer_size = 512k
read_buffer_size = 512k
read_rnd_buffer_size = 512k
myisam_sort_buffer_size = 8M
thread_cache_size = 128
query_cache_size = 8M
query_cache_limit = 8M
tmp_table_size = 16M
max_heap_table_size = 16M
join_buffer_size = 512k
#innodb_use_native_aio = 0
innodb_file_per_table
innodb_buffer_pool_size = 8M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=2000
max_user_connections=1500
wait_timeout=100
interactive_timeout=100
max_allowed_packet=100M
long_query_time=5
connect_timeout=10
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log
#innodb_use_native_aio = 0
innodb_file_per_table
innodb_buffer_pool_size = 64M
key_buffer_size=128M
query_cache_size=256M
query_cache_limit = 256M
thread_cache_size=128
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Check out http://forums.jaguarpc.com/dedicated-cl ... f-vps.htmlbgg wrote:Hello, My VPS has 12GB RAM and 2 core I think
Can someone please suggest a best performance configuration/settings for mysql in the server?
This is my current my.cnf:Code: Select all
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql symbolic-links=0 max_connections=2000 max_user_connections=1500 wait_timeout=100 interactive_timeout=100 max_allowed_packet=100M long_query_time=5 connect_timeout=10 #log-queries-not-using-indexes #log-slow-queries=/var/log/mysql/log-slow-queries.log #innodb_use_native_aio = 0 innodb_file_per_table innodb_buffer_pool_size = 64M key_buffer_size=128M query_cache_size=256M query_cache_limit = 256M thread_cache_size=128 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
Can someone please suggest a best performance configuration/settings for mysql in the server?
Thanks a lot
Try to use mysqltuner to get best performancebgg wrote: Can someone please suggest a best performance configuration/settings for mysql in the server?