Guest User

galera-db-config

a guest
May 6th, 2024
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.69 KB | None | 0 0
  1. [root@galera-dbnode-03 ~]# cat /etc/my.cnf
  2. # Template my.cnf for PXC
  3. # Edit to your requirements.
  4. [client]
  5. ssl-ca=/etc/ssl/mysql/ca.pem
  6. ssl-cert=/etc/ssl/mysql/client-cert.pem
  7. ssl-key=/etc/ssl/mysql/client-key.pem
  8. socket=/var/lib/mysql/mysql.sock
  9.  
  10. [mysqld]
  11. server-id=11
  12. datadir=/var/lib/mysql
  13. socket=/var/lib/mysql/mysql.sock
  14. log-error=/var/log/mysqld.log
  15. pid-file=/var/run/mysqld/mysqld.pid
  16.  
  17. # Binary log expiration period is 604800 seconds, which equals 7 days
  18. binlog_expire_logs_seconds=604800
  19.  
  20. ######## wsrep ###############
  21. # Path to Galera library
  22. wsrep_provider=/usr/lib64/galera4/libgalera_smm.so
  23.  
  24. # Cluster connection URL contains IPs of nodes
  25. #If no IP is found, this implies that a new cluster needs to be created,
  26. #in order to do that you need to bootstrap this node
  27. wsrep_cluster_address=gcomm://172.16.75.21,172.16.75.22,172.16.75.23
  28.  
  29.  
  30. # In order for Galera to work correctly binlog format should be ROW
  31. binlog_format=ROW
  32.  
  33. # Slave thread to use
  34. wsrep_slave_threads=8
  35.  
  36. wsrep_log_conflicts
  37.  
  38. # This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
  39. innodb_autoinc_lock_mode=2
  40.  
  41. # Node IP address
  42. #wsrep_node_address=192.168.70.63
  43. # Cluster name
  44. wsrep_cluster_name=core-mysql-cluster
  45.  
  46.  
  47. #If wsrep_node_name is not specified, then system hostname will be used
  48. wsrep_node_name=galera-dbnode-03
  49. wsrep_node_address=172.16.75.23
  50.  
  51. #pxc_strict_mode allowed values: DISABLED,PERMISSIVE,ENFORCING,MASTER
  52. tls_version=TLSv1.2
  53. pxc_strict_mode=PERMISSIVE
  54. pxc_encrypt_cluster_traffic=ON
  55.  
  56.  
  57. # SST method
  58. wsrep_sst_method=xtrabackup-v2
  59.  
  60. # Increase IST cache to allow Incremental recovery.
  61. wsrep_provider_options=gcache.size=1G;gcache.recover=yes
  62.  
  63. #sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  64. sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
  65.  
  66. innodb_autoinc_lock_mode=2
  67. innodb_buffer_pool_size = 8192M
  68. innodb_flush_method = O_DIRECT
  69. max_allowed_packet=500M
  70.  
  71. wait_timeout=7200
  72. max_connections = 1000
  73. innodb_monitor_enable=all
  74. default_storage_engine=InnoDB
  75.  
  76. # Deprecated settings from MySQL 5.7
  77. #innodb_log_file_size=2048M
  78. #log_slave_updates
  79. #expire_logs_days=7
  80. #symbolic-links=0
  81.  
  82. ssl-ca=/etc/ssl/mysql/ca.pem
  83. ssl-cert=/etc/ssl/mysql/server-cert.pem
  84. ssl-key=/etc/ssl/mysql/server-key.pem
  85.  
  86. [root@galera-dbnode-03 ~]# pt-mysql-summary
  87. -bash: pt-mysql-summary: command not found
  88.  
  89.  
  90.  
  91. [snip.....]
  92.  
  93.  
  94. Installed:
  95. percona-toolkit.x86_64 0:3.5.7-1.el7
  96.  
  97. Dependency Installed:
  98. perl-IO-Socket-IP.noarch 0:0.21-5.el7 perl-IO-Socket-SSL.noarch 0:1.94-7.el7 perl-Mozilla-CA.noarch 0:20130114-5.el7
  99. perl-Net-LibIDN.x86_64 0:0.12-15.el7 perl-Net-SSLeay.x86_64 0:1.55-6.el7 perl-TermReadKey.x86_64 0:2.30-20.el7
  100.  
  101. Complete!
  102. [root@galera-dbnode-03 ~]# pt-mysql-summary
  103. # Percona Toolkit MySQL Summary Report #######################
  104. System time | 2024-05-06 08:12:32 UTC (local TZ: SAST +0200)
  105. # Instances ##################################################
  106. Port Data Directory Nice OOM Socket
  107. ===== ========================== ==== === ======
  108. 0 0
  109. # MySQL Executable ###########################################
  110. Path to executable | /usr/sbin/mysqld
  111. Has symbols | No
  112. # Slave Hosts ################################################
  113. No slaves found
  114. # Report On Port 3306 ########################################
  115. User | root@localhost
  116. Time | 2024-05-06 10:12:32 (SAST)
  117. Hostname | galera-dbnode-03.nymbis.tech
  118. Version | 8.0.36-28.1 Percona XtraDB Cluster (GPL), Release rel28, Revision bfb687f, WSREP version 26.1.4.3
  119. Built On | Linux x86_64
  120. Started | 2024-05-05 11:21 (up 0+22:51:05)
  121. Databases | 0
  122. Datadir | /var/lib/mysql/
  123. Processes | 1 connected, 2 running
  124. Replication | Is a slave, has 0 slaves connected
  125. Pidfile | /var/run/mysqld/mysqld.pid (exists)
  126. # Processlist ################################################
  127.  
  128. Command COUNT(*) Working SUM(Time) MAX(Time)
  129. ------------------------------ -------- ------- --------- ---------
  130. Connect 1 1 80000 80000
  131. Daemon 1 1 80000 80000
  132. Query 6 6 250 100
  133. Sleep 9 0 700000 80000
  134.  
  135. User COUNT(*) Working SUM(Time) MAX(Time)
  136. ------------------------------ -------- ------- --------- ---------
  137. event_scheduler 1 1 80000 80000
  138. root 1 1 0 0
  139. system user 15 6 80000 80000
  140.  
  141. Host COUNT(*) Working SUM(Time) MAX(Time)
  142. ------------------------------ -------- ------- --------- ---------
  143. 15 5 250 100
  144. connecting host 1 1 80000 80000
  145. localhost 2 2 80000 80000
  146.  
  147. db COUNT(*) Working SUM(Time) MAX(Time)
  148. ------------------------------ -------- ------- --------- ---------
  149. NULL 15 8 175000 80000
  150.  
  151. State COUNT(*) Working SUM(Time) MAX(Time)
  152. ------------------------------ -------- ------- --------- ---------
  153. init 1 1 0 0
  154. innobase_commit_low (-1) 1 0 0 0
  155. Replica has read all relay log 1 1 0 0
  156. Waiting for an event from Coor 4 4 250 100
  157. Waiting for source to send eve 1 1 80000 80000
  158. Waiting on empty queue 1 1 80000 80000
  159. wsrep 8 0 0 0
  160.  
  161. # Status Counters (Wait 10 Seconds) ##########################
  162. Variable Per day Per second 15 secs
  163. Binlog_snapshot_position 500000000 6000 50000
  164. Binlog_cache_disk_use 22500
  165. Binlog_cache_use 4500000 50 9
  166. Bytes_received 3500000000 40000 50000
  167. Bytes_sent 1250000 15 3500
  168. Com_admin_commands 3000
  169. Com_alter_table 4
  170. Com_begin 4500000 50 9
  171. Com_change_db 2
  172. Com_commit 4500000 50 9
  173. Com_create_db 1
  174. Com_create_table 40
  175. Com_delete 125000 1
  176. Com_flush 1
  177. Com_insert 7000000 80 1
  178. Com_select 3000 1
  179. Com_set_option 3000
  180. Com_show_replica_status 5
  181. Com_show_slave_status 5
  182. Com_show_status 1750
  183. Com_show_variables 1
  184. Com_update 3000000 30 6
  185. Connections 3000 1
  186. Created_tmp_files 15
  187. Created_tmp_tables 1750
  188. Error_log_buffered_bytes 6000000 60
  189. Error_log_buffered_events 25000
  190. Error_log_expired_events 3000 1
  191. Error_log_latest_write 1750000000000000 20000000000 1000000
  192. Flush_commands 3
  193. Handler_commit 40000000 450 50
  194. Handler_delete 400000 4 1
  195. Handler_external_lock 40000000 450 60
  196. Handler_prepare 30000000 350 35
  197. Handler_read_first 60
  198. Handler_read_key 12500000 150 25
  199. Handler_read_next 17500 4
  200. Handler_read_rnd 3000000 35 7
  201. Handler_read_rnd_next 1000000 15 100
  202. Handler_rollback 1
  203. Handler_update 7000000 90 20
  204. Handler_write 7000000 80 50
  205. Innodb_buffer_pool_bytes_data 9000000000 100000 -25122
  206. Innodb_buffer_pool_bytes_dirty 150000000 1750 -1520435
  207. Innodb_buffer_pool_pages_flushed 25000000 300 125
  208. Innodb_buffer_pool_pages_made_not_young 7000000 80 8
  209. Innodb_buffer_pool_pages_made_young 600000 6
  210. Innodb_buffer_pool_pages_old 200000 2 -1
  211. Innodb_buffer_pool_read_requests 300000000 3500 600
  212. Innodb_buffer_pool_reads 4500000 50 1
  213. Innodb_buffer_pool_write_requests 150000000 1750 250
  214. Innodb_checkpoint_age 22500000 250 -314245
  215. Innodb_checkpoint_max_age 90000000 1000
  216. Innodb_data_fsyncs 20000000 250 90
  217. Innodb_data_read 90000000000 1000000 175000
  218. Innodb_data_reads 5000000 60 10
  219. Innodb_data_writes 45000000 500 200
  220. Innodb_data_written 400000000000 4500000 2000000
  221. Innodb_dblwr_pages_written 20000000 225 125
  222. Innodb_dblwr_writes 5000000 60 35
  223. Innodb_ibuf_free_list 200000 2
  224. Innodb_ibuf_segment_size 200000 2
  225. Innodb_redo_log_uuid 1000000000 12500
  226. Innodb_redo_log_checkpoint_lsn 700000000000 9000000 350000
  227. Innodb_redo_log_current_lsn 700000000000 9000000 50000
  228. Innodb_redo_log_flushed_to_disk_lsn 700000000000 9000000 50000
  229. Innodb_redo_log_logical_size 22500000 250 -314265
  230. Innodb_redo_log_physical_size 100000000 1250
  231. Innodb_redo_log_capacity_resized 100000000 1250
  232. Innodb_log_waits 175
  233. Innodb_log_write_requests 80000000 900 125
  234. Innodb_log_writes 20000000 250 60
  235. Innodb_lsn_current 700000000000 9000000 50000
  236. Innodb_lsn_flushed 700000000000 9000000 50000
  237. Innodb_lsn_last_checkpoint 700000000000 9000000 350000
  238. Innodb_master_thread_active_loops 80000 1
  239. Innodb_master_thread_idle_loops 5000
  240. Innodb_max_trx_id 10000000 125 25
  241. Innodb_os_log_fsyncs 12500000 150 40
  242. Innodb_os_log_written 40000000000 450000 70000
  243. Innodb_pages_created 1250000 15
  244. Innodb_pages_read 5000000 60 10
  245. Innodb_pages0_read 60
  246. Innodb_pages_written 20000000 225 125
  247. Innodb_purge_trx_id 10000000 125 25
  248. Innodb_rows_deleted 400000 4 1
  249. Innodb_rows_inserted 7000000 80 7
  250. Innodb_rows_read 3000000 35 15
  251. Innodb_rows_updated 3000000 30 6
  252. Innodb_system_rows_deleted 90
  253. Innodb_system_rows_inserted 90
  254. Innodb_system_rows_read 4500000 50 15
  255. Innodb_system_rows_updated 4500000 50 10
  256. Innodb_num_open_files 70
  257. Innodb_undo_tablespaces_total 2
  258. Innodb_undo_tablespaces_implicit 2
  259. Innodb_undo_tablespaces_active 2
  260. Innodb_secondary_index_triggered_cluster_reads 30000 2
  261. Key_read_requests 15
  262. Key_reads 8
  263. Mysqlx_port 35000
  264. Mysqlx_ssl_ctx_verify_mode 5
  265. Mysqlx_worker_threads 2
  266. Net_buffer_length 17500
  267. Open_table_definitions 90
  268. Opened_files 30
  269. Opened_table_definitions 175
  270. Opened_tables 300 1
  271. Performance_schema_session_connect_attrs_longest_seen 125
  272. Queries 15000000 175 20
  273. Questions 10000 3
  274. Select_scan 3500
  275. Ssl_accepts 8 1
  276. Ssl_finished_accepts 8 1
  277. Ssl_session_cache_timeout 300
  278. Table_locks_immediate 1750
  279. Table_open_cache_hits 20000000 225 25
  280. Table_open_cache_misses 300 1
  281. Threads_created 2
  282. Uptime 90000 1 1
  283. wsrep_protocol_version 10
  284. wsrep_last_applied 5000000 60 9
  285. wsrep_last_committed 5000000 60 9
  286. wsrep_replicated 4500000 50 9
  287. wsrep_replicated_bytes 20000000000 250000 50000
  288. wsrep_repl_keys 25000000 300 40
  289. wsrep_repl_keys_bytes 300000000 3500 500
  290. wsrep_repl_data_bytes 17500000000 200000 50000
  291. wsrep_received 35000
  292. wsrep_received_bytes 300000 3
  293. wsrep_local_commits 4500000 50 9
  294. wsrep_local_send_queue_max 2
  295. wsrep_local_recv_queue_max 2
  296. wsrep_local_cached_downto 5000000 60 8
  297. wsrep_flow_control_interval_low 100
  298. wsrep_flow_control_interval_high 100
  299. wsrep_commit_window 1
  300. wsrep_local_state 4
  301. wsrep_cert_index_size 25
  302. wsrep_cert_bucket_count 8000
  303. wsrep_gcache_pool_size 1250000000 12500
  304. wsrep_cluster_weight 1
  305. wsrep_cluster_conf_id 1
  306. wsrep_cluster_size 1
  307. wsrep_thread_count 9
  308. # Table cache ################################################
  309. Size | 4000
  310. Usage | 5%
  311. # Key Percona Server features ################################
  312. Table & Index Stats | Disabled
  313. Multiple I/O Threads | Enabled
  314. Corruption Resilient | Enabled
  315. Durable Replication | Not Supported
  316. Import InnoDB Tables | Not Supported
  317. Fast Server Restarts | Not Supported
  318. Enhanced Logging | Disabled
  319. Replica Perf Logging | Disabled
  320. Response Time Hist. | Not Supported
  321. Smooth Flushing | Not Supported
  322. HandlerSocket NoSQL | Not Supported
  323. Fast Hash UDFs | Unknown
  324. # Percona XtraDB Cluster #####################################
  325. # Plugins ####################################################
  326. InnoDB compression | ACTIVE
  327. # Schema #####################################################
  328. Specify --databases or --all-databases to dump and summarize schemas
  329. # Noteworthy Technologies ####################################
  330. SSL | Yes
  331. Explicit LOCK TABLES | No
  332. Delayed Insert | No
  333. XA Transactions | No
  334. NDB Cluster | No
  335. Prepared Statements | No
  336. Prepared statement count | 0
  337. # InnoDB #####################################################
  338. Version | 8.0.36-28
  339. Buffer Pool Size | 8.0G
  340. Buffer Pool Fill | 100%
  341. Buffer Pool Dirty | 1%
  342. File Per Table | ON
  343. Page Size | 16k
  344. Log File Size | 2 * 48.0M = 96.0M
  345. Log Buffer Size | 16M
  346. Flush Method | O_DIRECT
  347. Flush Log At Commit | 1
  348. XA Support |
  349. Checksums |
  350. Doublewrite | ON
  351. R/W I/O Threads | 4 4
  352. I/O Capacity | 200
  353. Thread Concurrency | 0
  354. Concurrency Tickets | 5000
  355. Commit Concurrency | 0
  356. Txn Isolation Level |
  357. Adaptive Flushing | ON
  358. Adaptive Checkpoint |
  359. Checkpoint Age | 20M
  360. InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue
  361. Oldest Transaction | 0 Seconds
  362. History List Len | 33
  363. Read Views | 0
  364. Undo Log Entries | 0 transactions, 0 total undo, 0 max undo
  365. Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads
  366. Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites
  367. Pending I/O Flushes | 0 buf pool, 0 log
  368. Transaction States | 10xnot started
  369. # MyISAM #####################################################
  370. Key Cache | 8.0M
  371. Pct Used | 20%
  372. Unflushed | 0%
  373. # Security ###################################################
  374. Users | 54 users, 0 anon, 0 w/o pw, 0 old pw
  375. Old Passwords |
  376. # Encryption #################################################
  377. No keyring plugins found
  378. # Binary Logging #############################################
  379. Binlogs | 163
  380. Zero-Sized | 0
  381. Total Size | 159.9G
  382. binlog_format | ROW
  383. expire_logs_days | 0
  384. sync_binlog | 1
  385. server_id | 11
  386. binlog_do_db |
  387. binlog_ignore_db |
  388. # Noteworthy Variables #######################################
  389. Auto-Inc Incr/Offset | 1/1
  390. default_storage_engine | InnoDB
  391. flush_time | 0
  392. init_connect |
  393. init_file |
  394. sql_mode | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
  395. join_buffer_size | 256k
  396. sort_buffer_size | 256k
  397. read_buffer_size | 128k
  398. read_rnd_buffer_size | 256k
  399. bulk_insert_buffer | 0.00
  400. max_heap_table_size | 16M
  401. tmp_table_size | 16M
  402. max_allowed_packet | 500M
  403. thread_stack | 1M
  404. log |
  405. log_error | /var/log/mysqld.log
  406. log_warnings |
  407. log_slow_queries |
  408. log_queries_not_using_indexes | OFF
  409. log_slave_updates | ON
  410. # Configuration File #########################################
  411. Config File | /etc/my.cnf
  412.  
  413. [client]
  414. ssl-ca = /etc/ssl/mysql/ca.pem
  415. ssl-cert = /etc/ssl/mysql/client-cert.pem
  416. ssl-key = /etc/ssl/mysql/client-key.pem
  417. socket = /var/lib/mysql/mysql.sock
  418.  
  419. [mysqld]
  420. server-id = 11
  421. datadir = /var/lib/mysql
  422. socket = /var/lib/mysql/mysql.sock
  423. log-error = /var/log/mysqld.log
  424. pid-file = /var/run/mysqld/mysqld.pid
  425. binlog_expire_logs_seconds = 604800
  426. wsrep_provider = /usr/lib64/galera4/libgalera_smm.so
  427. wsrep_cluster_address = gcomm://172.16.75.21,172.16.75.22,172.16.75.23
  428. binlog_format = ROW
  429. wsrep_slave_threads = 8
  430. wsrep_log_conflicts
  431. innodb_autoinc_lock_mode = 2
  432. wsrep_cluster_name = core-mysql-cluster
  433. wsrep_node_name = galera-dbnode-03
  434. wsrep_node_address = 172.16.75.23
  435. tls_version = TLSv1.2
  436. pxc_strict_mode = PERMISSIVE
  437. pxc_encrypt_cluster_traffic = ON
  438. wsrep_sst_method = xtrabackup-v2
  439. wsrep_provider_options = gcache.size=1G;gcache.recover=yes
  440. sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
  441. innodb_autoinc_lock_mode = 2
  442. innodb_buffer_pool_size = 8192M
  443. innodb_flush_method = O_DIRECT
  444. max_allowed_packet = 500M
  445. wait_timeout = 7200
  446. max_connections = 1000
  447. innodb_monitor_enable = all
  448. default_storage_engine = InnoDB
  449. ssl-ca = /etc/ssl/mysql/ca.pem
  450. ssl-cert = /etc/ssl/mysql/server-cert.pem
  451. ssl-key = /etc/ssl/mysql/server-key.pem
  452. # Memory management library ##################################
  453. jemalloc is not enabled in mysql config for process with id 15972
  454. # The End ####################################################
  455. [root@galera-dbnode-03 ~]#
  456.  
Advertisement
Add Comment
Please, Sign In to add comment