Advertisement
Guest User

MariaDB Configuration

a guest
Jul 19th, 2021
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [mysqld]
  2.  
  3. #skip-innodb
  4. #skip-federated
  5. #skip-pbxt
  6. #skip-pbxt_statistics
  7. #skip-archive
  8. #skip-name-resolve
  9. #old_passwords
  10. back_log = 75
  11. max_connections = 300
  12. key_buffer_size = 32M
  13. myisam_sort_buffer_size = 32M
  14. myisam_max_sort_file_size = 2048M
  15. join_buffer_size = 64K
  16. read_buffer_size = 64K
  17. sort_buffer_size = 128K
  18. table_definition_cache = 4096
  19. table_open_cache = 2048
  20. thread_cache_size = 64
  21. wait_timeout = 120
  22. connect_timeout = 10
  23. tmp_table_size = 32M
  24. max_heap_table_size = 32M
  25. max_allowed_packet = 32M
  26. max_seeks_for_key = 1000
  27. group_concat_max_len = 1024
  28. max_length_for_sort_data = 1024
  29. net_buffer_length = 16384
  30. max_connect_errors = 100000
  31. concurrent_insert = 2
  32. read_rnd_buffer_size = 256K
  33. bulk_insert_buffer_size = 8M
  34. query_cache_limit = 512K
  35. query_cache_size = 16M
  36. query_cache_type = 1
  37. query_cache_min_res_unit = 2K
  38. query_prealloc_size = 262144
  39. query_alloc_block_size = 65536
  40. transaction_alloc_block_size = 8192
  41. transaction_prealloc_size = 4096
  42. default-storage-engine = InnoDB
  43.  
  44. log_warnings=1
  45. slow_query_log=0
  46. long_query_time=2
  47. slow_query_log_file=/var/log/mariadb/mariadb-slow.log
  48.  
  49. # innodb settings
  50. #innodb_extra_rsegments = 4
  51. innodb_purge_threads=1
  52. innodb_doublewrite = 1
  53.  
  54. innodb_file_per_table = 1
  55. innodb_open_files = 1000
  56. innodb_data_file_path= ibdata1:10M:autoextend
  57. innodb_buffer_pool_size = 4G
  58.  
  59. innodb_log_files_in_group = 2
  60. innodb_log_file_size = 512M
  61. innodb_log_buffer_size = 64M
  62. innodb_flush_log_at_trx_commit = 2
  63. innodb_thread_concurrency = 0
  64. innodb_lock_wait_timeout=50
  65. #innodb_flush_method = O_DIRECT
  66.  
  67. # 200 * # DISKS
  68. innodb_io_capacity = 100
  69. innodb_read_io_threads = 2
  70. innodb_write_io_threads = 2
  71.  
  72. #timeouts
  73. interactive_timeout = 86400
  74. wait_timeout = 86400
  75.  
  76. # mariadb settings
  77. [mariadb]
  78. #thread-handling = pool-of-threads
  79. #thread-pool-size= 20
  80. #mysql --port=3307 --protocol=tcp
  81. #extra-port=3307
  82. #extra-max-connections=1
  83.  
  84. userstat = 0
  85. key_cache_segments = 1
  86. aria_group_commit = none
  87. aria_group_commit_interval = 0
  88. aria_log_file_size = 32M
  89. aria_log_purge_type = immediate
  90. aria_pagecache_buffer_size = 8M
  91. aria_sort_buffer_size = 8M
  92.  
  93. [mariadb-5.5]
  94. #ignore_db_dirs=
  95. query_cache_strip_comments=0
  96.  
  97. innodb_read_ahead = linear
  98. innodb_adaptive_flushing_method = estimate
  99. innodb_flush_neighbor_pages = 1
  100. innodb_stats_update_need_lock = 0
  101. innodb_log_block_size = 512
  102.  
  103. log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
  104.  
  105. [mysqld_safe]
  106. #log-error=/var/log/mysqld.log
  107. #nice = -5
  108. open-files-limit = 8192
  109.  
  110. [mysqldump]
  111. quick
  112. max_allowed_packet = 32M
  113.  
  114. [myisamchk]
  115. key_buffer = 32M
  116. sort_buffer = 16M
  117. read_buffer = 16M
  118. write_buffer = 16M
  119.  
  120. [mysqlhotcopy]
  121. interactive-timeout
  122.  
  123. [mariadb-10.0]
  124. performance_schema=OFF
  125. innodb_stats_on_metadata=OFF
  126. innodb_sort_buffer_size=2M
  127. innodb_online_alter_log_max_size=128M
  128. query_cache_strip_comments=0
  129. log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
  130.  
  131. [mariadb-10.1]
  132. innodb_file_format = Barracuda
  133. innodb_file_per_table = 1
  134.  
  135. innodb_buffer_pool_dump_at_shutdown=1
  136. innodb_buffer_pool_load_at_startup=1
  137. innodb_buffer_pool_populate=0
  138.  
  139. innodb_defragment=1
  140. innodb_defragment_n_pages=7
  141. innodb_defragment_stats_accuracy=0
  142. innodb_defragment_fill_factor_n_recs=20
  143. innodb_defragment_fill_factor=0.9
  144. innodb_defragment_frequency=40
  145.  
  146. query_cache_size=0
  147. query_cache_type=0
  148. join_buffer_size=256K
  149. tmp_table_size=16M
  150. max_heap_table_size=16M
  151. thread_cache_size=4
  152. innodb_buffer_pool_size=4G
  153. innodb_log_file_size=2G
  154. innodb_buffer_pool_instances=16
  155.  
  156. back_log = 150
  157. innodb-flush-neighbors = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement