经典的集群复制架构技术 MariaDB Galera Cluster(MGC)和Percona Xtradb Cluster(PXC) 已经出现了较长的时间了。但是,到目前为止,市面上也基本看不到一份完整的system variables和status variables的中文资料。正巧,笔者曾经对Galera集群复制插件做过完整的参数研究与整理。在这里分享给大家,希望能够帮助大家更好地使用MGC/PXC集群。

 

一、原文目录

 

 

1.wsrep sysbem variables1.1. wsrep_osu_method
1.2. wsrep_auto_increment_control
1.3. wsrep_causal_reads
1.4. wsrep_certify_nonpk
1.5. wsrep_cluster_address
1.6. wsrep_cluster_name
1.7. wsrep_convert_lock_to_trx
1.8. wsrep_data_home_dir
1.9. wsrep_dbug_option
1.10. wsrep_debug
1.11. wsrep_desync
1.12. wsrep_dirty_reads
1.13. wsrep_drupal_282555_workaround 1.14. wsrep_forced_binlog_format
1.15. wsrep_gtid_domain_id
1.16. wsrep_gtid_mode
1.17. wsrep_load_data_splitting
1.18. wsrep_log_conflicts
1.19. wsrep_max_ws_rows
1.20. wsrep_max_ws_size
1.21. wsrep_mysql_replication_bundle 1.22. wsrep_node_address
1.23. wsrep_node_incoming_address 1.24. wsrep_node_name
1.25. wsrep_notify_cmd
1.26. wsrep_on
1.27. wsrep_patch_version
1.28. wsrep_provider
1.29. wsrep_provider_options    1.29.1. group communication system相关的参数    1.29.2. galera cluster手册原文1.30. wsrep_recover
1.31. wsrep_replicate_myisam 1.32. wsrep_restart_slave 1.33. wsrep_retry_autocommit1.34. wsrep_slave_fk_checks 1.35. wsrep_slave_uk_checks1.36. wsrep_slave_threads
1.37. wsrep_sst_auth
1.38. wsrep_sst_donor
1.39. wsrep_sst_donor_rejects_queries 1.40. wsrep_sst_method1.41. wsrep_sst_receive_address 

1.42. wsrep_start_position
1.43. wsrep_sync_wait

 

2. status variables2.1. wsrep_apply_oooe
2.2. wsrep_apply_oool
2.3. wsrep_apply_window
2.4. wsrep_causal_reads
2.5. wsrep_cert_deps_distance 2.6. wsrep_cert_index_size 2.7. wsrep_cert_interval2.8. wsrep_cluster_conf_id 2.9. wsrep_cluster_size
2.10. wsrep_cluster_state_uuid 2.11. wsrep_cluster_status 2.12. wsrep_commit_oooe 

2.13. wsrep_commit_oool 

2.14. wsrep_commit_window 

2.15. wsrep_connected

2.16. wsrep_desync_count 

2.17. wsrep_evs_delayed 

2.18. wsrep_evs_evict_list 

2.19. wsrep_evs_repl_latency 

2.20. wsrep_evs_state

2.21. wsrep_flow_control_paused 

2.22. wsrep_flow_control_paused_ns 

2.23. wsrep_flow_control_recv
2.24. wsrep_flow_control_sent
2.25. wsrep_gcomm_uuid
2.26. wsrep_incoming_addresses 

2.27. wsrep_last_committed
2.28. wsrep_local_bf_aborts
2.29. wsrep_local_cached_downto 

2.30. wsrep_local_cert_failures
2.31. wsrep_local_commits
2.32. wsrep_local_index

2.33. wsrep_local_recv_queue
2.34. wsrep_local_recv_queue_avg 

2.35. wsrep_local_recv_queue_max 

2.36. wsrep_local_recv_queue_min 

2.37. wsrep_local_replays
2.38. wsrep_local_send_queue 

2.39. wsrep_local_send_queue_avg 

2.40. wsrep_local_send_queue_max 

2.41. wsrep_local_send_queue_min 

2.42. wsrep_local_state
2.43. wsrep_local_state_comment 

2.44. wsrep_local_state_uuid
2.45. wsrep_protocol_version

2.46. wsrep_provider_name
2.47. wsrep_provider_vendor
2.48. wsrep_provider_version
2.49. wsrep_ready
2.50. wsrep_received
2.51. wsrep_received_bytes
2.52. wsrep_repl_data_bytes
2.53. wsrep_repl_keys
2.54. wsrep_repl_keys_bytes
2.55. wsrep_repl_other_bytes
2.56. wsrep_replicated
2.57. wsrep_replicated_bytes
2.58. wsrep_thread_count

 

3.建议关注的variables

3.1.建议关注的system variables

3.2.建议关注的status variables

 

 

 

二、背景说明

 

    • 本文档基于mariadb 10.1.19版本的show variables like 'wsrep%';和show status like 'wsrep%';的输出结果编写。默认值和参数是否是全局、动态属性以mariadb的system variables 为准

    • 参数说明及其英文原文主要参考galera cluster手册为主,mariadb和PXC手册为辅。

       

    • 参考资料:

Galera_Cluster_Documentation 

https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/ 

Percona-XtraDB-Cluster-5.6.26-25.12 手册

 

三、文章节选

 

3.建议关注的 variables

3.1. 建议关注的 system variables

  • wsrep_osu_method

  • wsrep_causal_reads

  • wsrep_cluster_address

  • wsrep_cluster_name

  • wsrep_convert_lock_to_trx

  • wsrep_desync

  • wsrep_dirty_reads

  • wsrep_load_data_splitting

  • wsrep_log_conflicts

  • wsrep_max_ws_rows

  • wsrep_max_ws_size

  • wsrep_notify_cmd

  • wsrep_on

  • wsrep_provider

  • wsrep_provider_options

    • cert.log_conflicts = no; 

    • debug = no; 

    • evs.auto_evict = 0; 

    • evs.delay_margin = PT1S; 

    • evs.delayed_keep_period = PT30S;

    • evs.inactive_check_period = PT0.5S;

    • evs.inactive_timeout = PT15S;

    • evs.info_log_mask = 0; 

    • evs.keepalive_period = PT1S;

    • evs.suspect_timeout = PT5S;

    • gcache.name = /home/mysql/data/mysqldata1/mydata//galera.cache;

    • gcache.size = 1G;

    • gcomm.thread_prio = ;

    • gcs.fc_factor = 1.0;

    • gcs.fc_limit = 16;

    • gcs.fc_master_slave = yes;

    • gcs.max_throttle = 0.25;

    • gcs.sync_donor = no;

    • pc.ignore_quorum = false;

    • pc.ignore_sb = false;

    • pc.wait_prim_timeout = P30S;

    • pc.weight = 1;

    • repl.commit_order = 3;

    • repl.max_ws_size = 2147483647;

  • wsrep_retry_autocommit

  • wsrep_slave_fk_checks

  • wsrep_slave_uk_checks

  • wsrep_slave_threads

  • wsrep_sst_auth

  • wsrep_sst_donor

  • wsrep_sst_method

  • wsrep_sync_wait

3.2. 建议关注的 status variables

  • wsrep_apply_oooe

  • wsrep_cert_interval

  • wsrep_cluster_conf_id

  • wsrep_cluster_size

  • wsrep_cluster_status

  • wsrep_commit_window

  • wsrep_evs_delayed

  • wsrep_evs_evict_list

  • wsrep_evs_repl_latency

  • wsrep_flow_control_paused

  • wsrep_flow_control_paused_ns

  • wsrep_flow_control_recv

  • wsrep_flow_control_sent

  • wsrep_incoming_addresses

  • wsrep_last_committed

  • wsrep_local_bf_aborts

  • wsrep_local_cached_downto

  • wsrep_local_cert_failures

  • wsrep_local_recv_queue

  • wsrep_local_recv_queue_avg

  • wsrep_local_recv_queue_max

  • wsrep_local_replays

  • wsrep_local_send_queue

  • wsrep_local_send_queue_avg

  • wsrep_local_send_queue_max

  • wsrep_local_state_comment

  • wsrep_ready

  • wsrep_received

  • wsrep_received_bytes

  • wsrep_replicated

  • wsrep_replicated_bytes