# Poor writing performance on Percona XtraDB

**URL:** <https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [June 16, 2016, 2:54am UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931 "2016-06-16T02:54:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![silver8435](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@silver8435](https://forums.percona.com/u/silver8435)\
**Post date:** [June 16, 2016, 2:54am UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931/1 "2016-06-16T02:54:57Z")

</div>

I am testing a 3 node galera cluster using sysbench oltp test and i am obtaining very poor performance when testing write speed, around 10 times slower than a normal Percona server. I did some test comparing the performance of a single node galera cluster in order to discard network issues and got that the cluster was still 10 times slower on writing than the server. I don’t think the overhead from wsrep should be that high since in a single node cluster there is no actual replication so I don’t get why the results are so bad. Hope you can give me some clues.

I am using quite minimal configuration with only some modifications about sizes and threads.

binlog\_format = ROW  
innodb\_buffer\_pool\_size = 400M  
innodb\_flush\_log\_at\_trx\_commit = 0  
innodb\_flush\_method = O\_DIRECT  
innodb\_log\_files\_in\_group = 2  
innodb\_log\_file\_size = 1500M  
innodb\_file\_per\_table = 1  
datadir = /var/lib/mysql

wsrep\_cluster\_address = gcomm://  
wsrep\_provider = /usr/lib64/galera3/libgalera\_smm.so

wsrep\_slave\_threads = 8  
wsrep\_cluster\_name = Cluster  
wsrep\_node\_name = Node1

innodb\_locks\_unsafe\_for\_binlog = 1  
innodb\_autoinc\_lock\_mode = 2

I am using sysbench oltp test which does a mix of read(70%)/write(30%) simple queries distributed from 64 clients to 12 diferent tables.

sysbench --test=‘/usr/share/doc/sysbench/tests/db/oltp.lua’ --db-driver=mysql --oltp-table-size=1000000 --mysql-db=sysbench --mysql-user=galeratest --mysql-password=‘1234’ --mysql-host=10.38.3.56 --max-time=60 --max-requests=0 --mysql-table-engine=innodb --oltp-nontrx-mode=complex --oltp-tables-count=12 --num-threads=64 run

---

<div class="post-metadata">

**Author:** ![Aerilon](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Aerilon](https://forums.percona.com/u/Aerilon)\
**Post date:** [November 7, 2016, 9:56am UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931/2 "2016-11-07T09:56:10Z")

</div>

Hi,

I am testing the 5.7.14 cluster right now and I am facing the same problem as you did.  
I used msqlslap to test write performance and whether I work with 1-2 or 3 node started, it is around 10 times slower to write a few 10s of thousand of query than to do it with a simple percona server freshly installed.  
I tried with local and distant storage, and with vm forced on the same host, same result.  
I couldn’t find any tweaking or tuning that had an impact on the performances.

Did you find anything that made the write performances better by any chance?

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [November 8, 2016, 11:43pm UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931/3 "2016-11-08T23:43:47Z")

</div>

Let me share the result we got when we tried a simple sysbench against PS-5.7.14 and PXC-5.7.14

PS  
transactions: 11964 (239.13 per sec.)

PXC (operating as single cluster node)  
transactions: 10974 (219.31 per sec.)

PXC (operating as non-cluster node)  
transactions: 11625 (232.35 per sec.)

* * *

As you can see PS and PXC (in non-cluster node) performance is comparable.

PXC in cluster node (even though single node) has some extra code snippets to execute and so take a small hit.  
But surely we don’t see a hit of 10 times slower.

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [November 9, 2016, 12:37am UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931/4 "2016-11-09T00:37:31Z")

</div>

BTW PXC in clustering mode has lot more to do than normal PS so if you want to use PXC node as standalone node please use it with wsrep\_provider=none. Cluster node != Standalone node even if cluster has single node.

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [April 24, 2017, 11:31am UTC](https://forums.percona.com/t/poor-writing-performance-on-percona-xtradb/4931/5 "2017-04-24T11:31:24Z")

</div>

check the performance optimized pxc-5.7

[url][https://www.percona.com/blog/2017/04/19/performance-improvements-percona-xtradb-cluster-5-7-17/[/url]](https://www.percona.com/blog/2017/04/19/performance-improvements-percona-xtradb-cluster-5-7-17/%5B/url%5D)
