Optimal my.cnf settings for large sites
[mysqld]
skip-networking
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
log-slow-queries = /var/log/mysql_slow.log
open_files_limit =24000
symbolic-links=0
thread_concurrency = 8
query_cache_size = 32M
thread_cache_size = 8
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M
table_cache = 512
max_allowed_packet = 32M
key_buffer = 384M
max_heap_table_size = 64M
query_cache_limit = 2M
innodb_file_per_table = 1
innodb_additional_mem_pool_size = 16M
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 8M
innodb_buffer_pool_size = 1G
innodb_log_file_size = 24M
innodb_thread_concurrency = 16
innodb_lock_wait_timeout = 120
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_io_threads = 4
innodb_max_dirty_pages_pct = 90
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Add new comment