Web Design and Search Engine Optimisation FreeLancer




MySQL Performance Settings

Category : MySQL Settings · by Aug 26th, 2014

etc/my.cnf
[mysqld]
skip-name-resolve
myisam_use_mmap=1

max_connections=100
max_user_connections = 50

log-slow-queries=mysql-slow.log
long_query_time = 0.1
safe-show-database

query_cache_type = 1
query_cache_size = 75M
query_cache_limit = 2M

join_buffer_size=1M
read_rnd_buffer_size=1M
max_allowed_packet = 10M

tmp_table_size=25M
max_heap_table_size=25M

table_open_cache = 7500
thread_cache_size = 25

open_files_limit=30000

key_buffer_size = 500M
myisam_sort_buffer_size = 256M

innodb_file_per_table=1
innodb_buffer_pool_size = 1G
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M

remoe old log files
rm -rf /var/lib/mysql/ib_logfile*
restart mysql
service mysql restart

SOURCED FROM http://forums.cpanel.net/f189/mysql-high-cpu-usage-374152.html

SHARE :