← Back to team overview

maria-developers team mailing list archive

Re: parallel replication performance


Hi Kristian,

Am 25.03.2014 15:55, schrieb Kristian Nielsen:
> Axel Schwenke <axel@xxxxxxxxxxxx> writes:
>> The poor performance of MySQL with 1 database is expected. However MySQL is
>> much better with 32 databases. Even better than MariaDB :(
> I haven't had time to go through all the numbers and details yet, but just a
> quick check:
> In this test, are you sure that you are running MariaDB in GTID mode?
>     CHANGE MASTER TO master_use_gtid=slave_pos

Yes. This is how the shell code looks:

mysql -S ${SLAVE_SOCKET} -u root -e "SET GLOBAL gtid_slave_pos=''"
mysql -S ${SLAVE_SOCKET} -u root -e "change master to
master_host='', master_user='rep', master_use_gtid=current_pos"
mysql -S ${SLAVE_SOCKET} -u root -e "start slave io_thread"


> So two interesting, but different  comparisons to make here:
> 1. MySQL multi-threaded slave compared to MariaDB GTID with different
> domain_id per database. If MySQL is significantly better here it could
> indicate some problem in MariaDB parallel replication that should be
> investigated; this is possible as this part has not been tested a lot.

I see

> 2. MySQL multi-threaded slave with load split into multiple databases,
> compared to MariaDB without configuring different domains. Or just MariaDB
> compared without and with different domain ids. This is an "unfair" benchmark;
> by explicitly declaring that different databases/domains can run in parallel,
> more opportunity for parallellism is available. But it could still be
> interesting to see how much of that can be obtained from group commit
> parallelism, without changing applications.
> Both of these are interesting, but it was not clear to me which of them you
> were describing?

Actually I haven't tested "MariaDB + multi databases + single GTID
domain". But I don't expect this the behave significantly different from
"MariaDB + single database + single GTID domain". Or will it?

So far the contestants are:

MySQL + single db
MySQL + 32 db
MariaDB + single db
MariaDB + 32 db + 32 GTID domains

where the last one should compare best to "MySQL + 32 db"

Two related questions from me:

1. is there an upper limit for the number of trx per commit group? Any
variables influencing that? commit_wait_count? innodb_log_buffer_size?

2. with multiple GTID domains - do START SLAVE ... UNTIL
master_gtid_pos=... and MASTER_GTID_WAIT(...) work as expected?

What I expect is this: trx in the binlog/relaylog have a strict order.
If a position is given per GTID, the terms /before/ and /after/ that
GTID should be based on the position in the log. Does that hold with
multiple slave threads?

Axel Schwenke - Senior Performance Engineer
MariaDB Services AB

Follow ups