[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [safe_mysqld] err-log = /mydata/log/mysql.err [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock log-error = /mydata/log/mysqld.err basedir = /usr datadir = /mydata/data tmpdir = /dev/shm skip-name-resolve port = 3306 max_connections = 2000 max_allowed_packet = 256M wait_timeout = 14400 net_write_timeout = 300 net_read_timeout = 300 slave-net-timeout = 60 # actually 3600 slave-skip-errors = 1062 # ignore error in case DUPLICATE KEY server-id = 20 log-bin = /mydata/binlog/xxx-bin binlog_format = mixed report-host = xxx expire_logs_days = 7 sync_binlog = 0 binlog_cache_size = 128K auto_increment_increment = 2 auto_increment_offset = 2 log-slave-updates open_files_limit = 147456 table_cache = 65535 tmp_table_size = 256M max_heap_table_size = 256M max_tmp_tables = 64 skip-external-locking concurrent_insert = 2 low_priority_updates= 1 key_buffer = 6144M sort_buffer_size = 64M read_buffer_size = 64M join_buffer_size = 128M bulk_insert_buffer_size = 128M read_rnd_buffer_size = 4M thread_cache_size = 120 thread_concurrency = 48 thread_stack = 1M query_cache_type = 1 query_cache_size = 384M query_cache_limit = 8M query_alloc_block_size = 16K query_cache_min_res_unit = 4K myisam_repair_threads = 16 myisam_sort_buffer_size = 512M innodb_data_file_path = ibdata1:10M:autoextend innodb_buffer_pool_size = 24G innodb_additional_mem_pool_size = 32M innodb_thread_concurrency = 16 innodb_log_buffer_size = 128M innodb_log_file_size = 512M innodb_log_files_in_group = 2 innodb_file_io_threads = 4 innodb_max_dirty_pages_pct = 90 innodb_file_per_table innodb_flush_log_at_trx_commit = 2 innodb_io_capacity = 250 # default 200, 100 for 5400/7200rpm innodb_read_io_threads = 8 # default 4, 1 to 64 innodb_write_io_threads = 8 # default 4, 1 to 64 innodb_purge_threads = 0 # 0 or 1 innodb_read_ahead_threshold = 56 # 0 to 64 innodb_thread_concurrency = 48 # 24 cores innodb_max_dirty_pages_pct = 90 # default 75 innodb_buffer_pool_instances = 24 # 1 region for 1GB buffer group_concat_max_len = 100000 [mysqldump] quick max_allowed_packet = 256M [mysql] prompt = \U\_(\d)\_>\_ no-auto-rehash [myisamchk] key_buffer = 1024M sort_buffer_size = 1024M read_buffer = 16M write_buffer = 16M