I am testing a 3 node galera cluster using sysbench oltp test and i am obtaining very poor performance when testing write speed, around 10 times slower than a normal Percona server. I did some test comparing the performance of a single node galera cluster in order to discard network issues and got that the cluster was still 10 times slower on writing than the server. I don’t think the overhead from wsrep should be that high since in a single node cluster there is no actual replication so I don’t get why the results are so bad. Hope you can give me some clues.
I am using quite minimal configuration with only some modifications about sizes and threads.
binlog_format = ROW
innodb_buffer_pool_size = 400M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 1500M
innodb_file_per_table = 1
datadir = /var/lib/mysql
wsrep_cluster_address = gcomm://
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so
wsrep_slave_threads = 8
wsrep_cluster_name = Cluster
wsrep_node_name = Node1
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
I am using sysbench oltp test which does a mix of read(70%)/write(30%) simple queries distributed from 64 clients to 12 diferent tables.
sysbench --test=‘/usr/share/doc/sysbench/tests/db/oltp.lua’ --db-driver=mysql --oltp-table-size=1000000 --mysql-db=sysbench --mysql-user=galeratest --mysql-password=‘1234’ --mysql-host=10.38.3.56 --max-time=60 --max-requests=0 --mysql-table-engine=innodb --oltp-nontrx-mode=complex --oltp-tables-count=12 --num-threads=64 run