# Replicating into cluster is slow

**URL:** <https://forums.percona.com/t/replicating-into-cluster-is-slow/8265>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [November 11, 2020, 9:21am UTC](https://forums.percona.com/t/replicating-into-cluster-is-slow/8265 "2020-11-11T09:21:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Tom-sl](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@Tom-sl](https://forums.percona.com/u/Tom-sl)\
**Post date:** [November 17, 2020, 4:40am UTC](https://forums.percona.com/t/replicating-into-cluster-is-slow/8265/3 "2020-11-17T04:40:29Z")

</div>

All the servers are in the same datacenter and are the same spec. I made a few config changes which seemed to improve things a bit, but when I try switching applications to read from the servers, the replication slows down again. PMM is set up, though I’m not an expert so am not 100% sure what to look for with this particular issue. It doesn’t seem to indicate a problem with resources as everything looks fine and doesn’t look like the servers are breaking a sweat. CPU usage increases when I make the applications read from the cluster, but no higher than on the current servers.

The servers are virtual servers and spec is as follows:

CPU 4 vCPUs

RAM 15 GB

System Disk 40 GB

Data Disk 150 GB (data and logs are all on this disk)

MySQL settings are:

[mysqld]

server-id=1

datadir=/data/var/lib/mysql

socket=/var/run/mysqld/mysqld.sock

log-error=/data/var/log/mysql/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

log\_bin= /data/var/log/mysql/mysql-bin.log

log\_slave\_updates

expire\_logs\_days=2

bind-address = 0.0.0.0

sql-mode = ‘STRICT\_TRANS\_TABLES,NO\_ZERO\_IN\_DATE,NO\_ZERO\_DATE,ERROR\_FOR\_DIVISION\_BY\_ZERO,NO\_ENGINE\_SUBSTITUTION’

ssl\_ca=/data/var/lib/mysql/ca.pem

ssl\_cert=/data/var/lib/mysql/server-cert.pem

ssl\_key=/data/var/lib/mysql/server-key.pem

lower\_case\_table\_names = 1

max\_connections = 800

skip-name-resolve

innodb\_file\_per\_table

innodb\_buffer\_pool\_size = 10G

innodb\_buffer\_pool\_instances = 16

innodb\_io\_capacity\_max=8000

innodb\_io\_capacity=4000

innodb\_log\_file\_size=256M

innodb\_flush\_log\_at\_trx\_commit = 2

sync\_binlog = 0

wsrep\_slave\_threads = 32

slave-skip-errors = 1062,1047

max\_binlog\_size = 100M

#PMM Logging

log\_output=file

slow\_query\_log=ON

long\_query\_time=0

log\_slow\_rate\_limit=100

log\_slow\_rate\_type=query

log\_slow\_verbosity=full

log\_slow\_admin\_statements=ON

log\_slow\_slave\_statements=ON

slow\_query\_log\_always\_write\_time=1

slow\_query\_log\_use\_global\_control=all

innodb\_monitor\_enable=all

userstat=1

pxc-encrypt-cluster-traffic=ON

early-plugin-load=keyring\_file.so

keyring-file-data = /var/lib/mysql-keyring/keyring

---

_[View the full topic](https://forums.percona.com/t/replicating-into-cluster-is-slow/8265)._
