SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Performance Tuning of MySQL Cluster


  Santa Clara, April 2012




  Johan Andersson

  Severalnines AB

  johan@severalnines.com

  Cell +46 73 073 60 99
Copyright Severalnines 2012
2




      Agenda

      ï‚€ Scaling and Partitioning

      ï‚€ Designing a Scalable System

      ï‚€ Insert Performance Tuning

      ï‚€ Query Tuning

      ï‚€ Random tricks

      ï‚€ Disk Data Tuning




    Copyright Severalnines 2012
3




           Here is ...
    Access Layer

          App        App
         Server     Server



        MYSQL      MYSQL




    STORAGE LAYER


         DATA          DATA
         NODE          NODE



         P0             P1
      Node group 0

        Copyright Severalnines 2012
4




        It can scale linearly ...
    Access Layer

          App        App        App         App      App        App        App      App
         Server     Server     Server      Server   Server     Server     Server   Server



        MYSQL      MYSQL       MYSQL      MYSQL     MYSQL      NDBAPI    NDBAPI    NDBAPI




    STORAGE LAYER                       STORAGE LAYER                   STORAGE LAYER


         DATA          DATA                DATA         DATA                DATA            DATA
         NODE          NODE                NODE         NODE                NODE            NODE



         P0             P1                  P2           P3                  P4             P5
      Node group 0                       Node group 1                    Node group 2

      Copyright Severalnines 2012
if you find the bottlenecks

  ï‚€ A lot of CPU is used on the data nodes
      ï‚€ Probably a lot of large index scans and full table scans are used.

  ï‚€ A lot of CPU is used on the 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 (should never happen)



Copyright Severalnines 2012
and if you know how
  ï‚€ Adding mysqlds – trivial – if the mysqld is the bottleneck

  ï‚€ BUT! Adding data nodes
       ï‚€ More data nodes does not automatically give better performance
                ●
                    Latency may increase for a single query
                ●
                    Total throughout will be improved
       ï‚€ How to get both?




Copyright Severalnines 2012
7




      Designing a
      Scalable System

      ï‚€ Define the most typical Use Cases
          ï‚€ List all my friends, session management etc etc.
          ï‚€ Optimize everything for the typical use case

      ï‚€ 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.




    Copyright Severalnines 2012
8




      Simple Access

      ï‚€ PRIMARY KEY lookups are HASH lookup O(1)

      ï‚€ INDEX searches a T-tree and takes O(log n) time.

      ï‚€ In 7.2 JOINs are ok, but in 7.1 you should try to avoid
        them.




    Copyright Severalnines 2012
9




       Data Access
    Access Layer

          App        App        App       App      App         App      App      App
         Server     Server     Server    Server   Server      Server   Server   Server



        MYSQL      MYSQL      MYSQL      MYSQL    MYSQL       NDBAPI   NDBAPI   NDBAPI




    STORAGE LAYER


         DATA          DATA               DATA         DATA              DATA            DATA
         NODE          NODE               NODE         NODE              NODE            NODE



         P0             P1                P2           P3                 P4             P5
      Node group 0                      Node group 1                   Node group 2

     Copyright Severalnines 2012
10




       Data Access

       ï‚€ One Request can hit all Partitions
            ï‚€ Sub-optimal and won't scale




     Copyright Severalnines 2012
11




       Data Access
     Access Layer

            App         App         App        App      App        App       App      App
           Server      Server      Server     Server   Server     Server    Server   Server



          MYSQL       MYSQL        MYSQL     MYSQL     MYSQL      NDBAPI   NDBAPI    NDBAPI




     STORAGE LAYER


           DATA           DATA                 DATA        DATA               DATA            DATA
           NODE           NODE                 NODE        NODE               NODE            NODE



           P0              P1                  P2           P3                 P4             P5
       Node group 0                         Node group 1                   Node group 2

     Copyright Severalnines 2012
12




       Data Access

       ï‚€ One Request hits one partition
            ï‚€ Scales!
            ï‚€ The number of Partitions (data nodes) does not matter!
       ï‚€ Partitioning is important!




     Copyright Severalnines 2012
13




       Partitioning

       ï‚€ MySQL Cluster auto-partitions based on the Primary Key
            ï‚€ Data is spread randomly
       ï‚€ If possible better to Partition on a part of the Primary Key
            ï‚€ CREATE TABLE user_friends(
                userid,
                friendid ,
                somedata,
                PRIMARY KEY (userid, friendid)) PARTITION BY KEY(userid)
            ï‚€ All records with userid=X will be stored in the same partition!
       ï‚€ Ultra important for MySQL Cluster 7.2 and Fast JOINs.



     Copyright Severalnines 2012
14




       Partitioning

       ï‚€ EXPLAIN PARTITIONS <query>
            ï‚€ Tells you what partitions you touch.
       ï‚€ Also verify with:

       mysql> show global status like 'ndb_pruned_scan_count’;
          +-----------------------+-------+
          | Variable_name         | Value |
          +-----------------------+-------+
          | Ndb_pruned_scan_count | 1     |
          +-----------------------+-------+

            ï‚€ Increases when Partition Pruning could be used.




     Copyright Severalnines 2012
15




       Insert Performance

       ï‚€ Scaling Inserts
            ï‚€ Option 1) Batch INSERTS if you can
                    ●   An insert batch of 10 records will perform 10x faster than 10 single
                        inserts!
                    ●   INSERT INTO t1 VALUES (<record1>), (<record2>), 
,(<recordN>)
            ï‚€ Option 2) Many threads (parallelism)
            ï‚€ Or a combo of both
       ï‚€ Dumpfiles or LOAD DATA INFILEs
            ï‚€ Chunk them up and load in parallel on several mysqlds




     Copyright Severalnines 2012
16




       Insert Performance

       ï‚€ INSERTs in a table with AUTO_INCREMENT
       ï‚€ MySQL Server query Data nodes for an auto_increment
              –   The mysqld can hold a range of autoincs (cache)
              –   Before an INSERT, and autoinc must be fetched from either Data node
                  (slow) or on the cache (fast)
       ï‚€ ndb_autoincremet_prefetch_sz sets the cache size and it affects insert perf:
              –   ndb_autoincrement_prefetch_sz=1:            1211.91TPS
              –   ndb_autoincrement_prefetch_sz=256:          3471.71TPS
              –   ndb_autoincrement_prefetch_sz=1024:         3659.52TPS



     Copyright Severalnines 2012
17




       Insert Performance

       ï‚€ ndb_batch_size can also be important with LOAD DATA INFILE or
         dumps
            ï‚€ SET GLOBAL|SESSION NDB_BATCH_SIZE = 16M
            ï‚€ You may get LongMessageBuffer Overload
                     ●   Increase it in config.ini to 32M or 48M
       ï‚€ Also REDO logs may get overloaded if your disks are too slow and/or
         the REDO is too small.




     Copyright Severalnines 2012
18




       Query Performance

       ï‚€ Queries needs to be tuned as “usual”:
            ï‚€ Slow query / general log
            ï‚€ From a monitoring system (like ClusterControl)
            ï‚€ + a methodology




     Copyright Severalnines 2012
Query Performance
ï‚€ 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.

  Copyright Severalnines 2012
Data Types
ï‚€ BLOB/TEXT columns are stored in an external hidden table.
   ï‚€ First 255B 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 8052B record
   ï‚€ (record size is currently 8052 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.
  Copyright Severalnines 2012
Data Types
ï‚€ Example
CREATE TABLE `t1_blob` (

`id` int(11) NOT NULL AUTO_INCREMENT,

`data1` blob,

`data2` blob,

PRIMARY KEY (`id`)

)ENGINE=ndbcluster

ï‚€ Performance (8 threads, one mysqld, two data nodes):
  ï‚€ data1 and data2 as BLOBs: 5844TPS
  ï‚€ data1 and data2 as VARBINARY: 19206TPS
ï‚€ ~3x

   Copyright Severalnines 2012
Denormalize

  ï‚€ Tables sharing the same PRIMARY KEY can be denormalized.
       ï‚€ Table T1: <UID, SOME_DATA>
       ï‚€ Table T2: <UID, SOME_OTHER_DATA
       ï‚€ SELECT * from T1,T2 WHERE T1.UID=T2.UID and T2.UID=1 requires
         two roundtrips.
       ï‚€ Starting with MySQL Cluster 7.2 only one roundtrip is needed,.

  ï‚€ Denormalize
       ï‚€ Table T12: <UID,SOME_DATA, SOME_OTHER_DATA>

  ï‚€ Improvement: 2X in throughput


Copyright Severalnines 2012
Query Tuning < 7.2
ï‚€ Don't trust the OPTIMIZER in MySQL Cluster 7.1 and earlier
   ï‚€ Statistics gathering is non-existing
   ï‚€ Optimizer thinks there are only 10 rows to examine in each table!

ï‚€ You have to do a lot of
   ï‚€ FORCE INDEX / STRAIGH_JOIN to get queries run the way you
     want.




 Copyright Severalnines 2012
Query Tuning < 7.2
ï‚€ Classic example: 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




  Copyright Severalnines 2012
Query Tuning < 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!


   Copyright Severalnines 2012
26




       Query Tuning in 7.2

       ï‚€ ANALYZE TABLE
            ï‚€ Must be performed periodically to rebuild index stats
       ï‚€ EXPLAIN EXTENDED/PARTITIONS
            ï‚€ Make sure the explain show “Child of JOIN pushed down”
            ï‚€ This means that the Fast JOIN of NDB could be used
            ï‚€ SHOW WARNINGS;
                    ●   Shows why a Query was not pushed down.




     Copyright Severalnines 2012
Ndb_cluster_connection_pool
ï‚€ 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.
  ï‚€ >70 % improvement.

 Copyright Severalnines 2012
Ndb_cluster_connection_pool
ï‚€ Gives atleast 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




  Copyright Severalnines 2012
Disk Data Tuning
ï‚€ Disk Data Tables
   ï‚€ Un-indexed columns → tablespace on disk
   ï‚€ Indexed columns → DataMemory
ï‚€ DiskPageBufferMemory (DPBM) – LRU page cache
   ï‚€ Like innodb_buffer_pool
   ï‚€ Should be big as possible
ï‚€ If data not in DPBM                                      DiskPage
   ï‚€ Go to TS and fetch (Slow) IndexMemory DataMemory       Buffer
                                                           Memory
ï‚€ If data is DPBM
                                               REDO LOG
   ï‚€ Return page (faster)                                 UNDO LOG
                                                      Tablespace

  Copyright Severalnines 2012
Disk Data Tuning
ï‚€ DiskPageBufferMemory
     –   Hit ratio (derived from ndbinfo.diskpagebuffer):
     –   1000*page_requests_direct_return/
         (page_requests_direct_return +
          page_requests_wait_io+
          page_requests_wait_queue)
     –   998 is good (like in innodb).
     –   DiskPageBufferMemory=2048M is a good start
                                                                 DiskPage
                                   IndexMemory DataMemory         Buffer
                                                                 Memory

                                                   REDO LOG
                                                                UNDO LOG
                                                            Tablespace

 Copyright Severalnines 2012
Disk Data Tuning
ï‚€ UNDO LOG
     –   Always overseen but can be extended overtime
     –   Set it to 50% of the REDO log size :
           ●   0.5 x NoOfFragmentLogFiles x FragmentLogFileSize
ï‚€ Undo buffer (specd in CREATE LOGFILE GROUP)
     –   32M to 64M (like the RedoBuffer)
     –   SharedGlobalMemory=512M
                                                                  DiskPage
                                  IndexMemory DataMemory           Buffer
                                                                  Memory

                                                REDO LOG
                                                                  UNDO LOG
                                                          Tablespace

 Copyright Severalnines 2012
More on Cluster
ï‚€ Severalnines Forum
      –   http://support.severalnines.com/forums/20323398-mysql-cluster

ï‚€ Johan Andersson @ blogspot
      –   http://johanandersson.blogspot.com
ï‚€ Configuration and Deployment
      –   http://www.severalnines.com/cluster-configurator
      –   ~20 min to deploy a 4 node cluster (288 seconds is the
          World Record)
ï‚€ Self-training
      –   http://severalnines.com/mysql-cluster-training



  Copyright Severalnines 2012
33




       Q&A


     Copyright Severalnines 2012
34




       Thank you for your time!

            johan@severalnines.com
            Twitter: @severalnines


     Copyright Severalnines 2012

Weitere Àhnliche Inhalte

Was ist angesagt?

Optane DC Persistent Memory(DCPMM) 성늄 테슀튞
Optane DC Persistent Memory(DCPMM) 성늄 테슀튞Optane DC Persistent Memory(DCPMM) 성늄 테슀튞
Optane DC Persistent Memory(DCPMM) 성늄 테슀튞SANG WON PARK
 
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...DataWorks Summit/Hadoop Summit
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Paper: Oracle RAC Internals - The Cache Fusion Edition
Paper: Oracle RAC Internals - The Cache Fusion EditionPaper: Oracle RAC Internals - The Cache Fusion Edition
Paper: Oracle RAC Internals - The Cache Fusion EditionMarkus Michalewicz
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialColin Charles
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08Kenny Gryp
 
Best Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDBBest Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDBMariaDB plc
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSHSage Weil
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityColin Charles
 
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0sprdd
 
Advanced kapacitor
Advanced kapacitorAdvanced kapacitor
Advanced kapacitorInfluxData
 
IBM GPFS
IBM GPFSIBM GPFS
IBM GPFSKarthik V
 
Z4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSZ4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSTony Pearson
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineInfluxData
 
My SYSAUX tablespace is full, please
My SYSAUX tablespace is full, pleaseMy SYSAUX tablespace is full, please
My SYSAUX tablespace is full, pleaseMarkus Flechtner
 
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...Carlos Reaño Gonzålez
 
RedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ TwitterRedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ TwitterRedis Labs
 
HBase Accelerated: In-Memory Flush and Compaction
HBase Accelerated: In-Memory Flush and CompactionHBase Accelerated: In-Memory Flush and Compaction
HBase Accelerated: In-Memory Flush and CompactionDataWorks Summit/Hadoop Summit
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 

Was ist angesagt? (20)

Optane DC Persistent Memory(DCPMM) 성늄 테슀튞
Optane DC Persistent Memory(DCPMM) 성늄 테슀튞Optane DC Persistent Memory(DCPMM) 성늄 테슀튞
Optane DC Persistent Memory(DCPMM) 성늄 테슀튞
 
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
Apache HBase + Spark: Leveraging your Non-Relational Datastore in Batch and S...
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Paper: Oracle RAC Internals - The Cache Fusion Edition
Paper: Oracle RAC Internals - The Cache Fusion EditionPaper: Oracle RAC Internals - The Cache Fusion Edition
Paper: Oracle RAC Internals - The Cache Fusion Edition
 
Log Structured Merge Tree
Log Structured Merge TreeLog Structured Merge Tree
Log Structured Merge Tree
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08MySQL Database Architectures - 2022-08
MySQL Database Architectures - 2022-08
 
Best Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDBBest Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDB
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSH
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0
Glusterfs 파음시슀템 ê”Źì„±_및 욎영가읎드_v2.0
 
Advanced kapacitor
Advanced kapacitorAdvanced kapacitor
Advanced kapacitor
 
IBM GPFS
IBM GPFSIBM GPFS
IBM GPFS
 
Z4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSZ4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OS
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage Engine
 
My SYSAUX tablespace is full, please
My SYSAUX tablespace is full, pleaseMy SYSAUX tablespace is full, please
My SYSAUX tablespace is full, please
 
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...
Optimizing Hardware Resource Partitioning and Job Allocations on Modern GPUs ...
 
RedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ TwitterRedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ Twitter
 
HBase Accelerated: In-Memory Flush and Compaction
HBase Accelerated: In-Memory Flush and CompactionHBase Accelerated: In-Memory Flush and Compaction
HBase Accelerated: In-Memory Flush and Compaction
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 

Andere mochten auch

MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practicesMat Keep
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsAndrew Morgan
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster BasicsWagner Bianchi
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
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 VIISeveralnines
 
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterMySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterPar-Tec S.p.A.
 
MySQL user camp march 11th 2016
MySQL user camp march 11th 2016MySQL user camp march 11th 2016
MySQL user camp march 11th 2016Venkatesh Duggirala
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityShivji Kumar Jha
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationShivji Kumar Jha
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsAndrew Morgan
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityPythian
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDsShivji Kumar Jha
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterShivji Kumar Jha
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationShivji Kumar Jha
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - AdapterManoj Kumar
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationNuno Carvalho
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index TuningManikanda kumar
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSONMorgan Tocker
 

Andere mochten auch (20)

MySQL Cluster performance best practices
MySQL Cluster performance best practicesMySQL Cluster performance best practices
MySQL Cluster performance best practices
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar charts
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
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
 
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL ClusterMySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
MySQL Tech Tour 2015 - Progettare, installare e configurare MySQL Cluster
 
MySQL user camp march 11th 2016
MySQL user camp march 11th 2016MySQL user camp march 11th 2016
MySQL user camp march 11th 2016
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
 
FOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group ReplicationFOSSASIA 2015: MySQL Group Replication
FOSSASIA 2015: MySQL Group Replication
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
 
MySQL User Camp: GTIDs
MySQL User Camp: GTIDsMySQL User Camp: GTIDs
MySQL User Camp: GTIDs
 
MySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL ClusterMySQL User Camp: MySQL Cluster
MySQL User Camp: MySQL Cluster
 
Open source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source ReplicationOpen source India - MySQL Labs: Multi-Source Replication
Open source India - MySQL Labs: Multi-Source Replication
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - Adapter
 
MySQL High Availability with Group Replication
MySQL High Availability with Group ReplicationMySQL High Availability with Group Replication
MySQL High Availability with Group Replication
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
 

Ähnlich wie Conference slides: MySQL Cluster Performance Tuning

MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesSeveralnines
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsLaine Campbell
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptxIvan Ma
 
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 ConferenceSeveralnines
 
Vote NO for MySQL
Vote NO for MySQLVote NO for MySQL
Vote NO for MySQLUlf Wendel
 
NoSQL and MySQL
NoSQL and MySQLNoSQL and MySQL
NoSQL and MySQLTed Wennmark
 
Apache Ignite: In-Memory Hammer for Your Data Science Toolkit
Apache Ignite: In-Memory Hammer for Your Data Science ToolkitApache Ignite: In-Memory Hammer for Your Data Science Toolkit
Apache Ignite: In-Memory Hammer for Your Data Science ToolkitDenis Magda
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL Brasil
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL databaseSteve Knutson
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationdmcfarlane
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: RenormalizeAriel Weil
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: RenormalizeAriel Weil
 
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Frazer Clement
 
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...Severalnines
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Alluxio, Inc.
 
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios
 
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
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 

Ähnlich wie Conference slides: MySQL Cluster Performance Tuning (20)

MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and Patterns
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 
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
 
Vote NO for MySQL
Vote NO for MySQLVote NO for MySQL
Vote NO for MySQL
 
NoSQL and MySQL
NoSQL and MySQLNoSQL and MySQL
NoSQL and MySQL
 
Apache Ignite: In-Memory Hammer for Your Data Science Toolkit
Apache Ignite: In-Memory Hammer for Your Data Science ToolkitApache Ignite: In-Memory Hammer for Your Data Science Toolkit
Apache Ignite: In-Memory Hammer for Your Data Science Toolkit
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL database
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalization
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: Renormalize
 
Akiban Technologies: Renormalize
Akiban Technologies: RenormalizeAkiban Technologies: Renormalize
Akiban Technologies: Renormalize
 
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)
 
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
Slides: Introducing the new ClusterControl 1.2.10 for MySQL, MongoDB and Post...
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
 
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
 
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
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 

Mehr von 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 DBaaSSeveralnines
 
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 nextcloudSeveralnines
 
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 BasicsSeveralnines
 
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 & MongoDBSeveralnines
 
(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 MariaDBSeveralnines
 
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 ClusterControlSeveralnines
 
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 & MariaDBSeveralnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
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 ServerSeveralnines
 
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 KnifeSeveralnines
 
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 PostgreSQLSeveralnines
 
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 TuningSeveralnines
 
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 MariaDBSeveralnines
 
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
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilitySeveralnines
 

Mehr von Severalnines (20)

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?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 

KĂŒrzlich hochgeladen

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

KĂŒrzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Conference slides: MySQL Cluster Performance Tuning

  • 1. Performance Tuning of MySQL Cluster Santa Clara, April 2012 Johan Andersson Severalnines AB johan@severalnines.com Cell +46 73 073 60 99 Copyright Severalnines 2012
  • 2. 2 Agenda ï‚€ Scaling and Partitioning ï‚€ Designing a Scalable System ï‚€ Insert Performance Tuning ï‚€ Query Tuning ï‚€ Random tricks ï‚€ Disk Data Tuning Copyright Severalnines 2012
  • 3. 3 Here is ... Access Layer App App Server Server MYSQL MYSQL STORAGE LAYER DATA DATA NODE NODE P0 P1 Node group 0 Copyright Severalnines 2012
  • 4. 4 It can scale linearly ... Access Layer App App App App App App App App Server Server Server Server Server Server Server Server MYSQL MYSQL MYSQL MYSQL MYSQL NDBAPI NDBAPI NDBAPI STORAGE LAYER STORAGE LAYER STORAGE LAYER DATA DATA DATA DATA DATA DATA NODE NODE NODE NODE NODE NODE P0 P1 P2 P3 P4 P5 Node group 0 Node group 1 Node group 2 Copyright Severalnines 2012
  • 5. if you find the bottlenecks ï‚€ A lot of CPU is used on the data nodes ï‚€ Probably a lot of large index scans and full table scans are used. ï‚€ A lot of CPU is used on the 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 (should never happen) Copyright Severalnines 2012
  • 6. and if you know how ï‚€ Adding mysqlds – trivial – if the mysqld is the bottleneck ï‚€ BUT! Adding data nodes ï‚€ More data nodes does not automatically give better performance ● Latency may increase for a single query ● Total throughout will be improved ï‚€ How to get both? Copyright Severalnines 2012
  • 7. 7 Designing a Scalable System ï‚€ Define the most typical Use Cases ï‚€ List all my friends, session management etc etc. ï‚€ Optimize everything for the typical use case ï‚€ 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. Copyright Severalnines 2012
  • 8. 8 Simple Access ï‚€ PRIMARY KEY lookups are HASH lookup O(1) ï‚€ INDEX searches a T-tree and takes O(log n) time. ï‚€ In 7.2 JOINs are ok, but in 7.1 you should try to avoid them. Copyright Severalnines 2012
  • 9. 9 Data Access Access Layer App App App App App App App App Server Server Server Server Server Server Server Server MYSQL MYSQL MYSQL MYSQL MYSQL NDBAPI NDBAPI NDBAPI STORAGE LAYER DATA DATA DATA DATA DATA DATA NODE NODE NODE NODE NODE NODE P0 P1 P2 P3 P4 P5 Node group 0 Node group 1 Node group 2 Copyright Severalnines 2012
  • 10. 10 Data Access ï‚€ One Request can hit all Partitions ï‚€ Sub-optimal and won't scale Copyright Severalnines 2012
  • 11. 11 Data Access Access Layer App App App App App App App App Server Server Server Server Server Server Server Server MYSQL MYSQL MYSQL MYSQL MYSQL NDBAPI NDBAPI NDBAPI STORAGE LAYER DATA DATA DATA DATA DATA DATA NODE NODE NODE NODE NODE NODE P0 P1 P2 P3 P4 P5 Node group 0 Node group 1 Node group 2 Copyright Severalnines 2012
  • 12. 12 Data Access ï‚€ One Request hits one partition ï‚€ Scales! ï‚€ The number of Partitions (data nodes) does not matter! ï‚€ Partitioning is important! Copyright Severalnines 2012
  • 13. 13 Partitioning ï‚€ MySQL Cluster auto-partitions based on the Primary Key ï‚€ Data is spread randomly ï‚€ If possible better to Partition on a part of the Primary Key ï‚€ CREATE TABLE user_friends( userid, friendid , somedata, PRIMARY KEY (userid, friendid)) PARTITION BY KEY(userid) ï‚€ All records with userid=X will be stored in the same partition! ï‚€ Ultra important for MySQL Cluster 7.2 and Fast JOINs. Copyright Severalnines 2012
  • 14. 14 Partitioning ï‚€ EXPLAIN PARTITIONS <query> ï‚€ Tells you what partitions you touch. ï‚€ Also verify with: mysql> show global status like 'ndb_pruned_scan_count’; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | Ndb_pruned_scan_count | 1 | +-----------------------+-------+ ï‚€ Increases when Partition Pruning could be used. Copyright Severalnines 2012
  • 15. 15 Insert Performance ï‚€ Scaling Inserts ï‚€ Option 1) Batch INSERTS if you can ● An insert batch of 10 records will perform 10x faster than 10 single inserts! ● INSERT INTO t1 VALUES (<record1>), (<record2>), 
,(<recordN>) ï‚€ Option 2) Many threads (parallelism) ï‚€ Or a combo of both ï‚€ Dumpfiles or LOAD DATA INFILEs ï‚€ Chunk them up and load in parallel on several mysqlds Copyright Severalnines 2012
  • 16. 16 Insert Performance ï‚€ INSERTs in a table with AUTO_INCREMENT ï‚€ MySQL Server query Data nodes for an auto_increment – The mysqld can hold a range of autoincs (cache) – Before an INSERT, and autoinc must be fetched from either Data node (slow) or on the cache (fast) ï‚€ ndb_autoincremet_prefetch_sz sets the cache size and it affects insert perf: – ndb_autoincrement_prefetch_sz=1: 1211.91TPS – ndb_autoincrement_prefetch_sz=256: 3471.71TPS – ndb_autoincrement_prefetch_sz=1024: 3659.52TPS Copyright Severalnines 2012
  • 17. 17 Insert Performance ï‚€ ndb_batch_size can also be important with LOAD DATA INFILE or dumps ï‚€ SET GLOBAL|SESSION NDB_BATCH_SIZE = 16M ï‚€ You may get LongMessageBuffer Overload ● Increase it in config.ini to 32M or 48M ï‚€ Also REDO logs may get overloaded if your disks are too slow and/or the REDO is too small. Copyright Severalnines 2012
  • 18. 18 Query Performance ï‚€ Queries needs to be tuned as “usual”: ï‚€ Slow query / general log ï‚€ From a monitoring system (like ClusterControl) ï‚€ + a methodology Copyright Severalnines 2012
  • 19. Query Performance ï‚€ 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. Copyright Severalnines 2012
  • 20. Data Types ï‚€ BLOB/TEXT columns are stored in an external hidden table. ï‚€ First 255B 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 8052B record ï‚€ (record size is currently 8052 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. Copyright Severalnines 2012
  • 21. Data Types ï‚€ Example CREATE TABLE `t1_blob` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data1` blob, `data2` blob, PRIMARY KEY (`id`) )ENGINE=ndbcluster ï‚€ Performance (8 threads, one mysqld, two data nodes): ï‚€ data1 and data2 as BLOBs: 5844TPS ï‚€ data1 and data2 as VARBINARY: 19206TPS ï‚€ ~3x Copyright Severalnines 2012
  • 22. Denormalize ï‚€ Tables sharing the same PRIMARY KEY can be denormalized. ï‚€ Table T1: <UID, SOME_DATA> ï‚€ Table T2: <UID, SOME_OTHER_DATA ï‚€ SELECT * from T1,T2 WHERE T1.UID=T2.UID and T2.UID=1 requires two roundtrips. ï‚€ Starting with MySQL Cluster 7.2 only one roundtrip is needed,. ï‚€ Denormalize ï‚€ Table T12: <UID,SOME_DATA, SOME_OTHER_DATA> ï‚€ Improvement: 2X in throughput Copyright Severalnines 2012
  • 23. Query Tuning < 7.2 ï‚€ Don't trust the OPTIMIZER in MySQL Cluster 7.1 and earlier ï‚€ Statistics gathering is non-existing ï‚€ Optimizer thinks there are only 10 rows to examine in each table! ï‚€ You have to do a lot of ï‚€ FORCE INDEX / STRAIGH_JOIN to get queries run the way you want. Copyright Severalnines 2012
  • 24. Query Tuning < 7.2 ï‚€ Classic example: 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 Copyright Severalnines 2012
  • 25. Query Tuning < 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! Copyright Severalnines 2012
  • 26. 26 Query Tuning in 7.2 ï‚€ ANALYZE TABLE ï‚€ Must be performed periodically to rebuild index stats ï‚€ EXPLAIN EXTENDED/PARTITIONS ï‚€ Make sure the explain show “Child of JOIN pushed down” ï‚€ This means that the Fast JOIN of NDB could be used ï‚€ SHOW WARNINGS; ● Shows why a Query was not pushed down. Copyright Severalnines 2012
  • 27. Ndb_cluster_connection_pool ï‚€ 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. ï‚€ >70 % improvement. Copyright Severalnines 2012
  • 28. Ndb_cluster_connection_pool ï‚€ Gives atleast 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 Copyright Severalnines 2012
  • 29. Disk Data Tuning ï‚€ Disk Data Tables ï‚€ Un-indexed columns → tablespace on disk ï‚€ Indexed columns → DataMemory ï‚€ DiskPageBufferMemory (DPBM) – LRU page cache ï‚€ Like innodb_buffer_pool ï‚€ Should be big as possible ï‚€ If data not in DPBM DiskPage ï‚€ Go to TS and fetch (Slow) IndexMemory DataMemory Buffer Memory ï‚€ If data is DPBM REDO LOG ï‚€ Return page (faster) UNDO LOG Tablespace Copyright Severalnines 2012
  • 30. Disk Data Tuning ï‚€ DiskPageBufferMemory – Hit ratio (derived from ndbinfo.diskpagebuffer): – 1000*page_requests_direct_return/ (page_requests_direct_return + page_requests_wait_io+ page_requests_wait_queue) – 998 is good (like in innodb). – DiskPageBufferMemory=2048M is a good start DiskPage IndexMemory DataMemory Buffer Memory REDO LOG UNDO LOG Tablespace Copyright Severalnines 2012
  • 31. Disk Data Tuning ï‚€ UNDO LOG – Always overseen but can be extended overtime – Set it to 50% of the REDO log size : ● 0.5 x NoOfFragmentLogFiles x FragmentLogFileSize ï‚€ Undo buffer (specd in CREATE LOGFILE GROUP) – 32M to 64M (like the RedoBuffer) – SharedGlobalMemory=512M DiskPage IndexMemory DataMemory Buffer Memory REDO LOG UNDO LOG Tablespace Copyright Severalnines 2012
  • 32. More on Cluster ï‚€ Severalnines Forum – http://support.severalnines.com/forums/20323398-mysql-cluster ï‚€ Johan Andersson @ blogspot – http://johanandersson.blogspot.com ï‚€ Configuration and Deployment – http://www.severalnines.com/cluster-configurator – ~20 min to deploy a 4 node cluster (288 seconds is the World Record) ï‚€ Self-training – http://severalnines.com/mysql-cluster-training Copyright Severalnines 2012
  • 33. 33 Q&A Copyright Severalnines 2012
  • 34. 34 Thank you for your time! johan@severalnines.com Twitter: @severalnines Copyright Severalnines 2012