[client] port = 3306 socket = /tmp/mysql.sock [mysqld] user = mariadb port = 3306 socket = /tmp/mysql.sock pid-file = /data/mariadata/tmp/mysql.pid #### Replication ############################################### server-id = 2 # Master: 1 | Slave: 2 read_only # Master: Comment | Slave: read_only relay_log_purge = 0 # for MHA, manually management #plugin_load = "semisync_master.so;semisync_slave.so" rpl_semi_sync_master_enabled = 1 # semi-sync master rpl_semi_sync_slave_enabled = 1 # semi-sync slave rpl_semi_sync_master_timeout = 1000 #default=10000(10s) slave_parallel_mode = optimistic # MariaDB 10.1.3 slave_domain_parallel_threads = 16 # %%ENV:CORES%% slave_parallel_threads = 16 # %%ENV:CORES%% slave_net_timeout=60 # default=3600 slave_compressed_protocol = 1 slave_exec_mode = IDEMPOTENT #log_slave_updates = 1 log_slow_slave_statements = 1 ############################################################# basedir = /data/mariadb # Symbolic link of mariadb-10.2.14-linux-glibc_214-x86_64 datadir = /data/mariadata/data tmpdir = /data/mariadata/tmp ## Character set, Collation ## init_connect='SET collation_connection = utf8_general_ci' init_connect='SET NAMES utf8' character-set-server = utf8 collation-server = utf8_general_ci skip_name_resolve skip_external_locking #bind-address=0.0.0.0 symbolic-links = 0 # have_symlink, Disabling symbolic-links is recommended to prevent assorted security risks #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES transaction-isolation = READ-COMMITTED lower_case_table_names = 1 # Å×À̺í¸íÀ» ¼Ò¹®ÀڷΠó¸® log_bin_trust_function_creators = ON optimizer_switch = 'engine_condition_pushdown=on' event_scheduler = ON # DB Engine ## default_storage_engine = InnoDB # Default: InnoDB ## Logging log_bin = /log/mariadb_log/mysql-bin log_error = /log/mariadb_log/mariadb.log log_warnings = 1 relay_log = /log/mariadb_log/relay-log relay_log_index = /log/mariadb_log/relay-log.index relay_log_info_file = /log/mariadb_log/relay-log.info ## Slow query Log ## slow_query_log = ON long_query_time = 10 # Default 10 sec slow_query_log_file = /log/mariadb_log/slow-query.log #log_queries_not_using_indexes = 1 ## General Log ## #general_log = 1 #general_log_file = /log/mariadb_log/general.log ## Binary Log ## binlog_format = ROW # STATEMENT/MIXED/ROW binlog_cache_size = 16M #default: 32K, size of buffer to hold TX queries max_binlog_size = 1024M expire_logs_days = 7 sync_binlog = 1 ## General conf. ## max_connections = 2048 max_connect_errors = 99999 back_log = 250 # 50 + (max_connections / 5) thread_cache_size = 200 #recommend 5% of max_connections max_allowed_packet = 1024M wait_timeout = 3600 # default : 28800 interactive_timeout = 3600 # default : 28800 #thread_stack = 256K #default: 32bit: 192K, 64bit: 256K sort_buffer_size = 4M join_buffer_size = 8M read_buffer_size = 4M read_rnd_buffer_size = 4M open_files_limit = 8192 table_open_cache = 4096 table_definition_cache = 4096 group_concat_max_len = 10M # for BLOB/TEXT max_heap_table_size = 128M tmp_table_size = 128M ##timestamp explicit_defaults_for_timestamp ## MyISAM Specific options ## key_buffer_size = 64M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 myisam-recover-options = FORCE,BACKUP ##Thread Pool ## thread_handling = pool-of-threads #thread_pool_size = 16 # CPU thread Numbers thread_pool_max_threads = 1024 thread_pool_idle_timeout = 10 ## INNODB Specific options ## innodb_data_home_dir = /data/mariadata/data innodb_data_file_path = ibdata1:1024M;ibdata2:1024M;ibdata3:1024M;ibdata4:1024M;ibdata5:1024M:autoextend innodb_buffer_pool_size = 45G # 50~80% of RAM innodb_buffer_pool_instances = 24 #Default 8 innodb_buffer_pool_chunk_size = 256M #1048576 to innodb_buffer_pool_size/innodb_buffer_pool_instances innodb_file_per_table = ON # Å×ÀÌºí ´ç ÆÄÀÏ innodb_flush_method = O_DIRECT #O_DIRECT = local/DAS, O_DSYNC = SAN/iSCSI innodb_log_buffer_size = 256M #Default Value: 16777216 (16MB) >= MariaDB 10.1.9, 8388608 (8MB) <= MariaDB 10.1.8 innodb_log_file_size = 512M #64G_RAM+ = 768, 24G_RAM+ = 512, 8G_RAM+ = 256, 2G_RAM+ = 128 innodb_log_files_in_group = 5 #combined size of all logs <4GB. <2G_RAM = 2, >2G_RAM = 4 innodb_log_group_home_dir = /log/mariadb_log innodb_write_io_threads = 32 # Default :4 (1~64) innodb_read_io_threads = 32 # Default :4 (1~64) innodb_thread_concurrency = 16 # A suggested setting is twice the number of CPU's plus the number of disks. innodb_flush_log_at_trx_commit = 2 innodb_print_all_deadlocks = 1 innodb_lock_wait_timeout = 240 innodb_locks_unsafe_for_binlog = 1 innodb_io_capacity = 500 ##innodb_fast_shutdown #innodb_max_dirty_pages_pct = 90 #innodb_open_files = 2048 ##innodb_force_recovery=1 [mysqldump] default-character-set = utf8 quick max_allowed_packet = 1G [mysql] default-character-set = utf8 no-auto-rehash [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 8M write_buffer = 8M [mysqlhotcopy] interactive-timeout [mysqld_safe] open_files_limit = 8192 malloc-lib = /usr/lib64/libjemalloc.so.1