On 2012-10-24 00:36, Yves Trudeau wrote:
> Hi,
> so basically, it is a bit like NDB, it benefits from a higher
> concurrency to overcome the network latency. What's a sane setting
> for the
> parallel apply concurrency?
Hi Yves,
You're absolutely right that one way to counter COMMIT latency is
increasing client concurrency (the other is making transactions longer -
fewer commits). However in this case it is client concurrency and is
unrelated to apply concurrency. The latter is to overcome IO and single
core bottlenecks on a slave.
The issues with parallel applying that Jay mentioned happen with
DELETEs on tables without primary/unique keys which people seem to love
so much nowadays. There also have been issues with foreign key
constraints, but they have been fixed as of the current source head.
Other than that there is a 64K limit on a number of parallel slave
threads. The sane setting depends on the load and you won't know it
until you run it and check wsrep_cert_deps_distance. So as rule of thumb
we'd recommend 4 per proper CPU core. Another consideration is that if
your cluster has N nodes each serving M clients then you may want to
have (N-1)*M slave threads per node to make sure it can handle all of
the load. At least thats a clear upper bound.
Regards,
Alex
--
Alexey Yurchenko,
Codership Oy,
www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011