I am playing around with a MariaDB Galera Multi Master Cluster and I have some performance issues which I do not understand.
I have 2 virtual test machines with Ubuntu 16.04 and MariaDB 10.1 installed. I wrote a simple "benchmark" tool which simulates the creation of a contact in an example application. If I run this benchmark on a single machine, I get around 1050 transactions per seconds on each machine. I did not change anything on the default configuration of mariadb.
If I now cluster those two machines together via galera to a multi-master cluster, I get a significant performance drop to around 99 transactions per second.
The two machines are connected via a Gigabit network. I measured the throughput with iperf and its 950Mbits. The ping times are around 0.35ms. The galera configuration is:
[galera] # Mandatory settings wsrep_on=ON wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_cluster_address="gcomm://192.168.193.220,192.168.193.221" binlog_format=row default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 wsrep_sst_method=rsync wsrep_node_address=192.168.193.220 wsrep_cluster_name="DB Cluster"
I do not wonder about the absolute transactions per second, but about the relative drop from a standalone instance to the cluster. What am I missing?