← Back to team overview

maria-developers team mailing list archive

Re: parallel replication performance

 

Kristian Nielsen wrote:

> A couple of things that can be adjusted are --slave-domain-parallel-threads
> and --slave-parallel-max-queued. But I wouldn't expect them to have much
> effect on a sysbench load. If you want, you could try increase
> --slave-parallel-max-queued and set --slave-domain-parallel-threads to 1/32 of
> --slave-parallel-threads, to better match what (I think) MySQL multi-threaded
> slave is doing.

I see. I haven't touched those at all yet. But since sysbench distributes
the load quite evenly on the databases I don't expect any change from them.

I use the following Lua code

"set session gtid_domain_id=" .. (thread_id % oltp_databases) + 1

to set the GTID domain per sysbench worker thread. Sysbench sets the
thread_id internally, counting from 0 to the specified concurrency. So with
i.e. only 4 workers, updates will go to 4 databases and use 4 different GTID
domains.

>> 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?
> 
> There is no upper limit, except that it cannot be larger than the maximum
> number of client threads running/

I see.

>> 2. with multiple GTID domains - do START SLAVE ... UNTIL
>> master_gtid_pos=... and MASTER_GTID_WAIT(...) work as expected?
> 
> Yes. Assuming your expectations are correct, of course :-)
> 
> START SLAVE UNTIL "0-1-100,1-3-300" will replicate in domain 0 until 0-1-100,
> and in domain 1 until 1-3-300, and then stop. Note that if there is anything
> in domain 2, it will stop immediately (effectively at 2-X-0), so nothing will
> be executed in domain 2. Each domain will stop at the right point
> independently of the others.

Ok. My fault. I didn't realize that a complete position needs GTIDs for each
domain used. I was somehow expecting that a GTID from a single domain would
act just like a traditional binlog name + position.

> So the only issue I can think of is that you need to specify all domains in
> your START UNTIL and MASTER_GTID_WAIT() commands. You can just use the value
> of @@gtid_binlog_pos on the master, I suppose.

That's exactly what I am doing and it looks perfect.


XL


References