Skip to content

Mysql local performance

Brice Lenfant edited this page Feb 12, 2018 · 2 revisions

Run the script from here

Source: https://www.drupal.org/docs/7/managing-site-performance/optimizing-mysql

~/.my.cnf

client]
user=root
password=root

[mysqld]
slow-query-log
long_query_time = 5
slow_query_log_file = "/Applications/MAMP/logs/mysql_slow_query.log"
max_connections = 150
max_user_connections = 150
key_buffer = 36M
myisam_sort_buffer_size = 64M
join_buffer_size = 5M
read_buffer_size = 5M
sort_buffer_size = 8M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 32M
max_connect_errors = 1000
query_cache_limit = 10M
query_cache_size = 32M
query_cache_type = 1
tmp_table_size = 32M
innodb-flush-log-at-trx-commit=2