SlideShare a Scribd company logo
Performance Tuning of MySQL Cluster
April 2014
Johan Andersson
Severalnines AB
johan@severalnines.com
Agenda
!  7.4 – What’s coming?
!  7.3 Feature Update
!  OS Tuning
!  Stability Tuning
!  Application design
!  Identifying bottlenecks
!  Tuning tricks
2
Copyright 2011 Severalnines AB
7.4 - what is coming
!  Optimized Scans
!  Overload/Overcommitting
Resource protection
!  Improved Checkpointing
!  10% more performance
3
Copyright 2011 Severalnines AB
7.3 Feature Update
!  Node.js Connector
!  JavaScript (V8 engine) to access data directly in the
Data nodes
!  No SQL – bypasses the MySQL Server ! lower latency,
high throughput for simple queries (like PK operations,
simple scans from one table)
4
Copyright 2011 Severalnines AB
7.3 Feature Update
!  FOREIGN KEYs finally supported!
!  Implemented at the Data Node level
!  But..
ERROR 1506 (HY000): Foreign key clause is not yet
supported in conjunction with partitioning
!  Hopefully fixed for the GA release
!  What about the performance penalty?
5
Copyright 2011 Severalnines AB
7.3 Foreign Key Perf
create table users_posts (
uid integer ,
fid integer ,
pid integer auto_increment,
message varchar(1024),
primary key(uid,fid, pid),
constraint fk_forum foreign key(fid) references forum(fid) on delete cascade,
constraint fk_user foreign key(uid) references users(uid) on delete cascade
) engine=ndb;
!  Compare INSERT performance with and w/o FKs
!  With FK, must check that forum(fid) and users(uid) exists.
!  Populate with 1M records
6
Copyright 2011 Severalnines AB
7.3 Foreign Key Perf
!  Bencher drivers the load:
!  https://github.com/severalnines/bencher
!  4 threads, 2 data nodes, 4 cores,
!  App ! mysqld ! data nodes
!  FOREIGN KEYs enabled
Summary:
--------------------------
Average Throughput = 1274.58 tps (stdev=59.71)
7
Copyright 2011 Severalnines AB
7.3 Foreign Key Perf
!  Bencher drivers the load:
!  https://github.com/severalnines/bencher
!  4 threads, 2 data nodes, 4 cores,
!  App ! mysqld ! data nodes
!  Not using FOREIGN KEYs
Summary:
--------------------------
Average Throughput = 1428.57 tps (stdev=57.10)
!  Foreign keys gave ~11% drop in performance.
8
Copyright 2011 Severalnines AB
7.2 ! 7.3 Caveats
!  A little gotcha:
!  --engine-condition-pushdown ! no longer supported in
MySQL 5.6
!  Mysqld will fail to start
!  Take it out from my.cnf before upgrading!
9
Copyright 2011 Severalnines AB
Facts
!  A single query will never run as fast as on Innodb
(served from RAM)
!  Network latency is a issue
!  More data nodes does not speed up query execution
time.
10
Copyright 2011 Severalnines AB
OS Tuning
!  Disable NUMA in /etc/grub.conf
!  echo ‘0’ > /proc/sys/vm/swappiness
echo ‘vm.swappiness=0’ >> /etc/sysctl.conf
!  Bind data node threads to CPUs/cores
!  cat /proc/interrupts | grep eth
cpu0 cpu1 cpu2 cpu3

44: 31 49432584 0 0 xen-dyn-event eth0"
45: 1633715292 0 0 0 xen-dyn-event eth1"
11
Copyright 2011 Severalnines AB
Avoid!
OK!
In config.ini [ndbd default]:
ThreadConfig=ldm={count=1,cpubind=1,2},main={cpubind=3} ..
Perf Config Tuning (1)
!  How many Local Data Managers ?
!  How many TC threads?
Copyright 2011 Severalnines AB
12
Perf Config Tuning (2)
Copyright 2011 Severalnines AB
13
3
4
5
9
10
11
IRQBALANCE_BANNED_CPUS
IRQ
CPU0
CPU1
Perf Config Tuning (3)
!  Run representative load
!  Does any NDB Thread run hot?
!  Increase with threads of that type
!  Enable HyperThreading
!  Can give 40% more
!  Enable:
!  RealTimeScheduler=1
!  Don’t forget:
!  NoOfFragmentLogParts=<no of LDMs>
Copyright 2011 Severalnines AB
14
Stability Tuning
!  Tuning the REDO log is key
!  FragmentLogFileSize=256M
!  NoOfFragmentLogFiles=<4-6> X DataMemory in MB / 4 x
FragmentLogFileSize
!  RedoBuffer=64M for a write busy system
!  Disk based data:
!  SharedGlobalMemory=4096M
!  In the LOGFILE GROUP: undo_buffer_size=128M
!  Or higher (max is 600M)
15
Copyright 2011 Severalnines AB
Stability Tuning
!  Make sure you don’t have more “execution threads” than cores
!  You want to have
!  Major page faults low
!  Involuntary context switches low
mysql> SELECT node_id, thr_no,thr_nm , os_ru_majflt,
os_ru_nivcsw FROM threadstat;
+---------+--------+--------+--------------+--------------+
| node_id | thr_no | thr_nm | os_ru_majflt | os_ru_nivcsw |
+---------+--------+--------+--------------+--------------+
| 3 | 0 | main | 1 | 541719 |
| 4 | 0 | main | 0 | 561769 |
+---------+--------+--------+--------------+--------------+
2 rows in set (0.01 sec)
16
Copyright 2011 Severalnines AB
Application Design
!  Define the most typical Use Cases
!  List all my friends, session management etc etc.
!  Optimize everything for the typical use case
!  Engineer schema to cater for the Use Cases
!  Keep it simple
!  Complex access patterns does not scale
!  Simple access patterns do ( Primay key and Partitioned Index Scans )
!  Note! There is no parameter in config.ini that affects
performance – only availability.
!  Everything is about the Schema and the Queries.
!  Tune the mysql servers (sort buffers etc) as you would for innodb.
17
Copyright 2011 Severalnines AB
Simple Access
!  PRIMARY KEY lookups are HASH lookup O(1)
!  INDEX searches a T-tree and takes O(log n) time.
!  In 7.2 and later JOINs are ok, but in 7.1 you should try
to avoid them.
18
Copyright 2011 Severalnines AB
Identifying Bottlenecks
!  High CPU usage on data nodes
!  Probably a lot of large index scans and full table scans are used.
!  Check Slow query log or a query monitor
!  High CPU usage on MySQL servers
!  Probably a lot of GROUP BY/DISTINCT or aggregate functions.
!  Hardly no CPU is used on either MySQL or data nodes
!  Probably low load
!  Time is spent on network (a lot of “ping pong” to satisfy a request).
!  System is running slow in general
!  Disks (io util), queries, swap (must never happen), network
Need To Add Data Nodes?
!  (adding MySQL servers is easy)
!  top –Hd1
!  Is any of data nodes threads at 100%?
!  Yes: add more data nodes (online)
!  No: do nothing
Detecting Query Problems
!  Here is a standard method for how to attack the problem.
!  Performance tuning is a never-ending loop:
BEGIN
–  Capture information – e.g, slow query log
•  Change long_query_time if needed
–  EXPLAIN the queries
•  What indexes are used?
•  Are tables JOINed in the correct order (small to big)
–  Re-run the optimized typical use cases using bencher/
mysqlslap
GOTO BEGIN;
END;
!  Never tune unless you can measure and test!
!  Don't optimize unless you have a problem!
Enable Logging
!  Slow query log
!  set global slow_query_log=1;
!  set global long_query_time=0.01;
!  set global log_queries_not_using_indexes=1;
!  General log (if you don’t get enough info in the Slow
Query Log)
!  Activate for a very short period of time (30-60seconds) –
intrusive
!  Can fill up disk very fast – make sure you turn it off.
!  set global general_log=1;
!  Use Severalnines ClusterControl
!  Includes a Cluster-wide Query Monitor.
!  Query frequency, EXPLAINs, lock time etc.
!  Performance Monitor and Manager.
Setup
23
Copyright 2011 Severalnines AB
UID FID data
1 1 A
2 3 B
1 2 C
2 4 D
table t1
Partition 0
Partition 1
NETWORK!
Sharding
!  By default, all index scans hit all data nodes
!  good if result set is big – you want as many CPUs as possible to
help you.
!  For smaller result sets (~a couple of hundred records) Partition
Pruning is key for scalability.
!  User-defined partitioning can help to improve equality index
scans on part of a primary key.
!  CREATE TABLE t1 (uid,
fid,
somedata,
PRIMARY KEY(uid, fid))
PARTITION BY KEY(uid);
!  All data belonging to a particular uid will be on the same
partition.
!  Great locality!
!  select * from user where uid=1;
!  Only one data node will be scanned (no matter how many
nodes you have)
Sharding
UID FID data
1 1 A
2 3 B
1 2 C
2 4 D
table t1
UID FID data
1 1 A
1 2 C
2 3 B
2 4 D
table t1
Partition 0
Partition 1
PARTITION BY KEY(UID)Default Partitioning
Sharding
mysql> show global status like 'ndb_pruned_scan_count’;
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Ndb_pruned_scan_count | 0 |
+-----------------------+-------+
CREATE TABLE t1( … ) PARTITION BY KEY (userid);
An run query, and verify it works:
select * from user where uid=1;
mysql> show global status like 'ndb_pruned_scan_count’;
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Ndb_pruned_scan_count | 1 |
+-----------------------+-------+
Sharding
mysql> show global status like 'ndb%pruned%';
| Ndb_api_table_scan_count | 264 |
| Ndb_api_range_scan_count | 18 |
| Ndb_api_pruned_scan_count | 3 |
Sharding - EXAMPLE
create table users_posts2 (
uid integer ,
fid integer ,
pid integer auto_increment,
message varchar(1024),
primary key(uid,fid, pid)
) engine=ndb partition by key(uid);
NO PARTITIONING
create table users_posts2 (
uid integer ,
fid integer ,
pid integer auto_increment,
message varchar(1024),
primary key(uid,fid, pid)
) engine=ndb;
PARTITION BY KEY
Sharding – EXPLAIN PARTITIONS
mysql> explain partitions select * from users_posts u where u.uid=1G
id: 1
select_type: SIMPLE
table: u
partitions: p0,p1
type: ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: const
rows: 2699
Extra: NULL
With PARTITION BY KEY (UID)
mysql> explain partitions select * from users_posts2 u where
u.uid=1G
id: 1
select_type: SIMPLE
table: u
partitions: p0
type: ref
possible_keys: PRIMARY
key: PRIMARY
key_len: 4
ref: const
rows: 2699
Extra: NULL
Data Types
BLOBs/TEXTs vs VARBINARY/VARCHAR
!  BLOB/TEXT columns are stored in an external hidden table.
!  First 256B are stored inline in main table
!  Reading a BLOB/TEXT requires two reads
!  One for reading the Main table + reading from hidden
table
!  Change to VARBINARY/VARCHAR if:
!  Your BLOB/TEXTs can fit within an 14000 Bytes record
!  (record size is currently 14000 Bytes)
!  Reading/writing VARCHAR/VARBINARY is less expensive
Note 1: BLOB/TEXT are also more expensive in Innodb as BLOB/TEXT data is
not inlined with the table. Thus, two disk seeks are needed to read a
BLOB.
Note 2: Store images, movies etc outside the database on the filesystem.
Query Tuning
!  MySQL Cluster 7.2 and later has pushed down joins ! joins
are performed in the data nodes.
!  OPTIMIZER in MySQL Cluster 7.1 and earlier is weak
!  Statistics gathering is non-existing
!  Optimizer thinks there are only 10 rows to examine in each
table!
!  FORCE INDEX / STRAIGHt_JOIN to get queries run the way you
want
Query Tuning
!  if you have two similar indexes:
!  index(a)
!  index(a,ts)
on the following table
CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` bigint(20) DEFAULT NULL,
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_t1_a` (`a`),
KEY `idx_t1_a_ts` (`a`,`ts`)) ENGINE=ndbcluster DEFAULT CHARSET=latin1
Query Tuning
mysql> select count(id) from t1 where a=5;
+-----------+
| count(id) |
+-----------+
| 3072000 |
+-----------+
1 row in set (0.02 sec)
mysql> select count(id) from t1 where a=5
and ts>'2013-04-18 14:34:08’;
+-----------+
| count(id) |
+-----------+
| 512 |
+-----------+
1 row in set (0.00 sec)
Query Tuning Pre 7.2
mysql> explain select * from t1 where a=2 and ts='2011-10-05 15:32:11';
+----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref |
rows | Extra |
+----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+
| 1 | SIMPLE | t1 | ref | idx_t1_a,idx_t1_a_ts | idx_t1_a | 9 | const | 10 |
Using where |
+----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+
!  Use FORCE INDEX(..) ...
mysql> explain select * from t1 FORCE INDEX (idx_t1_a_ts) where a=2 and ts='2011-10-05
15:32:11;
+| 1 | SIMPLE | t1 | ref | idx_t1_a_ts | idx_t1_a_ts | 13 | const,const | 10 |
Using where |
1 row in set (0.00 sec)
!  ..to ensure the correct index is picked!
!  The difference can be 1 record read instead of any
number of records!
Index Statistics
explain select * from t1 where a=5 and ts>'2013-04-18 14:34:08' G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: t1
type: range
possible_keys: idx_t1_a,idx_t1_a_ts
key: idx_t1_a
key_len: 9
ref: const
Rows: 17
Extra: Using where with pushed condition
Index Statistics
mysql> analyze table t1;
+---------+---------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------+---------+----------+----------+
| test.t1 | analyze | status | OK |
+---------+---------+----------+----------+
1 row in set (3.40 sec)
Index Statistics
Mysql> explain select * from t1 where a=5
and ts>'2013-04-18 14:34:08' G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: t1
type: range
possible_keys: idx_t1_a,idx_t1_a_ts
key: idx_t1_a_ts
key_len: 13
ref: NULL
rows: 253
Extra: Using where with pushed condition; Using MRR
1 row in set (0.00 sec)
Ndb_cluster_connection_pool
!  Improved in MC 7.3, set ndb_cluster_connection_pool
between 1 and 4.
!  MySQL Cluster 7.2 and earlier:
!  Problem:
!  A Sendbuffer on the connection between mysqld and the
data nodes is protected by a Mutex.
!  Connection threads in MySQL must acquire Mutex and the put
data in SendBuffer.
!  Many threads gives more contention on the mutex
!  Must scale out with many MySQL Servers.
!  Workaround:
!  Ndb_cluster_connection_pool (in my.cnf) creates more
connections from one mysqld to the data nodes
!  Threads load balance on the connections gives less
contention on mutex which in turn gives increased scalabilty
!  Less MySQL Servers needed to drive load!
!  www.severalnines.com/cluster-configurator allows you to
specify the connection pool.
Ndb_cluster_connection_pool
!  Improved in MC 7.3, set ndb_cluster_connection_pool
between 1 and 4.
!  MySQL Cluster 7.2 and earlier:
!  Gives at least 70% better performance and a MySQL Server that
can scale beyond four database connections.
!  Set Ndb_cluster_connection_pool=2x<CPU cores>
!  It is a good starting point
!  One free [mysqld] slot is required in config.ini for each
Ndb_cluster_connection.
!  4 mysql servers,each with Ndb_cluster_connection_pool=8
requires 32 [mysqld] in config.ini
!  Note that also memcached and node.js, cluster/j etc also has
the concept of the ndb_cluster_connection_pool.
Q&A
40
Copyright 2011 Severalnines AB
Resources
!  MySQL Cluster Configurator
!  www.severalnines.com/config
!  MySQL Cluster Management + Monitoring
!  www.severalnines.com/cmon
!  MySQL Cluster Training Slides
!  www.severalnines.com/mysql-cluster-training
!  My Blog
!  johanandersson.blogspot.com
Keep in touch…
!  Facebook
!  www.facebook.com/severalnines
!  Twitter
!  @severalnines
!  Linked in:
!  www.linkedin.com/company/severalnines
Thank you for your time!
johan@severalnines.com
43
Copyright 2011 Severalnines AB

More Related Content

What's hot

Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
Kyle Hailey
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
Sveta Smirnova
 
MySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB StatusMySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB Status
Karwin Software Solutions LLC
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
Sveta Smirnova
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Kristofferson A
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
Kyle Hailey
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add up
John Beresniewicz
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
Tanel Poder
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
Sveta Smirnova
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceEnkitec
 
Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016
StackIQ
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
Sveta Smirnova
 
OOW 2013: Where did my CPU go
OOW 2013: Where did my CPU goOOW 2013: Where did my CPU go
OOW 2013: Where did my CPU goKristofferson A
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Kyle Hailey
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersKyle Hailey
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database Administrators
Sveta Smirnova
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
StackIQ
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tears
Sveta Smirnova
 

What's hot (20)

Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
MySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB StatusMySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB Status
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
Mysql56 replication
Mysql56 replicationMysql56 replication
Mysql56 replication
 
AWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add upAWR Ambiguity: Performance reasoning when the numbers don't add up
AWR Ambiguity: Performance reasoning when the numbers don't add up
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
 
Oracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention TroubleshootingOracle Latch and Mutex Contention Troubleshooting
Oracle Latch and Mutex Contention Troubleshooting
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata Performance
 
Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
OOW 2013: Where did my CPU go
OOW 2013: Where did my CPU goOOW 2013: Where did my CPU go
OOW 2013: Where did my CPU go
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database Administrators
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tears
 

Viewers also liked

Severalnines Self-Training: MySQL® Cluster - Part VI
Severalnines Self-Training: MySQL® Cluster - Part VISeveralnines Self-Training: MySQL® Cluster - Part VI
Severalnines Self-Training: MySQL® Cluster - Part VI
Severalnines
 
Severalnines Self-Training: MySQL® Cluster - Part V
Severalnines Self-Training: MySQL® Cluster - Part VSeveralnines Self-Training: MySQL® Cluster - Part V
Severalnines Self-Training: MySQL® Cluster - Part V
Severalnines
 
Severalnines Self-Training: MySQL® Cluster - Part II
Severalnines Self-Training: MySQL® Cluster - Part IISeveralnines Self-Training: MySQL® Cluster - Part II
Severalnines Self-Training: MySQL® Cluster - Part II
Severalnines
 
Severalnines Training: MySQL Cluster - Part X
Severalnines Training: MySQL Cluster - Part XSeveralnines Training: MySQL Cluster - Part X
Severalnines Training: MySQL Cluster - Part X
Severalnines
 
Severalnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IXSeveralnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IX
Severalnines
 
Severalnines Self-Training: MySQL® Cluster - Part VIII
Severalnines Self-Training: MySQL® Cluster - Part VIIISeveralnines Self-Training: MySQL® Cluster - Part VIII
Severalnines Self-Training: MySQL® Cluster - Part VIII
Severalnines
 
Severalnines Self-Training: MySQL® Cluster - Part VII
Severalnines Self-Training: MySQL® Cluster - Part VIISeveralnines Self-Training: MySQL® Cluster - Part VII
Severalnines Self-Training: MySQL® Cluster - Part VII
Severalnines
 

Viewers also liked (7)

Severalnines Self-Training: MySQL® Cluster - Part VI
Severalnines Self-Training: MySQL® Cluster - Part VISeveralnines Self-Training: MySQL® Cluster - Part VI
Severalnines Self-Training: MySQL® Cluster - Part VI
 
Severalnines Self-Training: MySQL® Cluster - Part V
Severalnines Self-Training: MySQL® Cluster - Part VSeveralnines Self-Training: MySQL® Cluster - Part V
Severalnines Self-Training: MySQL® Cluster - Part V
 
Severalnines Self-Training: MySQL® Cluster - Part II
Severalnines Self-Training: MySQL® Cluster - Part IISeveralnines Self-Training: MySQL® Cluster - Part II
Severalnines Self-Training: MySQL® Cluster - Part II
 
Severalnines Training: MySQL Cluster - Part X
Severalnines Training: MySQL Cluster - Part XSeveralnines Training: MySQL Cluster - Part X
Severalnines Training: MySQL Cluster - Part X
 
Severalnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IXSeveralnines Training: MySQL® Cluster - Part IX
Severalnines Training: MySQL® Cluster - Part IX
 
Severalnines Self-Training: MySQL® Cluster - Part VIII
Severalnines Self-Training: MySQL® Cluster - Part VIIISeveralnines Self-Training: MySQL® Cluster - Part VIII
Severalnines Self-Training: MySQL® Cluster - Part VIII
 
Severalnines Self-Training: MySQL® Cluster - Part VII
Severalnines Self-Training: MySQL® Cluster - Part VIISeveralnines Self-Training: MySQL® Cluster - Part VII
Severalnines Self-Training: MySQL® Cluster - Part VII
 

Similar to MySQL Cluster 7.3 Performance Tuning - Severalnines Slides

MySQL Cluster Performance Tuning - 2013 MySQL User Conference
MySQL Cluster Performance Tuning - 2013 MySQL User ConferenceMySQL Cluster Performance Tuning - 2013 MySQL User Conference
MySQL Cluster Performance Tuning - 2013 MySQL User Conference
Severalnines
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
DataStax Academy
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
Emily Ikuta
 
Sql server 2016 it just runs faster sql bits 2017 edition
Sql server 2016 it just runs faster   sql bits 2017 editionSql server 2016 it just runs faster   sql bits 2017 edition
Sql server 2016 it just runs faster sql bits 2017 edition
Bob Ward
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance Tuning
Severalnines
 
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
Nuno Alves
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2Morgan Tocker
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
Saewoong Lee
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL ServerStephen Rose
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
lefredbe
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
Dave Stokes
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changesMorgan Tocker
 
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
Odinot Stanislas
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикAgnislav Onufrijchuk
 
Blades for HPTC
Blades for HPTCBlades for HPTC
Blades for HPTC
Guy Coates
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Jaime Crespo
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
Mark Swarbrick
 
30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices
David Dhavan
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
Dave Stokes
 

Similar to MySQL Cluster 7.3 Performance Tuning - Severalnines Slides (20)

MySQL Cluster Performance Tuning - 2013 MySQL User Conference
MySQL Cluster Performance Tuning - 2013 MySQL User ConferenceMySQL Cluster Performance Tuning - 2013 MySQL User Conference
MySQL Cluster Performance Tuning - 2013 MySQL User Conference
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
Sql server 2016 it just runs faster sql bits 2017 edition
Sql server 2016 it just runs faster   sql bits 2017 editionSql server 2016 it just runs faster   sql bits 2017 edition
Sql server 2016 it just runs faster sql bits 2017 edition
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
Conference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance TuningConference slides: MySQL Cluster Performance Tuning
Conference slides: MySQL Cluster Performance Tuning
 
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
Wp intelli cache_reduction_iops_xd5.6_fp1_xs6.1
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
 
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
Hands-on Lab: How to Unleash Your Storage Performance by Using NVM Express™ B...
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчик
 
Blades for HPTC
Blades for HPTCBlades for HPTC
Blades for HPTC
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
 
30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices30334823 my sql-cluster-performance-tuning-best-practices
30334823 my sql-cluster-performance-tuning-best-practices
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
 

More from Severalnines

DIY DBaaS: A guide to building your own full-featured DBaaS
DIY DBaaS: A guide to building your own full-featured DBaaSDIY DBaaS: A guide to building your own full-featured DBaaS
DIY DBaaS: A guide to building your own full-featured DBaaS
Severalnines
 
Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
Severalnines
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
Severalnines
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
Severalnines
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
Severalnines
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
Severalnines
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
Severalnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Severalnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Severalnines
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
Severalnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
Severalnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
Severalnines
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
Severalnines
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Severalnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Severalnines
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Severalnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Severalnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
Severalnines
 

More from Severalnines (20)

DIY DBaaS: A guide to building your own full-featured DBaaS
DIY DBaaS: A guide to building your own full-featured DBaaSDIY DBaaS: A guide to building your own full-featured DBaaS
DIY DBaaS: A guide to building your own full-featured DBaaS
 
Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

MySQL Cluster 7.3 Performance Tuning - Severalnines Slides

  • 1. Performance Tuning of MySQL Cluster April 2014 Johan Andersson Severalnines AB johan@severalnines.com
  • 2. Agenda !  7.4 – What’s coming? !  7.3 Feature Update !  OS Tuning !  Stability Tuning !  Application design !  Identifying bottlenecks !  Tuning tricks 2 Copyright 2011 Severalnines AB
  • 3. 7.4 - what is coming !  Optimized Scans !  Overload/Overcommitting Resource protection !  Improved Checkpointing !  10% more performance 3 Copyright 2011 Severalnines AB
  • 4. 7.3 Feature Update !  Node.js Connector !  JavaScript (V8 engine) to access data directly in the Data nodes !  No SQL – bypasses the MySQL Server ! lower latency, high throughput for simple queries (like PK operations, simple scans from one table) 4 Copyright 2011 Severalnines AB
  • 5. 7.3 Feature Update !  FOREIGN KEYs finally supported! !  Implemented at the Data Node level !  But.. ERROR 1506 (HY000): Foreign key clause is not yet supported in conjunction with partitioning !  Hopefully fixed for the GA release !  What about the performance penalty? 5 Copyright 2011 Severalnines AB
  • 6. 7.3 Foreign Key Perf create table users_posts ( uid integer , fid integer , pid integer auto_increment, message varchar(1024), primary key(uid,fid, pid), constraint fk_forum foreign key(fid) references forum(fid) on delete cascade, constraint fk_user foreign key(uid) references users(uid) on delete cascade ) engine=ndb; !  Compare INSERT performance with and w/o FKs !  With FK, must check that forum(fid) and users(uid) exists. !  Populate with 1M records 6 Copyright 2011 Severalnines AB
  • 7. 7.3 Foreign Key Perf !  Bencher drivers the load: !  https://github.com/severalnines/bencher !  4 threads, 2 data nodes, 4 cores, !  App ! mysqld ! data nodes !  FOREIGN KEYs enabled Summary: -------------------------- Average Throughput = 1274.58 tps (stdev=59.71) 7 Copyright 2011 Severalnines AB
  • 8. 7.3 Foreign Key Perf !  Bencher drivers the load: !  https://github.com/severalnines/bencher !  4 threads, 2 data nodes, 4 cores, !  App ! mysqld ! data nodes !  Not using FOREIGN KEYs Summary: -------------------------- Average Throughput = 1428.57 tps (stdev=57.10) !  Foreign keys gave ~11% drop in performance. 8 Copyright 2011 Severalnines AB
  • 9. 7.2 ! 7.3 Caveats !  A little gotcha: !  --engine-condition-pushdown ! no longer supported in MySQL 5.6 !  Mysqld will fail to start !  Take it out from my.cnf before upgrading! 9 Copyright 2011 Severalnines AB
  • 10. Facts !  A single query will never run as fast as on Innodb (served from RAM) !  Network latency is a issue !  More data nodes does not speed up query execution time. 10 Copyright 2011 Severalnines AB
  • 11. OS Tuning !  Disable NUMA in /etc/grub.conf !  echo ‘0’ > /proc/sys/vm/swappiness echo ‘vm.swappiness=0’ >> /etc/sysctl.conf !  Bind data node threads to CPUs/cores !  cat /proc/interrupts | grep eth cpu0 cpu1 cpu2 cpu3
 44: 31 49432584 0 0 xen-dyn-event eth0" 45: 1633715292 0 0 0 xen-dyn-event eth1" 11 Copyright 2011 Severalnines AB Avoid! OK! In config.ini [ndbd default]: ThreadConfig=ldm={count=1,cpubind=1,2},main={cpubind=3} ..
  • 12. Perf Config Tuning (1) !  How many Local Data Managers ? !  How many TC threads? Copyright 2011 Severalnines AB 12
  • 13. Perf Config Tuning (2) Copyright 2011 Severalnines AB 13 3 4 5 9 10 11 IRQBALANCE_BANNED_CPUS IRQ CPU0 CPU1
  • 14. Perf Config Tuning (3) !  Run representative load !  Does any NDB Thread run hot? !  Increase with threads of that type !  Enable HyperThreading !  Can give 40% more !  Enable: !  RealTimeScheduler=1 !  Don’t forget: !  NoOfFragmentLogParts=<no of LDMs> Copyright 2011 Severalnines AB 14
  • 15. Stability Tuning !  Tuning the REDO log is key !  FragmentLogFileSize=256M !  NoOfFragmentLogFiles=<4-6> X DataMemory in MB / 4 x FragmentLogFileSize !  RedoBuffer=64M for a write busy system !  Disk based data: !  SharedGlobalMemory=4096M !  In the LOGFILE GROUP: undo_buffer_size=128M !  Or higher (max is 600M) 15 Copyright 2011 Severalnines AB
  • 16. Stability Tuning !  Make sure you don’t have more “execution threads” than cores !  You want to have !  Major page faults low !  Involuntary context switches low mysql> SELECT node_id, thr_no,thr_nm , os_ru_majflt, os_ru_nivcsw FROM threadstat; +---------+--------+--------+--------------+--------------+ | node_id | thr_no | thr_nm | os_ru_majflt | os_ru_nivcsw | +---------+--------+--------+--------------+--------------+ | 3 | 0 | main | 1 | 541719 | | 4 | 0 | main | 0 | 561769 | +---------+--------+--------+--------------+--------------+ 2 rows in set (0.01 sec) 16 Copyright 2011 Severalnines AB
  • 17. Application Design !  Define the most typical Use Cases !  List all my friends, session management etc etc. !  Optimize everything for the typical use case !  Engineer schema to cater for the Use Cases !  Keep it simple !  Complex access patterns does not scale !  Simple access patterns do ( Primay key and Partitioned Index Scans ) !  Note! There is no parameter in config.ini that affects performance – only availability. !  Everything is about the Schema and the Queries. !  Tune the mysql servers (sort buffers etc) as you would for innodb. 17 Copyright 2011 Severalnines AB
  • 18. Simple Access !  PRIMARY KEY lookups are HASH lookup O(1) !  INDEX searches a T-tree and takes O(log n) time. !  In 7.2 and later JOINs are ok, but in 7.1 you should try to avoid them. 18 Copyright 2011 Severalnines AB
  • 19. Identifying Bottlenecks !  High CPU usage on data nodes !  Probably a lot of large index scans and full table scans are used. !  Check Slow query log or a query monitor !  High CPU usage on MySQL servers !  Probably a lot of GROUP BY/DISTINCT or aggregate functions. !  Hardly no CPU is used on either MySQL or data nodes !  Probably low load !  Time is spent on network (a lot of “ping pong” to satisfy a request). !  System is running slow in general !  Disks (io util), queries, swap (must never happen), network
  • 20. Need To Add Data Nodes? !  (adding MySQL servers is easy) !  top –Hd1 !  Is any of data nodes threads at 100%? !  Yes: add more data nodes (online) !  No: do nothing
  • 21. Detecting Query Problems !  Here is a standard method for how to attack the problem. !  Performance tuning is a never-ending loop: BEGIN –  Capture information – e.g, slow query log •  Change long_query_time if needed –  EXPLAIN the queries •  What indexes are used? •  Are tables JOINed in the correct order (small to big) –  Re-run the optimized typical use cases using bencher/ mysqlslap GOTO BEGIN; END; !  Never tune unless you can measure and test! !  Don't optimize unless you have a problem!
  • 22. Enable Logging !  Slow query log !  set global slow_query_log=1; !  set global long_query_time=0.01; !  set global log_queries_not_using_indexes=1; !  General log (if you don’t get enough info in the Slow Query Log) !  Activate for a very short period of time (30-60seconds) – intrusive !  Can fill up disk very fast – make sure you turn it off. !  set global general_log=1; !  Use Severalnines ClusterControl !  Includes a Cluster-wide Query Monitor. !  Query frequency, EXPLAINs, lock time etc. !  Performance Monitor and Manager.
  • 23. Setup 23 Copyright 2011 Severalnines AB UID FID data 1 1 A 2 3 B 1 2 C 2 4 D table t1 Partition 0 Partition 1 NETWORK!
  • 24. Sharding !  By default, all index scans hit all data nodes !  good if result set is big – you want as many CPUs as possible to help you. !  For smaller result sets (~a couple of hundred records) Partition Pruning is key for scalability. !  User-defined partitioning can help to improve equality index scans on part of a primary key. !  CREATE TABLE t1 (uid, fid, somedata, PRIMARY KEY(uid, fid)) PARTITION BY KEY(uid); !  All data belonging to a particular uid will be on the same partition. !  Great locality! !  select * from user where uid=1; !  Only one data node will be scanned (no matter how many nodes you have)
  • 25. Sharding UID FID data 1 1 A 2 3 B 1 2 C 2 4 D table t1 UID FID data 1 1 A 1 2 C 2 3 B 2 4 D table t1 Partition 0 Partition 1 PARTITION BY KEY(UID)Default Partitioning
  • 26. Sharding mysql> show global status like 'ndb_pruned_scan_count’; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | Ndb_pruned_scan_count | 0 | +-----------------------+-------+ CREATE TABLE t1( … ) PARTITION BY KEY (userid); An run query, and verify it works: select * from user where uid=1; mysql> show global status like 'ndb_pruned_scan_count’; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | Ndb_pruned_scan_count | 1 | +-----------------------+-------+
  • 27. Sharding mysql> show global status like 'ndb%pruned%'; | Ndb_api_table_scan_count | 264 | | Ndb_api_range_scan_count | 18 | | Ndb_api_pruned_scan_count | 3 |
  • 28. Sharding - EXAMPLE create table users_posts2 ( uid integer , fid integer , pid integer auto_increment, message varchar(1024), primary key(uid,fid, pid) ) engine=ndb partition by key(uid); NO PARTITIONING create table users_posts2 ( uid integer , fid integer , pid integer auto_increment, message varchar(1024), primary key(uid,fid, pid) ) engine=ndb; PARTITION BY KEY
  • 29. Sharding – EXPLAIN PARTITIONS mysql> explain partitions select * from users_posts u where u.uid=1G id: 1 select_type: SIMPLE table: u partitions: p0,p1 type: ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: const rows: 2699 Extra: NULL With PARTITION BY KEY (UID) mysql> explain partitions select * from users_posts2 u where u.uid=1G id: 1 select_type: SIMPLE table: u partitions: p0 type: ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: const rows: 2699 Extra: NULL
  • 30. Data Types BLOBs/TEXTs vs VARBINARY/VARCHAR !  BLOB/TEXT columns are stored in an external hidden table. !  First 256B are stored inline in main table !  Reading a BLOB/TEXT requires two reads !  One for reading the Main table + reading from hidden table !  Change to VARBINARY/VARCHAR if: !  Your BLOB/TEXTs can fit within an 14000 Bytes record !  (record size is currently 14000 Bytes) !  Reading/writing VARCHAR/VARBINARY is less expensive Note 1: BLOB/TEXT are also more expensive in Innodb as BLOB/TEXT data is not inlined with the table. Thus, two disk seeks are needed to read a BLOB. Note 2: Store images, movies etc outside the database on the filesystem.
  • 31. Query Tuning !  MySQL Cluster 7.2 and later has pushed down joins ! joins are performed in the data nodes. !  OPTIMIZER in MySQL Cluster 7.1 and earlier is weak !  Statistics gathering is non-existing !  Optimizer thinks there are only 10 rows to examine in each table! !  FORCE INDEX / STRAIGHt_JOIN to get queries run the way you want
  • 32. Query Tuning !  if you have two similar indexes: !  index(a) !  index(a,ts) on the following table CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `a` bigint(20) DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_t1_a` (`a`), KEY `idx_t1_a_ts` (`a`,`ts`)) ENGINE=ndbcluster DEFAULT CHARSET=latin1
  • 33. Query Tuning mysql> select count(id) from t1 where a=5; +-----------+ | count(id) | +-----------+ | 3072000 | +-----------+ 1 row in set (0.02 sec) mysql> select count(id) from t1 where a=5 and ts>'2013-04-18 14:34:08’; +-----------+ | count(id) | +-----------+ | 512 | +-----------+ 1 row in set (0.00 sec)
  • 34. Query Tuning Pre 7.2 mysql> explain select * from t1 where a=2 and ts='2011-10-05 15:32:11'; +----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+ | 1 | SIMPLE | t1 | ref | idx_t1_a,idx_t1_a_ts | idx_t1_a | 9 | const | 10 | Using where | +----+-------------+-------+------+----------------------+----------+---------+-------+------+-------------+ !  Use FORCE INDEX(..) ... mysql> explain select * from t1 FORCE INDEX (idx_t1_a_ts) where a=2 and ts='2011-10-05 15:32:11; +| 1 | SIMPLE | t1 | ref | idx_t1_a_ts | idx_t1_a_ts | 13 | const,const | 10 | Using where | 1 row in set (0.00 sec) !  ..to ensure the correct index is picked! !  The difference can be 1 record read instead of any number of records!
  • 35. Index Statistics explain select * from t1 where a=5 and ts>'2013-04-18 14:34:08' G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t1 type: range possible_keys: idx_t1_a,idx_t1_a_ts key: idx_t1_a key_len: 9 ref: const Rows: 17 Extra: Using where with pushed condition
  • 36. Index Statistics mysql> analyze table t1; +---------+---------+----------+----------+ | Table | Op | Msg_type | Msg_text | +---------+---------+----------+----------+ | test.t1 | analyze | status | OK | +---------+---------+----------+----------+ 1 row in set (3.40 sec)
  • 37. Index Statistics Mysql> explain select * from t1 where a=5 and ts>'2013-04-18 14:34:08' G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t1 type: range possible_keys: idx_t1_a,idx_t1_a_ts key: idx_t1_a_ts key_len: 13 ref: NULL rows: 253 Extra: Using where with pushed condition; Using MRR 1 row in set (0.00 sec)
  • 38. Ndb_cluster_connection_pool !  Improved in MC 7.3, set ndb_cluster_connection_pool between 1 and 4. !  MySQL Cluster 7.2 and earlier: !  Problem: !  A Sendbuffer on the connection between mysqld and the data nodes is protected by a Mutex. !  Connection threads in MySQL must acquire Mutex and the put data in SendBuffer. !  Many threads gives more contention on the mutex !  Must scale out with many MySQL Servers. !  Workaround: !  Ndb_cluster_connection_pool (in my.cnf) creates more connections from one mysqld to the data nodes !  Threads load balance on the connections gives less contention on mutex which in turn gives increased scalabilty !  Less MySQL Servers needed to drive load! !  www.severalnines.com/cluster-configurator allows you to specify the connection pool.
  • 39. Ndb_cluster_connection_pool !  Improved in MC 7.3, set ndb_cluster_connection_pool between 1 and 4. !  MySQL Cluster 7.2 and earlier: !  Gives at least 70% better performance and a MySQL Server that can scale beyond four database connections. !  Set Ndb_cluster_connection_pool=2x<CPU cores> !  It is a good starting point !  One free [mysqld] slot is required in config.ini for each Ndb_cluster_connection. !  4 mysql servers,each with Ndb_cluster_connection_pool=8 requires 32 [mysqld] in config.ini !  Note that also memcached and node.js, cluster/j etc also has the concept of the ndb_cluster_connection_pool.
  • 41. Resources !  MySQL Cluster Configurator !  www.severalnines.com/config !  MySQL Cluster Management + Monitoring !  www.severalnines.com/cmon !  MySQL Cluster Training Slides !  www.severalnines.com/mysql-cluster-training !  My Blog !  johanandersson.blogspot.com
  • 42. Keep in touch… !  Facebook !  www.facebook.com/severalnines !  Twitter !  @severalnines !  Linked in: !  www.linkedin.com/company/severalnines
  • 43. Thank you for your time! johan@severalnines.com 43 Copyright 2011 Severalnines AB