what's new in pxc 5s ne… · read and write anywhere innodb cluster highly available...

Post on 05-Oct-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Jay Janssen Lead Consultant

February 5th, 2014

What’s new in Percona Xtradb Cluster 5.6

www.percona.com

Overview

PXC 5.6 is the aggregation of Percona Server 5.6 Codership MySQL 5.6 patches Galera 3.x

Agenda Major new features Async replication and PXC 5.6 5.6 features that play nicely (or not) with Galera Future features Questions

www.percona.com

What is Percona XtraDB Cluster?

Read and Write anywhere Innodb cluster Highly available quorum-based failover Synchronous replication for data consistency Cluster responsible for node state PXC product 2 years in GA with 5.5, 13 releases

total, over 150k downloads Lots of development effort in the test suite Easy to migrate from and integrated with MySQL

async replication

Galera Replication Enhancements

www.percona.com

Replication overhead for Keys

Keys track all Schemas, Tables, and PK/UKs/FKs of rows being modified in the writeset

250k row inserts ala sysbench prepare

Rep

licat

ed M

Byte

s

0

12.5

25

37.5

50

Galera 2 Galera 3

1.915.2545.2545.25

RBRKeys

www.percona.com

Keys are now hashed

Hashed keys reduces writeset sizes Especially for large key columns !

Single INSERT writeset size

Byte

s

0

100

200

300

400

G2 INT G2 CHAR(128) G3 FLAT8 G3 FLAT16

7147

174

58223223223223 RBR

Keys

www.percona.com

Improved Memory usage (certification index)

mysqld RSS

Kill

obyt

es

0

175,000

350,000

525,000

700,000

wsrep_provider=none Galera 2 Galera 3

384,252

646,444

170,664 198,428197,460168,684

Startup ((innodb_buffer_pool_populate=ON) After Large Trx

www.percona.com

Overall improvements

Writesets have a new format faster certification less memory checksums Writeset keys stored as hashes FLAT8/FLAT16 Socket Checksums CRC32-C (hw accel where supported)

WAN Segments

www.percona.com

Multiple Datacenter Cluster

Datacenter 1

Datacenter 2

Datacenter 3

www.percona.com

Replication without Segments

Datacenter 1

Datacenter 2

Datacenter 3

Client commits here

www.percona.com

Cluster segments

Set gmcast.segment distinct per-location All nodes in colo1 have gmcast.segment=1 All nodes in colo2 have gmcast.segment=2 etc. Benefits Replication traffic is minimized between segments Donor selection prefers local segment

www.percona.com

Replication with Segments

Datacenter 1

Datacenter 2

Datacenter 3

Client commits here

gmcast.segment=2

gmcast.segment=1

gmcast.segment=3

www.percona.com

Donor Selection with Segments

Datacenter 1

Datacenter 2

Datacenter 3

gmcast.segment=2

gmcast.segment=1

gmcast.segment=3

Joiner

prefers local nodes

Asynchronous Replication into the cluster

www.percona.com

Any node can be a slave

node1

node3 node2

async master

www.percona.com

Galera 2 behavior

async

begin

apply

commit request

replicate

certify

commit finalized

slave node

begin

apply

certify

commit finalized

node2

begin

apply

certify

commit finalized

node3cy

cle

per r

eplic

ated

tran

sact

ion

Galera <= 2.x or wsrep_preordered=OFF

www.percona.com

Galera 3 with wsrep_preordered=ON

async

replicate

certify*

commit finalized

slave node

begin

apply

certify*

commit finalized

node2

begin

apply

certify*

commit finalized

node3

cycl

e pe

r rep

licat

ed tr

ansa

ctio

n

Galera 3+ and wsrep_preordered=ON

begin

apply

www.percona.com

When to use wsrep_preordered

wsrep_preordered=ON Better performance Does not allow for conflicts with any other writes No parallel apply for these transactions Good for Master / Slave to Cluster migration wsrep_preordered=OFF Detects conflicts with any other writes Allows parallel apply Good for permanent Cluster-is-a-slave

Asynchronous Replication out of the cluster

www.percona.com

5.6 async GTID integration

Every node with log-bin will have the same GTID for the same transaction

node1

node3 node2

async slave

node1

failed node2

async slave

CHANGE MASTER TO MASTER_HOST='node2',

MASTER_AUTO_POSITION=1

General 5.6 Improvements

www.percona.com

Can I use <5.6 feature> in PXC?

Every new feature works fine within a single node E.g., Innodb Full Text Indexes, Partitioning,

Optimizer enhancements, Performance Schema, etc.

Don’t expect automatic “cluster” support E.g., Online DDL improvements memcached server https://bugs.launchpad.net/percona-xtradb-

cluster/+bug/1254126

www.percona.com

Minimal RBR images

Pre-5.6 RBR is full row images for any row change 5.6 adds binlog_row_image=minimal (not default) Seems fine with PXC RBR image is black-box to Galera 1 Minute Sysbench Update Test (1 col out of 3 modified)

MB

Rep

licat

ed

0

17.5

35

52.5

70

full minimal

13.4

62.3

Upgrading a 5.5 cluster to 5.6

www.percona.com

The easy way

Take the downtime and upgrade it all at once Check for my.cnf settings that are not 5.6

compatible Start each node with “wsrep_provider=none” Run mysql_upgrade Shutdown again Bootstrap normally

www.percona.com

Rolling upgrade

RBR 5.6 -> 5.5 replication is broken For each 5.6 upgraded node Compatibility options with 5.5 must be set Galera socket.checksum=1 Don’t SST 5.5 to 5.6! Don’t write on these nodes! Before last node, flip application to 5.6 nodes Take down remaining 5.5 node(s) for upgrade Rolling restart to remove 5.5 compat options http://bit.ly/pxc56-rolling-upgrade

Odds and Ends

www.percona.com

My Favorite Bug Fixes

Adding auto_increment column to existing table doesn’t cause inconsistency with auto_increment_control

wsrep_local_bf_aborts catches all BF aborts now wsrep_flow_control_sent/received now global

counters wsrep_max_ws_size/ws_rows moving towards

being properly enforced now*

www.percona.com

Future Features

Automatic huge transaction fragmentation/streaming support

Non-blocking DDL support Cluster tolerance to inconsistencies Intelligent inconsistency handling (e.g., node voting) Intelligent donor selection (e.g., check gcache) Performance optimizations (i.e., multi-core) Multiple provider support

Questions?

Advanced Rates End March 2nd at 11:30pm PST, 2014 !

Special Discount for Webinar Attendees: Use Code WebinarSC to receive 10% off of standard

rates (new registrations only) !

http://www.percona.com/live/mysql-conference-2014/

!!!

top related