MariaDB Galera Multi-Master Performance
I don't know about your application/workload but generally, you should try with:


wsrep_slave_threads=N (Do not use a value for wsrep_slave_threads that is higher than the average given by the wsrep_cert_deps_distance status variable)
innodb_flush_log_at_trx_commit=0 (default is 1)
Have you tried redirect all writes to one node and leave the other as a hot-backup? Some workloads get a huge improvement by doing this.