Contenu connexe
Similaire à MySQL5.6&5.7 Cluster 7.3 Review
Similaire à MySQL5.6&5.7 Cluster 7.3 Review (20)
MySQL5.6&5.7 Cluster 7.3 Review
- 1. The State of The Dolphin
杜修文 Ivan.Tu@Oracle.Com
Principle Sales Consultant, MySQL Global SC
Oracle LLC
1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 2. MySQL 對 Oracle 很重要
完整的方案
毎個層面都是最佳血統
佈署於自己的中心及雲端
MySQL: 網上 , 行動 , 及嵌入應用
2
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 4. 免責聲明
以下資訊用於說明我們產品一般性的方向 . 其目的只
限於提供參考 , 不可成為任何合約的內容或附件 . 也不
會當成提供任何材料,代碼,或功能的承諾 , 且不可
當成 採購決策的依據 . Oracle 保有於其中提到的任何
Oracle 產品的開發,發行和推出時間決定權利 .
4
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 6. MySQL Dabase
Performance, Reliability, Ease of Use
支援許多開發環境和
語言
Efficient multi- 高效
能的多線程連線處理
全 DML, DDL 解
析,成本為基礎的
優化器,查詢和其
結果集的快取
依表彈性指定儲存引
擎,應應用系統的特
性選擇儲存引擎
彈性的日誌和實體存儲的選擇
6
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 8. MySQL Database
複製帶來的擴展性
Writes & Reads
Application
Load Balancer
Reads
Reads
MySQL Replication
• 寫到一個 master
• 用多個 slaves 支持讀 , 很容易依需要加上更多
• 非常適用於有大量讀寫的應 用
8
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 10. MySQL 企業版
• MySQL 視覺化開發 , 監看 , 備份工具 , 和 Oracle Lifetime
支持服務
Oracle Lifetime
Dev, Monitoring/
Backup Tools
Support
MySQL Enterprise
Backup
MySQL Enterprise
Monitor
Oracle Lifetime Support
Performance
Monitoring/ Alerts
Services
Service packs
Query Analyzer
MySQL Workbench
10
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Hot fixes
- 11. MySQL 企業備份
• 對 InnoDB 做線上備份
• 全備份,增量備份,部分備份 ( 可編入 script 的介面 )
• 壓縮備出的資料
• 可選擇指時,完全,部份回復
• 狀態,進程,歷史的超資料
• 無資料庫容量的限制
• 跨平台
• Windows, Linux, Unix
• 和 Oracle Secure Backup 相容
確保您的 MySQL 應用的快速,線上備份,和回復 .
11
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 12. MySQL 企業監控
• 提供 MySQL 環境全面的資訊
• 自動的,以規則為基礎的監看和
警示 ( 可用 SMTP, SNMP)
• 查詢擷取,監看,分析和調優 ,
和監看的圖聯篩選查詢指令
• 視覺化監看 『 熱』應用系統和
服務
• 以自動發覺主從架搆即時監看複
製
• 和 MySQL 的支持服務整合
12
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
A Virtual MySQL Tuning Assistant!
- 13. MySQL 查詢分析器
• 不用 Slow Query Log, SHOW
PROCESSLIST 集中化監看查詢 ;
• 透過 MySQL Connectors 收集查詢
• 整合的畫面查詢執行次數,時間,
和筆數
• 視覺化”抓且行“和監視圖關聯列示
指定時間內的 SQL 指令
• 追蹤到發出 SQL 指令的源碼
自日誌執行解析自動化節省時間 。
找出無法自行找出的問題。
13
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 14. 查詢下鑽
Example query exec with
variable substitution
Trace query exec back to
source code
Full exec EXPLAIN
14
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 15. MySQL Enterprise Security
MySQL External Authentication
• PAM ( 插件式認證模組 )
• 使用外部的登入證認機制
• 標準的介面 (Unix, LDAP, Kerberos... 等 )
• 代理型和非代理型用戶
• Windows
• 取用原生的 Windows 服務
•
認證己經登入到 Windows 的用戶 (Windows
Active Directory)
• 插件式認證 API
MySQL 能和現有的安控和標準作業程序結合 .
15
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 16. Windows 認證
例子
Connect as
1. MyDomain/joe 以
Windows 的帳號,密碼
登入環境
Connect as
App
Connector
Connector
3. MyDomain/joe 登入應用
系統,應用系統以使用者
win_joe 登入 MySQL.
2. MyDomainjoe 對
Windows 作業系統認證
Connect as
Connected
Windows Auth
Windows Auth
4. 檢查 Tokens, win_joe 使用者
用 Windows 的帳號,密碼認證
,同時帶出 MySQL 的權限
Authenticate
CREATE USER win_joe
IDENTIFIED WITH authentication_windows
AS ‘joe';
16
Connect as
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Win OS users,
Win OS users,
groups, etc
groups, etc
- 17. MySQL 企業版擴充力
MySQL 線程池
• MySQL 預設的線程處理–效能很好 , 但當同時連線使
用者數量增加時可能會對擴充力造成限制
• MySQL 線程池在使用者增加時改善效能 / 擴充力
• 線程池 API
當使用者增加時保障系統能持續提供更好的效能
17
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 18. 有 Thread Pool 時的線程處理
外部的用戶
Thread Pool
線程組 1
Threads 1 - 4096
線程組 2
Threads 4097 - 8193
連線執行線程
線程組 1
線程組 2
線程組 N
線程組 N
Threads 8194 - N
內部的用戶
• 線程池內含能設定線程數的線程組 ( 預設為 16), 各管理可重復使用的線程數
達 4096
• 各連線以輪流的方式被指派到線程組
• 線程可定優先順序,指令在有限併行執行緒非序,載入到伺服器,當在連線
數增加時改進擴充力
18
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 19. MySQL 企業版
MySQL Enterprise Edition
With Thread Pool
MySQL Community Server
Without Thread Pool
有 Thread Pool 擴充力最多能增加 20 倍
19
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.5.16
Oracle Linux 6.1, Unbreakable Kernel 2.6.32
2 sockets, 24 cores, 2 X 12-core
Intel(R) Xeon(R) X5670 2.93GHz CPUs
72GB DDR3 RAM
2 X LSI SCSI Disk (MR9261-8i) (597GB)
- 21. MySQL 5.6: 發行過的最佳版本 !
21
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 22. MySQL 5.6: 擴充性
用戶可完全發揮最新的硬件和操作系統統的能量
當資料量和用戶數增加時有更好的表現
22
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 23. MySQL 5.6 SysBench 基準測試
MySQL 5.6
MySQL 5.5
Up to 234% Performance Gain
23
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 24. MySQL 5.6: 快速採納
高品質 , 新功能和效能改善
發表的功能為 MySQL 社群所高度期待
高品質 , 和提供許多個新能力
很大的效能改善
– Innodb, 優化器 , 併行 / 線程 , 鎖定 , 輸出入 , 連線 , …
支持開發者的功能– 查詢 , 分區 , NoSQL, Explain Plans, …
更容易 / 低成本管理
– 高可用 / 複製 – 管理和維護更簡單
– 改良的監看和偵測器 (Performance Schema)
24
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 25. MySQL Database 5.7 DMRs
有啥新鮮的 ?
25
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 26. DMRs: Development Milestone Releases
全整功,能發行候選版的品質
毎年二到四個
讓社群能早點測試,使用及回饋
加速改良速率
改善品質
26
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 27. Now: MySQL 5.7.2 DMR
MySQL 5.7.2 以 MySQL 5.6 為基礎,再改良 :
InnoDB 有更好的交易吞吐量,可用度
Replication 更好的擴充性和可用度
Utilities 以支持開發 / 操作自動化
Performance Schema 更好的效能衡量能力
Optimizer 更好的 EXPLAINing 查詢效能
現在由下列網址就可取得 !
dev.mysql.com/downloads/mysql/
27
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
New!
- 28. MySQL 5.7.2 Sysbench 基準測試的結果
Sysbench Point Select
500,000 QPS
Intel(R) Xeon(R) CPU X7560 x86_64
4 sockets x 8 cores-HT (64 CPU threads)
2.27GHz, 256G RAM
Oracle Linux 6.2
比 MySQL 5.6 快 95%
比 MySQL 5.5 快 172%
28
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 29. MySQL 5.7.2: 毎秒連線數
更快處理新的連線
+32%
+64%
因應 Facebook 所提的需求而建
將線程初始化和網路初始化的負荷轉給工作線程
29
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
• mysql-bench
• 25 concurrent client threads
• Executing connect/select/disconnect
• 100000 iterations each
- 30. MySQL 5.7.2: 優化器
對執行中的查詢做 EXPLAIN
問題 – 在連線作業中的命令會用長時間來完成時
新的功能 – 執行
– 自另一個連線作業下 EXPLAIN FOR CONNECTION
EXPLAIN [FORMAT=(JSON|TRADITIONAL)] [EXTENDED] FOR CONNECTION <id>;
– 找出造成延遲的根本原因
– 優化命令
30
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 31. MySQL 5.7.2: 優化器
擴充 JSON EXPLAIN 輸出
31
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 32. MySQL 5.7.2 Performance Schema
記憶體的使用
查看記憶體的使用
– 加入超過 200 個記憶體類型
以下列方式匯整統計記憶體的使用
– 使用的有存的類型 ( 緩存 , 內部緩沖
區 , …)
– 線程 / 帳戶 / 使用者 / 主機間接作用方
記憶體的作業。
屬性包括
– 記憶體的使用 (byte), 操作次數 ,
High/Low 高 / 低水位。
存儲程式的偵測器
擴增命令偵測器
– 包括存儲程式 , 加到 5.6 的 COM 命令和 SQL
查詢。
新的偵測工具
– 命令 /sp/cclose, cfetch, copen
– 命令 / 排程 / 事件
新的物件類型
– EVENT, FUNCTION, PROCEDURE,
TRIGGER
新的匯總表
– events_statements_summary_by_program
32
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 33. MySQL 5.7.2: InnoDB
更好的效能,可用度
改進 InnoDB 線上更改表結搆
– 線上改索引名
– 線上改 Varchar
改良 InnoDB 的臨時表
– 新的臨時表專屬的表空間
– 改良的 CREATE/DROP 臨時表的效能
DDL 的變更是短暫的 . 消除所有的 IO
優化 InnoDB 臨時表的 DML 作業
– 不用 REDO logging, 不用 Change buffering, 沒有 locking
33
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 35. 多源複製
labs.mysql.com
自多個主庫收集資訊到一個從庫
– 為所有分版提供一個視圖
– 集中備份
和半同步複製及強化的多線程從
庫相容
將會依毎個來源控制及篩選 ( 在
labs 中有全域性的篩選 )
Application keeps data sets
disjoint between sources 應用在
各來源間保持分開的資料集
Slave
35
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 36. MySQL Utilities
強大的 MySQL 開發 / 作業管理工具
新的 , 獨立包裝 : MySQL Utilities 1.3
將常見的開發 / 作業工作自動化
– 複製 : 配置 , 測試 , 監看和固障移轉 ( 現在是背景程式 )
– 資料庫比較 : 一致性檢核
– 資料庫管理 : 使用者 , 連線 , 表 , 等
– 審計
Python 腳本
– 可單獨運行或自 MySQL Workbench 啟動
– 可自 dev.mysql.com 下載
– 能收納客戶化的腳本 ; Python library for extensibility
36
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 37. MySQL Utilities - Fabric
支持分版以達橫向擴充的能力
s
ping
map
SQL
MySQL Fabric
labs.mysql.com
透過分庫做橫向擴充
Connectors
– Python
– Java
– PHP
應用提供分片的鍵
– Range 或 Hash
– 有重分庫的工具
– 全域更新和表
包括在 MySQL Utilities 1.4.0 中
Read-slaves
Read-slaves
Master group
Master group
37
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 39. 支持外鍵
連線線程增加擴充性
MySQL 5.6
39
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Auto-Installer
Node.js 上用 NoSQL 的
JavaScript
- 40. MySQL Cluster 7.3 GA: 外鍵
使 MySQL Cluster 能有更廣的運用範圍
– Packaged apps, 客戶化項目
加上強大的功能的同時降低復雜度
– 應用邏輯和資料模型
默認為開啟
強化 SQL API
線上增加或移除
40
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
& NoSQL APIs
- 41. MySQL Cluster 7.3: Node.js NoSQL API
Clients
V8 JavaScript Engine
MySQL Cluster Node.js Module
MySQL Cluster Data Nodes
41
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
自帶的使用 MySQL Cluster 的 JavaScript
access
– 端到端 JavaScript: 瀏灠器到應用和資料庫
– 儲存和擷取在 MySQL Cluster 中的 JavaScript 物
件
– 不需 SQL 的轉換
實施成 node.js 的模組
– 集成在網路應用中的 Cluster 程序館
聯結高效能,分散式應用,和高效能分散式資
料庫
同時也可傳到 MySQL 資料庫
- 42. MySQL Cluster 7.3: 連線線程的擴充性
增加各連線到資料層的吞吐量
可以用分開互斥元使用各連線而使客戶線程
更多
降低配置的復雜度
增加集群的擴充性
MySQL Cluster Data Nodes
各連線使用 256 的節點識別分中的一個
With Connection
Thread Scalability
MySQL Cluster Data Nodes
42
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
每個連線可提升效能達 7.5 倍
SQL 和 NoSQL 介面
- 43. MySQL Cluster 7.3: Auto-Installer
配置更快
Specify
Workload
自動發掘
優化工作負荷
可重復的最佳實務
可用於 MySQL Cluster 7.2 和 7.3
Deploy
43
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Auto-Di
scover
Define
Topology
- 45. 新的 ! MySQL Workbench 6.0
設計 , 開發 , 管理 , 遷移
Windows, Linux, Mac OS X
45
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 資料庫 IDE
數以百萬次下載
GA
- 46. MySQL Workbench 6.0
新的設計和加強
新的 ! 資料庫檢視器
新的 ! 備份 / 回復
新的 ! 審核日誌檢查器
新的 ! 資料遷移 : Microsoft SQL Server, Sybase, PostgreSQL
46
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
- 47. 結論
引領 MySQL 社群的創新
Oracle 在過去的 12 個月內完成的提供 :
– GA: MySQL 5.6, MySQL Cluster 7.3, MySQL Workbench 6.0, MySQL
Enterprise Monitor 3.0, MySQL Utilities, MySQL Connectors...and more
– DMRs: MySQL 5.7
– Labs: 多源複製 , Fabric, Hadoop Applier for MySQL
歡迎試用且給我們回饋 !
47
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.