Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue while benchmarking Percona XtraDB Cluster (beta)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Davey Shafik  
View profile  
 More options Mar 26 2012, 12:49 am
From: Davey Shafik <m...@daveyshafik.com>
Date: Mon, 26 Mar 2012 00:49:26 -0400
Local: Mon, Mar 26 2012 12:49 am
Subject: Issue while benchmarking Percona XtraDB Cluster (beta)
Hey,

A few weeks (months?) ago I setup a 4-node cluster with the alpha of
Percona XtraDB Cluster for several reasons:

I was looking at a number of traditional MySQL "clustering" and
scaling techniques, and trying out some new ideas of mine; I decided
to evaluate percona cluster at the same time and to do some
exploratory benchmarks against traditional MySQL replication with one
semi-sync slave, and the rest as async slaves.

For all setups, I used AWS micros; which if you know anything about
micros, is a flawed system upon which to run benchmarks because the
available resources are not guaranteed (they are burstable). I placed
the read nodes in the traditional replication setup behind an ELB, as
well as *all* nodes in the percona cluster behind a (different) ELB.

So, with that in mind, my benchmark consisted of importing a single
350MB sql dump (again, a terrible benchmark, as it would only hit one
node!); because of the flaws I won't dwell on the results, but they
were simply:

- Traditional replication: 250 qps
- Percona Cluster: 1000 qps

This weekend I decided to benchmark Percona Cluster beta, and this
time decided to use 4 Large instances, with an XL instance to run the
benchmarks to alleviate any issues of using micros.

First I ran into issues installing the deb packages on both Debian
Squeeze and Ubuntu Oneiric:

dpkg: error processing
/var/cache/apt/archives/percona-xtradb-cluster-common-5.5_5.5.20-23.4-3738. <distro>_all.deb
(--unpack):
trying to overwrite '/usr/share/info/mysql.info.gz', which is also in
package libmysqlclient18 5.5.21-rel25.0-227.<distro>

This was resolved by doing:

$ dpkg -i --force-overwrite
/var/cache/apt/archives/percona-xtradb-cluster-common-5.5_5.5.20-23.4-3738. <distro>_all.deb
&& apt-get -f install

I ended up using Oneiric after fixing this.

My config looks like this:

#---------------------------------------------
[mysqld]
datadir=/data
user=mysql

binlog_format=ROW

wsrep_provider=/usr/lib/libgalera_smm.so

# Primary
wsrep_cluster_address=gcomm://
# Secondary
# wsrep_cluster_address=gcomm://10.28.78.185

wsrep_slave_threads=2
wsrep_cluster_name=engineyard
wsrep_sst_method=xtrabackup

innodb_locks_unsafe_for_binlog=1
innodb_autoinc_lock_mode=2

#---------------------------------------------

/data is an EBS, and I'm using xtrabackup for my sst method.

I am using sysbench to benchmark, this is my setup:

# 1M rows, imported in via the ELB (takes 40s, 25K writes/s)
$ sysbench --test=oltp --mysql-table-engine=innodb
--oltp-table-size=1000000
--mysql-host=xdbc-cluster-1125795606.us-east-1.elb.amazonaws.com
--mysql-user=root prepare

The MAX(id) is 3999999 (not sure why…), but there is 1M records.

# 10K requests; reconnecting on each transaction, complex test mode:
Variable threads
$ sysbench --num-threads=<INT> --max-requests=10000 --test=oltp
--oltp-table-size=1000000
--mysql-host=xdbc-cluster-1125795606.us-east-1.elb.amazonaws.com
--mysql-user=root --oltp-reconnect-mode=transaction
--oltp-test-mode=complex run

When I run with 16 threads, I consistently get (for example):

ALERT: failed to execute mysql_stmt_execute(): Err1062 Duplicate entry
'500519' for key 'PRIMARY'
FATAL: database error, exiting...

Same with 14 threads; sporadically with 12 threads, rarely with 8
threads and but even with 4 threads…

When it does works, I'm looking at ~1200-2100 qps (see below), but
obviously this is an issue if we're seeing collisions with only 8
concurrent connections.

Any thoughts? I'm going to try using rsync instead of xtrabackup.

- Davey

=========

sysbench 0.4.12:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Running the test with following options:
Number of threads: 4

Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations,  1 pct of values are
returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 10000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            140000
        write:                           50000
        other:                           30000
        total:                           220000
    transactions:                        10000  (59.90 per sec.)
    deadlocks:                           0      (0.00 per sec.)
    read/write requests:                 190000 (1138.11 per sec.)
    other operations:                    30000  (179.70 per sec.)

Test execution summary:
    total time:                          166.9441s
    total number of events:              10000
    total time taken by event execution: 667.5932
    per-request statistics:
         min:                                 56.87ms
         avg:                                 66.76ms
         max:                                552.94ms
         approx.  95 percentile:              72.36ms

Threads fairness:
    events (avg/stddev):           2500.0000/4.18
    execution time (avg/stddev):   166.8983/0.02

sysbench 0.4.12:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Running the test with following options:
Number of threads: 8

Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations,  1 pct of values are
returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 10000
Threads started!
Done.

OLTP test statistics:
    queries performed:
        read:                            140098
        write:                           50033
        other:                           30011
        total:                           220142
    transactions:                        10000  (111.35 per sec.)
    deadlocks:                           7      (0.08 per sec.)
    read/write requests:                 190131 (2117.19 per sec.)
    other operations:                    30011  (334.19 per sec.)

Test execution summary:
    total time:                          89.8034s
    total number of events:              10000
    total time taken by event execution: 718.1731
    per-request statistics:
         min:                                 57.88ms
         avg:                                 71.82ms
         max:                                393.15ms
         approx.  95 percentile:              90.65ms

Threads fairness:
    events (avg/stddev):           1250.0000/4.30
    execution time (avg/stddev):   89.7716/0.02


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Davey Shafik  
View profile  
 More options Mar 26 2012, 10:50 am
From: Davey Shafik <m...@daveyshafik.com>
Date: Mon, 26 Mar 2012 07:50:02 -0700 (PDT)
Local: Mon, Mar 26 2012 10:50 am
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)

Just wanted to note that using rsync for sst did not alleviate this issue.

- Davey

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Mar 26 2012, 12:26 pm
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Mon, 26 Mar 2012 19:26:22 +0300
Local: Mon, Mar 26 2012 12:26 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)
On 2012-03-26 17:50, Davey Shafik wrote:

> Just wanted to note that using rsync for sst did not alleviate this
> issue.

It won't - the issue is in sysbench configuration and the number of
rows. You're simply getting cluster-wide collisions (too few rows) and
that is freaking sysbench out.

Try --mysql-ignore-duplicates=1 option with sysbench.

>> The MAX(id) is 3999999 (not sure why…), but there is 1M records.

Autoincrement increment in 4-node cluster is 4.

Regards,
Alex

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Davey Shafik  
View profile  
 More options Mar 26 2012, 12:40 pm
From: Davey Shafik <m...@daveyshafik.com>
Date: Mon, 26 Mar 2012 12:40:07 -0400
Local: Mon, Mar 26 2012 12:40 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)

> It won't - the issue is in sysbench configuration and the number of rows.
> You're simply getting cluster-wide collisions (too few rows) and that is
> freaking sysbench out.

Can you explain this? too *few* rows? How can I alleviate this issue
without the flag? Is it possible?

- Davey

On Mon, Mar 26, 2012 at 12:26 PM, Alex Yurchenko

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vadim Tkachenko  
View profile  
 More options Mar 26 2012, 12:50 pm
From: Vadim Tkachenko <va...@percona.com>
Date: Mon, 26 Mar 2012 09:50:28 -0700
Local: Mon, Mar 26 2012 12:50 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)
Davey,

sysbench by default uses special distribution, which with 1000000 rows
you basically
update the same rows again and again.

I may suggest you try --oltp-dist-type=uniform for sysbench.

Thanks,
Vadim

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Mar 26 2012, 1:16 pm
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Mon, 26 Mar 2012 20:16:19 +0300
Local: Mon, Mar 26 2012 1:16 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)
On 2012-03-26 19:50, Vadim Tkachenko wrote:

In general - no. In multi-master setup there is always _some_
probability of cluster-wide conflict. Sysbench just should not freak out
and simply should retry the transaction. Increasing the number of rows
or changing distribution will only reduce the probability of that
conflict, but not eliminate it completely.

Regards,
Alex

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Baron Schwartz  
View profile  
 More options Mar 26 2012, 5:03 pm
From: Baron Schwartz <ba...@percona.com>
Date: Mon, 26 Mar 2012 17:03:26 -0400
Local: Mon, Mar 26 2012 5:03 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)
I think it is helpful to understand the locking semantics of Percona XtraDB Cluster. It is one of the few semantic differences compared to using a single server with InnoDB.

1. With InnoDB, locking is pessimistic. That means that if a row must be locked, it is locked immediately and held until the end of the transaction. It's possible for a cycle in locks to be created, which causes a deadlock. But we will never come to the commit and discover that we need a lock on a row we didn't get. No after-the-fact surprises.

2. With Percona XtraDB cluster, the transaction is insulated to the node on which it runs, with no cross-node communication until commit time. That means that locking is pessimistic *locally* but optimistic *cluster-wide*. It is possible to finish all the work and try to commit, and then discover that there was a conflict on another node, at which point the transaction fails.

- Baron


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henrik Ingo  
View profile  
 More options Apr 19 2012, 1:27 am
From: Henrik Ingo <henrik.i...@avoinelama.fi>
Date: Thu, 19 Apr 2012 08:27:18 +0300
Local: Thurs, Apr 19 2012 1:27 am
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)

On Mon, Mar 26, 2012 at 7:49 AM, Davey Shafik <m...@daveyshafik.com> wrote:
> - Traditional replication: 250 qps
> - Percona Cluster: 1000 qps

Just to point out that this is normal if you compare asynchronous vs
synchronous replication with something single threaded. It is
basically a meaningless measurement, your sysbench tests with multiple
threads will be more interesting.

Note that sysbench 0.5 ignores oltp-reconnect-mode, the functionality
is not there.

> When I run with 16 threads, I consistently get (for example):

> ALERT: failed to execute mysql_stmt_execute(): Err1062 Duplicate entry
> '500519' for key 'PRIMARY'
> FATAL: database error, exiting...

Others have suggested that this is due to rollbacks, however sysbench
does properly handle those. Well, at least sysbench 0.5, I don't know
if you used 0.4.

One thing you have missing is that when benchmarking a galera cluster
you must set

--oltp-auto-inc=off

This is because sysbench assumes a continuous sequence for the primary
key, however with a galera cluster you end up with "holes" in your
auto_increment sequence. Setting --oltp-auto-inc=off forces sysbench
to generate the primary key sequence and you get it correctly.

I think the above error may be due to this, at least if you were
running sysbench 0.5.

henrik

--
henrik.i...@avoinelama.fi
+358-40-8211286 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hai Zhang  
View profile  
 More options Apr 19 2012, 3:01 am
From: Hai Zhang <vj.zhang...@gmail.com>
Date: Thu, 19 Apr 2012 15:01:30 +0800
Local: Thurs, Apr 19 2012 3:01 am
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)

Hi, there,

I also have one question that how to test the difference of performance
between mysql async-replication and semi-replication. Anyone gives me some
idea? I mean, which points are key during  the testing i MUST focus on.
Thanks so much.

On Thu, Apr 19, 2012 at 1:27 PM, Henrik Ingo <henrik.i...@avoinelama.fi>wrote:

--
Regards,
ZhangHai (MySQL DBA)
CNTV

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Yurchenko  
View profile  
 More options Apr 19 2012, 7:27 am
From: Alex Yurchenko <alexey.yurche...@codership.com>
Date: Thu, 19 Apr 2012 14:27:42 +0300
Local: Thurs, Apr 19 2012 7:27 am
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)
On 2012-04-19 10:01, Hai Zhang wrote:

> Hi, there,

> I also have one question that how to test the difference of
> performance
> between mysql async-replication and semi-replication. Anyone gives me
> some
> idea? I mean, which points are key during  the testing i MUST focus
> on.
> Thanks so much.

Well, latencies and throughput is all you can measure directly.

 From what I saw, when benchmarking MySQL async replication you'll
always have an issue of slave lag. (I suspect it may be the case with
semi-sync as well) Different people treat it differently. Some correct
the throughput fro the lag, some just note how long it was - neither
approach gives you a real picture. Because the main difference here may
be not in performance.

The whole benchmark thing, as I understand it, tries to achieve maximum
score by maxing out your hardware. In production you never want to max
out your hardware, so it will operate in a different mode. What becomes
more important in production is _qualitative_ properties of the
software. So if you're testing, focus on how well the software fits your
requirements, not only on how fast it is. It is not that likely that
performance will be a decisive factor for you (although of course it may
be).

Regards,
Alex

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hai Zhang  
View profile  
 More options Apr 19 2012, 11:43 pm
From: Hai Zhang <vj.zhang...@gmail.com>
Date: Fri, 20 Apr 2012 11:43:54 +0800
Local: Thurs, Apr 19 2012 11:43 pm
Subject: Re: Issue while benchmarking Percona XtraDB Cluster (beta)

Alex, thanks so much for your words.

Before I used sysbench to test on the async-replication and
semi-replication mode. But I found the result that it was not expected by
myself ( maybe I am wrong ). From my understanding, the master with
async-replication mode should get more query and run faster than one with
semi-replication mode. Because the master with semi-replication mode must
wait for the ACK response from at least one slave till up to the special
timeout. you see, waiting means time consuming.

As follow is the related info:

-Version
MySQL 5.5.23

-Cmd
sysbench --num-threads=32 --max-requests=1000000 --test=oltp
--oltp-table-size=1000000 --oltp-test-mode=nontrx --oltp-nontrx-mode=insert
--mysql-host=Master_IP

-Output from Master
                                      ------- iostat -------
----------  sysbench    ---------
semi-replication                     ~2900 tps                 555 T/s |
 83 ms(95%)
async-replication                   ~2000 tps                 489 T/s |
92 ms(95%)

So when I faced on the front of the outputs, I doubted that my testing
method was reasonable or not. Later I threw my puzzle here. I am still
trying to understand the semi-replication mode further so far. Please
kindly correct me when I am wrong. Thanks,all.

On Thu, Apr 19, 2012 at 7:27 PM, Alex Yurchenko <

--
Regards,
ZhangHai (MySQL DBA)
CNTV

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »