1、尽量采用 innodb 引擎

skip-locking
key_buffer = 512M
max_allowed_packet = 4M
sort_buffer_size = 1M
net_buffer_length = 1M
join_buffer_size = 8M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 256M
max_connections=3000
innodb_buffer_pool_size = 18G
thread_cache_size = 64
query_cache_size = 64M
wait_timeout = 120
thread_concurrency = 16
table_cache=2048
innodb_flush_log_at_trx_commit=1
key_buffer_size=2048M
tmp_table_size=256M
read_buffer_size=4M
query_cache_size=64M
innodb_additional_mem_pool_size=8M
read_rnd_buffer_size=16M
bulk_insert_buffer_size=64M
myisam_max_sort_file_size=10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
innodb_log_buffer_size=16M

#innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_file_per_table = 0

log-slow-queries=/var/log/mysql/slow.low
long_query_time = 2