Weitere ähnliche Inhalte
Ähnlich wie Meetup my sql5.6_cluster (20)
Kürzlich hochgeladen (20)
Meetup my sql5.6_cluster
- 1. MySQL 5.6 and Cluster
Lee Stigile – Technical Sales Consulting
Manager -- Americas
1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 2. 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.
- 3. 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.
- 4. 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
- 5. 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.
- 7. 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.
- 8. 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
- 9. 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.
- 10. 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.
- 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.
- 14. 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.
- 15. 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.
- 16. 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.
- 18. 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.
- 19. Show which Queries executed the most # of times
19
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 20. Top Files by Total I/O (ps_helper)
20
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 24. 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
- 25. 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
- 29. 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.
- 30. MySQL Cluster
30
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Insert Information Protection Policy Classification from Slide 12
- 31. 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.
- 32. 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
- 36. Flight Control
1. Flight Operations
Management System
2. No Single Point of
Failure
36
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 38. 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