Meetup my sql5.6_cluster
Upcoming SlideShare
Loading in...5
×
 

Meetup my sql5.6_cluster

on

  • 655 views

Presentation for the RMOUG MySQL Group

Presentation for the RMOUG MySQL Group

Statistics

Views

Total Views
655
Views on SlideShare
655
Embed Views
0

Actions

Likes
1
Downloads
23
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Meetup my sql5.6_cluster Meetup my sql5.6_cluster Presentation Transcript

  • MySQL 5.6 and Cluster Lee Stigile – Technical Sales Consulting Manager -- Americas 1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Agenda Goal: Benefits of Upgrading to MySQL 5.6 Understand MySQL Cluster  MySQL 5.6 – Top 5 New Features  Improved Features: Compression and Partitioning  MySQL Cluster 2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Oracle Invests Innovations for the MySQL Community Oracle Delivers. Past 12 Months: GA: MySQL 5.6, MySQL Cluster 7.3, MySQL Workbench 6.0, MySQL Utilities, MySQL Connectors...and more DMRs: MySQL 5.7 Labs: Multi-source Replication, Fabric 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL Enterprise Edition Highest Levels of Security, Performance, and Availability Oracle Premier Lifetime Support MySQL Enterprise Thread Pool MySQL Enterprise Authentication MySQL Enterprise Audit 4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. MySQL Enterprise Monitor/Query Analyzer MySQL Enterprise Backup MySQL Workbench
  • Features  Performance  Online Schema (DDL) Changes  Replication  Pre-load Buffer Pool  Performance Schema  Full Text Search (InnoDB)  Partitioning  NoSQL and SQL Access 5  Optimizer Improvements  Compression Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • #1 Performance 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL 5.6: Scalability  Users can fully utilize latest generations of hardware and OS  Scales as data volumes and users grow 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL Scalability January 2010 Oracle Buys Sun InnoDB joins MySQL Oracle Buys Innobase/InnoDB 2005 2008 4 CPU MySQL 5.0 8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 2009 4 CPU MySQL 5.1 16 CPU InnoDB Plugin Sun Micro 2010 2010 December 32 CPU MySQL 5.5 2012 Up to 48 CPU MySQL 5.6
  • Performance Improvements  InnoDB and MySQL Refactored InnoDB Split kernel mutex Separate thread for flushing operations Multi-threaded purge Reduced buffer pool contention New adaptive hashing algorithm MySQL Memory Allocation Switch from malloc to better memory allocators for multi-threaded concurrency Lock_open contention (bottleneck when opening tables) 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • ScienceLogic Moved from 5.1 to 5.5, 5.6  Network Monitoring Software  Averages 8,000 queries every second or about 1 billion queries a day  Can reach 175,000 tables and up to 20 million rows in a single table.  2 terabytes on average  “tremendous performance gains”  “moving log-flushing from a main process to a background process” 10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • #2 Online Operations 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
  • Online DDL for InnoDB Tables ADD INDEX DROP INDEX DROP COLUMN ADD COLUMN RENAME COLUMN 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • #3 Optimizer 13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • DBT-3 Benchmarks Open-source Benchmark DBT1,2,4,5 OLTP, Web Services, Web Server DBT-3 Decision Support Systems Large Data Volume Complex Queries QUERY #16 SELECT p_brand, p_type, p_size, count(distinct ps_suppkey) as supplier_cnt FROM partsupp, part WHERE p_partkey = ps_partkey AND p_brand <> 'Brand#23' AND p_typce not like 'LARGE PLATED%' AND p_size in (43, cc1, 25, 5, 35, 12, 42, 40) AND ps_suppkey not in ( SELECT s_suppkey FROM supplier WHERE s_comment like '%Customer%Complaints%') GROUP BY p_brand, p_type, p_size ORDER BY supplier_cnt desc, p_brand, p_type, p_size; 14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Materialized Subqueries Query #17 ~40 days to execute Now – 6.8 seconds Executes Once Hash Index Query #16 0.65 -> 0.47 QUERY #17 SELECT c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) FROM customer, orders, lineitem WHERE o_orderkey in ( SELECT l_orderkey FROM lineitem GROUP BY l_orderkey HAVING sum(l_quantity) > 313) AND c_custkey = o_custkey AND o_orderkey = l_orderkey GROUP BY c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice ORDER BY o_totalprice desc, o_orderdate LIMIT 100; 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Optimizer Summary Complex Optimize Many Tables in Join 25+ Postpone Materialization of Views/Subqueries in FROM Indexes for Derived Tables Standard Optimize “IN” clause Optimized SELECT col1, … FROM t1 .. ORDER BY name LIMIT 10 Better Optimizer Diagnostics EXPLAIN for INSERT, UPDATE and DELETE EXPLAIN output in JSON 16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • #4 Performance Schema 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL 5.6 – Performance Schema • Resource-intensive queries • Tables/indexes with most load • Users consuming the most resources • Network load • Aggregated statistics by • thread • user • host • object 18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Show which Queries executed the most # of times 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Top Files by Total I/O (ps_helper) 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Statements with Temporary Tables 21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL Query Analyzer 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • #5 Replication 23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL 5.6: Crash-Safe Slaves Atomic Before: – Transaction Data: in tables – Replication Info: Data CRASH! Position Info Time in files MySQL 5.6 – – 24 Transaction Data: in tables Replication Info: in tables Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Atomic Data Position Info Time
  • Multi-Threaded Slaves Multi-Threaded Slave Performance  Reduce Slave Latency  Per Schema  Threads per Schema  Multi-tenancy 300 Queries per Second  5x Performance Gain 250 200 150 100 50 0 QPS 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 0 58.11 5 144.4 Worker Threads 10 282.53
  • Honorable Mentions 26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Partitioning table partitioned table index SELECT * FROM table WHERE custID=100 0-99 100-199 200-299 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. index
  • Compression current: Antelope new: Barracuda compression off-page storage of variable length data [mysqld] innodb_file_format=Barracuda innodb_file_per_table=1 row_format=compressed key_block_size=8 # or 4, 2, 1K 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Features  Performance  Online Schema (DDL) Changes  Replication  Pre-load Buffer Pool  Performance Schema  Full Text Search (InnoDB)  Partitioning  NoSQL and SQL Access 29  Optimizer Improvements  Compression Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL Cluster 30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
  • MySQL Cluster – Basic Architecture • • • • Active/Active 99.999% Availability No Single Point of Failure 1 billion/minute Data Node2 Data Node 1 F1 F2 F2 F1 Data Nodes 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • MySQL Cluster -- Extended Node Group 2 Node 3 F1 F3 F3 F1 Data Nodes 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. F2 Node 4 Node 2 Cluster Mgmt Node 1 Node Group 1 F4 F4 F2 Cluster Mgmt
  • Data Node Distribution F1-Primary F1-Secondary F2-Secondary F2-Primary Node Group 1 • Four Data Nodes • Two Replicas • Two Node Groups 33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. F3-Primary F3-Secondary F4-Secondary F4-Primary Node Group 2
  • Transparent • Application • Transparency • Sharding 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Access Application 1. 2. 3. 4. 5. Direct API Key-Value NoSQL SQL Schema-less HTTP memcached JDBC / ODBC / PHP / PERL / Python / Ruby … Data Node 1 Data Node2 F1 F2 F2 F1 Data Nodes 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • Flight Control 1. Flight Operations Management System 2. No Single Point of Failure 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • ecommerce 1. 2. 3. 4. 5. 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Payment Processing Fulfillment 18,000 Retailers High Availability Scaling
  • QUESTIONS? What’s New in MySQL 5.6 38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12