久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

MySQL中Galera cluster集群常用參數有哪些

137次閱讀
沒有評論

共計 6741 個字符,預計需要花費 17 分鐘才能閱讀完成。

這篇文章主要介紹 MySQL 中 Galera cluster 集群常用參數有哪些,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

1、wsrep_local_state_uuid:
與集群的 wsrep_cluster_state_uuid 一致
root@[(none)] show status like %wsrep_%_state_uuid%
+————————–+————————————–+
| Variable_name  | Value  |
+————————–+————————————–+
| wsrep_local_state_uuid  | eebe303f-5262-11e8-9e80-8a8d79151541 |
| wsrep_cluster_state_uuid | eebe303f-5262-11e8-9e80-8a8d79151541 |
+————————–+————————————–+

2、wsrep_last_committed:
集群已經提交事務數目,是一個累計值,所有節點應該相等,如果出現不一致,說明事務有延遲,可以用來計算延遲。
root@[(none)] show status like %wsrep_last_committed%
+———————-+——–+
| Variable_name  | Value  |
+———————-+——–+
| wsrep_last_committed | 115562 |
+———————-+——–+

3、wsrep_replicated:
從本地節點復制出去的寫集 (write set) 數目,wsrep_replicated_bytes 為寫集的總字節數;可以用于參考節點之間的負載均衡是否平衡;該值較大的節點較為繁忙。
root@[(none)] show status like %wsrep_replicated%
+————————+———-+
| Variable_name  | Value  |
+————————+———-+
| wsrep_replicated  | 13579  |
| wsrep_replicated_bytes | 35585864 |
+————————+———-+

4、wsrep_received:
與 wsrep_replicated 對應,表示接收來自其他節點的寫集 (write set) 數目.
root@[(none)] show status like %wsrep_received%
+———————-+———-+
| Variable_name  | Value  |
+———————-+———-+
| wsrep_received  | 11036  |
| wsrep_received_bytes | 35576367 |
+———————-+———-+

5、wsrep_local_commits:
從本地節點發出的寫集 (write set) 被提交的數目,不超過 wsrep_replicated 的數目。
root@[(none)] show status like %wsrep_local_commits%
+———————+——-+
| Variable_name  | Value |
+———————+——-+
| wsrep_local_commits | 13582 |
+———————+——-+

6、wsrep_local_cert_failures:
同步過程中節點認證失敗計數,沖突來自本地提交的事務和同步隊列中事務存在鎖沖突,則本地驗證失敗(保證全局數據一致性)。
root@[(none)] show status like %wsrep_local_cert_failures%
+—————————+——-+
| Variable_name  | Value |
+—————————+——-+
| wsrep_local_cert_failures | 0  |
+—————————+——-+

7、wsrep_local_bf_aborts:
強制放棄的寫集數目,本地事務和同步隊列中正在執行的事務存在鎖沖突時,將強制保證先提交的事務成功,后者回滾或報錯。
root@[(none)] show status like %wsrep_local_bf_aborts%
+———————–+——-+
| Variable_name  | Value |
+———————–+——-+
| wsrep_local_bf_aborts | 1  |
+———————–+——-+

8、wsrep_local_send_queue:
發送隊列的長度。wsrep_local_send_queue_avg:從上次查詢狀態到目前發送隊列的平均長度,0.0 意味著復制過程被節流了。
root@[(none)] show status like %wsrep_local_send_queue%
+—————————-+———-+
| Variable_name  | Value  |
+—————————-+———-+
| wsrep_local_send_queue  | 0  |
| wsrep_local_send_queue_max | 2  |
| wsrep_local_send_queue_min | 0  |
| wsrep_local_send_queue_avg | 0.000145 |
+—————————-+———-+

9、wsrep_local_recv_queue:
接收隊列的長度,與 wsrep_local_send_queue 對應。
root@[(none)] show status like %wsrep_local_send_queue%
+—————————-+———-+
| Variable_name  | Value  |
+—————————-+———-+
| wsrep_local_send_queue  | 0  |
| wsrep_local_send_queue_max | 2  |
| wsrep_local_send_queue_min | 0  |
| wsrep_local_send_queue_avg | 0.000145 |
+—————————-+———-+

10、wsrep_cert_deps_distance:
可以并行執行的寫集 (write set) 的最大 seqno 與最小 seqno 之間的平均差值。
root@[(none)] show status like %wsrep_cert_deps_distance%
+————————–+———–+
| Variable_name  | Value  |
+————————–+———–+
| wsrep_cert_deps_distance | 33.977434 |
+————————–+———–+

11、wsrep_apply_oooe:
隊列中事務并發執行占比,值越高意味著效率越高。
root@[(none)] show status like %wsrep_apply_oooe%
+——————+———-+
| Variable_name  | Value  |
+——————+———-+
| wsrep_apply_oooe | 0.006204 |
+——————+———-+

12、wsrep_commit_window:
平均并發提交窗口大小。
root@[(none)] show status like %wsrep_commit_window%
+———————+———-+
| Variable_name  | Value  |
+———————+———-+
| wsrep_commit_window | 1.000423 |
+———————+———-+

13、wsrep_local_state:
節點的狀態, 取值 1 -6。
取值 1:The node starts and establishes a connection to the Primary Component.
取值 2:When the node succeeds with a state transfer request, it begins to cache write-sets.
取值 3:The node receives a State Snapshot Transfer. It now has all cluster data and begins to apply the cached write-sets.
Here the node enables Flow Control to ensure an eventual decrease in the slave queue.
取值 4:The node finishes catching up with the cluster. Its slave queue is now empty and it enables Flow Control to keep it empty.
The node sets the MySQL status variable wsrep_ready to the value 1. The node is now allowed to process transactions.
取值 5:The node receives a state transfer request. Flow Control relaxes to DONOR. The node caches all write-sets it cannot apply.
取值 6:The node completes the state transfer to joiner node.
root@[(none)] show status like %wsrep_local_state%
+—————————+————————————–+
| Variable_name  | Value  |
+—————————+————————————–+
| wsrep_local_state_uuid  | eebe303f-5262-11e8-9e80-8a8d79151541 |
| wsrep_local_state  | 4  |
| wsrep_local_state_comment | Synced  |
+—————————+————————————–+

14、wsrep_incoming_addresses:
集群中其它節點的地址,多個地址之間用逗號分隔。
root@[(none)] show status like %wsrep_incoming_addresses%
+————————–+————————– -+
| Variable_name  | Value  |
+————————–+————————– -+
| wsrep_incoming_addresses | IP1:3306,IP2:3306,IP3:3306 |
+————————–+—————————-+

15、wsrep_cluster_conf_id:
集群節點關系改變的次數(每次增加 / 刪除都會 +1)。
root@[(none)] show status like %wsrep_cluster_conf_id%
+———————–+——-+ 
| Variable_name  | Value | 
+———————–+——-+ 
| wsrep_cluster_conf_id | 53  | 
+———————–+——-+ 

16、wsrep_cluster_size:集群節點個數。
root@[(none)] show status like %wsrep_cluster_size%
+——————–+——-+
| Variable_name  | Value |
+——————–+——-+
| wsrep_cluster_size | 3  |
+——————–+——-+
17、wsrep_cluster_status:
集群的目前狀態,取值:PRIMARY(正常)/NON_PRIMARY(不一致)。
root@[(none)] show status like %wsrep_cluster_status
+———————-+———+
| Variable_name  | Value  |
+———————-+———+
| wsrep_cluster_status | Primary |
+———————-+———+
18、wsrep_connected:
節點是否連接到集群,取值:ON/OFF。
root@[(none)] show status like wsrep_connected
+—————–+——-+
| Variable_name  | Value |
+—————–+——-+
| wsrep_connected | ON  |
+—————–+——-+

19、wsrep_local_index:
節點 id,取值從 0 開始。This node index in the cluster (base 0).
root@[(none)] show status like wsrep_local_index
+——————-+——-+
| Variable_name  | Value |
+——————-+——-+
| wsrep_local_index | 0  |
+——————-+——-+

20、wsrep_ready:
節點是否接收查詢,即節點是否可正常使用。
root@[(none)] show status like %wsrep_ready%
+—————+——-+
| Variable_name | Value |
+—————+——-+
| wsrep_ready  | ON  |
+—————+——-+

以上是“MySQL 中 Galera cluster 集群常用參數有哪些”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注丸趣 TV 行業資訊頻道!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-26發表,共計6741字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 南阳市| 乌拉特后旗| 大余县| 左权县| 苍梧县| 乌审旗| 潜江市| 商水县| 常德市| 大庆市| 东丽区| 开阳县| 桦南县| 共和县| 武陟县| 永胜县| 星子县| 瓮安县| 衢州市| 海口市| 屏东县| 汾阳市| 郓城县| 砚山县| 晴隆县| 高台县| 定兴县| 新疆| 平定县| 登封市| 浙江省| 集贤县| 同江市| 景洪市| 石棉县| 东至县| 东乌珠穆沁旗| 福贡县| 防城港市| 康保县| 商河县|