DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Benchmarking Galera replication overhead

Benchmarking Galera replication overhead

Peter Zaitsev user avatar by
Peter Zaitsev
·
Dec. 21, 12 · Interview
Like (1)
Save
Tweet
Share
4.75K Views

Join the DZone community and get the full member experience.

Join For Free

when 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



Replication (computing) Overhead (computing)

Published at DZone with permission of Peter Zaitsev, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Understanding gRPC Concepts, Use Cases, and Best Practices
  • Distributed SQL: An Alternative to Database Sharding
  • The Future of Cloud Engineering Evolves
  • Java Development Trends 2023

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: