Benchmarking Galera replication overhead
Join the DZone community and get the full member experience.
Join For Freewhen i mention galera replication as in my previous post on this topic , the most popular question is how does it affect performance.
of course you may expect performance overhead, as in case with galera replication we add some network roundtrip and certification process. how big is it ? in this post i am trying to present some data from my benchmarks.
for tests i use
tpcc-mysql
, datasize 600w (~60gb) with buffer pool 52gb. workload is run under 48 user connections.
hardware:
- 1st node: hp proliant dl380 g6
- 2nd node: dell poweredge r815
- both nodes use fusion-io cards as storage to minimize io overhead
software: percona-server-5.5.15 regular and with galera replication.
during tests i measure throughput each 10 sec, so it allows to observe stability of results. as final result i take median (line that divides top 50% measurements and bottom 50%).
in text i use following code names:
- single – result just on single node, without any replication. this is used to establish baseline
- wsrep – result on single node with enabled wsrep_provider. wsrep stands for write set replication, this is used by galera
- wsrep 2 nodes – result when we have 2 nodes in galera cluster
- replication – result using 2 nodes under regular mysql replication
- semisync – result using 2 nodes with semisync mysql replication
and now go to results.
1. compare baseline to the same node but with enabled
wsrep
.
that is we have
12432
vs
10821
not/10sec.
i think main overhead may coming from writing write sets to disk. galera 1.0 stores events on disk.
2. we add second node connected to first.
the result drops a bit further, network communication adds its overhead.
we have
10384
for 2 nodes vs
10821
for 1 node.
the drop is just somewhat 4.2%
3. it is unfair to compare two nodes system to single node, so let’s see how regular mysql replication performs there.
so we see that running regular replication we have better result:
11180
for mysql replication vs
10384
for 2 galera nodes.
however there two things to consider:
- you see quite periodic drops for mysql replication, i think it is related to binary logs rotation
- and, second, much more serious problem: after 1800 sec of run, slave in regular mysql replication was behind of master by 1000 sec. you can calculate how many transactions slave is missing. for galera replication this is not a problem .
4. now it is interesting how semi-sync replication will do under this workload.
for semi-sync replication we have
6439
not/10sec which is significantly slower than
in any other run.
and even with that, slave was still behind master by
300
sec after 1800 sec of run.
and there to gather all result together:
i personally consider results with galera very good, taking into account that we do not have second node getting behind and this node is consistent with first node.
for further activity it will be interesting to see what overhead we can get in 3-nodes setup,
and also what total throughput we can get if we put load on all nodes, but not only on single.
scripts and raw results on benchmarks launchpad
Published at DZone with permission of Peter Zaitsev, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
What I Learned From Crawling 100+ Websites
-
Tomorrow’s Cloud Today: Unpacking the Future of Cloud Computing
-
What Is TTS and How Is It Implemented in Apps?
-
Building a Java Payment App With Marqeta
Comments