I have also problem with Galera Cluster perfomances. Currently using version 10.2.6.
I noticed something similar as is desceribed here:
https://jira.mariadb.org/browse/MDEV-14339In short if I use
log_bin parameter (on all 3 Galera Cluseter nodes) performances are 5-6 times better than without it despite I would expect worse results if system has to save also binary logs.
If I use log_bin only on 2 nodes but on 1 not then this node is bottleneck: wsrep_flow_control_sent start to increase, iostat -x statistics shows a lot of utilization, top shows bigger "wa" ... As I said above I don't see logic in that cause I would more expect this if I save binary logs.
But it looks that there is something behind that if log_bin is enabled performances are much better.
In some cases we use log_bin on first two Galera Cluster nodes so normally we have log_bin enabled on first two. But on 3rd not and so I started to investigate why is 3rd node so slower and shows above observations (iostat, wa, wsrep_flow_control ...)
I was doing very simple test. On first node I was inserting 20000 records, on other two I was checking what is going on with log_bin enabled on all 3 it takes 25s to do work, without it on all 3 it needs 140s.
I was playing also with other parameters but I didnt see any big changes. Of course
innodb_flush_log_at_trx_commit must be 0 or 2 otherwise results can be even worse.
Any explanation why bin_log is important or if there is combination with some other parameter that we use?
My server.cnf settings:
[server]
port=3306
server-id=100
gtid-domain-id=100
gtid-strict-mode=OFF
log_bin=/tmp/binlog #!!!!!!
[mysqld]
[galera]
wsrep-restart-slave=1
wsrep_retry_autocommit=0
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_gtid_domain_id=100
wsrep_gtid_mode=ON
wsrep_sst_method=xtrabackup-v2
wsrep_node_incoming_address="192.168.172.137"
wsrep_sst_receive_address="192.168.172.137"
wsrep_node_address="192.168.172.137"
wsrep_node_name="node137"
wsrep_provider_options="evs.delay_margin=PT1S;evs.delayed_keep_period=PT10S;evs.auto_evict=0;evs.version=1"
wsrep_sst_auth=sst_user:mysqxyz
wsrep_notify_cmd=/opt/OpenEPC/bin/wsrep_notify.sh
wsrep_dirty_reads="1"
wsrep_cluster_name='galera_hss_100'
wsrep_cluster_address="gcomm://
192.168.172.137,192.168.172.138,192.168.172.139"
my.cnf:
[mysqld]
skip-slave-start
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
transaction-isolation=READ-COMMITTED
query_cache_size=0
query_cache_type=0
innodb_log_file_size=256M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2