SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
MySQL and InnoDB
Performance
Baron Schwartz | OSDC 2010
MySQL Architecture
MySQL Server
Storage Engines
Parser, Optimizer
Executor, Caches
InnoDB Storage Engine
• Transactional, ACID compliant
• Reliable, Stable
• Complex, Flexible
• A History of Poor Scalability
Thinking About Performance
Response Time
Is Everything
Response Time
R = W + S
Utilization
ResponseTime
S
W
Response Time
R = W + S
Utilization
ResponseTime
S
W
MySQL & InnoDB In Context
MySQL & InnoDB In Context
Operating Environment
MySQL Server
InnoDB
Operating Environment
RAM
CPU
I/O
Network
Operating Environment
RAM
CPU
I/O
Network
• Fast
• Up to 24 Cores
• Up to 100's of GB
• RAID + BBU
• Fast SAS Disks
• SSD / FusionIO
• XFS Filesystem
• Deadline Scheduler
• High Bandwidth
• Low Latency
MySQL Performance
Nested-Loop Joins and Subqueries
MySQL Performance
Cache Scalability
InnoDB's Single “Main Thread”
• Too Much Work! Purging, Flushing
• Main Thread Cannot Keep Up
Special-Purpose Threads
• Main Thread
• Purge Thread
• Multiple Read/Write IO Threads
InnoDB Mutex Contention
Buffer Pool
Splitting the Buffer Pool Mutex
Buffer Pool Flush List LRU Hash Free
Current InnoDB Bottlenecks
• Adaptive Hash Search Mutex
• Index Lock Mutex
• After These Are Solved, ???
How To Improve Performance
Measure Carefully
Proper diagnosis is 95% of the work
Use Good Tools
• New Relic
• MySQL Enterprise Monitor
• Cacti
– http://code.google.com/p/mysql-cacti-templates/
• Maatkit
• GDB, strace, oprofile
Instrumentation is Key
• The best performance data is INSIDE MySQL
Percona Server with XtraDB
MySQL Server
Storage Engines
Parser, Optimizer
Executor, Caches
Tunability
Instrumentation
Diagnostics
Current Benchmarks
InnoDB -vs- XtraDB
http://tinyurl.com/xtradb-fusionio-jan-2010
XtraDB is much better than InnoDB in MySQL 5.1.
MySQL 5.5 -vs- Percona Server
http://tinyurl.com/xtradb-mysql5-5-ap2010
High performance is no use without stability.
Other Technologies
• Cloud Computing
– 2 of the 4 critical resources are uncontrollable
• “NoSQL” Databases
– It's too soon to be sure
Summary
• The operating environment is important
• MySQL & InnoDB are getting much faster
• The cloud is not a performance solution
• You are the key to better performance
Where Do You Go Next?
• Become a performance practitioner
– Read High Performance MySQL 2nd
Edition
– Read Optimizing Oracle Performance
– Read The Art Of Capacity Planning
– Read http://www.percona.com/about-us/white-papers/
• Contribute!
– Sponsor features you need or want
– Help improve tools

Contenu connexe

Tendances

RedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
RedisDay London 2018 - How Redis Powers BBC Online's Biggest PagesRedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
RedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
Redis Labs
 
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
Redis Labs
 
RedisDay London 2018 - How We Run Redis in Multiple Datacenters
RedisDay London 2018 - How We Run Redis in Multiple Datacenters RedisDay London 2018 - How We Run Redis in Multiple Datacenters
RedisDay London 2018 - How We Run Redis in Multiple Datacenters
Redis Labs
 

Tendances (19)

Intro to MySQL Part I
Intro to MySQL Part IIntro to MySQL Part I
Intro to MySQL Part I
 
RedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
RedisDay London 2018 - How Redis Powers BBC Online's Biggest PagesRedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
RedisDay London 2018 - How Redis Powers BBC Online's Biggest Pages
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
RedisDay London 2018 - Redis & BioCatch Catching the Bad Guys in Action with ...
 
My First 90 days with Vitess
My First 90 days with VitessMy First 90 days with Vitess
My First 90 days with Vitess
 
Performance stack
Performance stackPerformance stack
Performance stack
 
Proxysql use case scenarios hl++ 2017
Proxysql use case scenarios    hl++ 2017 Proxysql use case scenarios    hl++ 2017
Proxysql use case scenarios hl++ 2017
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
 
MongoDB at community engine
MongoDB at community engineMongoDB at community engine
MongoDB at community engine
 
mParticle's Journey to Scylla from Cassandra
mParticle's Journey to Scylla from CassandramParticle's Journey to Scylla from Cassandra
mParticle's Journey to Scylla from Cassandra
 
RedisDay London 2018 - How We Run Redis in Multiple Datacenters
RedisDay London 2018 - How We Run Redis in Multiple Datacenters RedisDay London 2018 - How We Run Redis in Multiple Datacenters
RedisDay London 2018 - How We Run Redis in Multiple Datacenters
 
Migrating to Cassandra
Migrating to CassandraMigrating to Cassandra
Migrating to Cassandra
 
Getting started in the cloud for developers
Getting started in the cloud for developersGetting started in the cloud for developers
Getting started in the cloud for developers
 
Scylla Summit 2022: Stream Processing with ScyllaDB
Scylla Summit 2022: Stream Processing with ScyllaDBScylla Summit 2022: Stream Processing with ScyllaDB
Scylla Summit 2022: Stream Processing with ScyllaDB
 
“Kick-off with Scale in Mind” by Yousef Wadi
“Kick-off with Scale in Mind” by Yousef Wadi“Kick-off with Scale in Mind” by Yousef Wadi
“Kick-off with Scale in Mind” by Yousef Wadi
 
Scylla Summit 2019 Keynote - Avi Kivity
Scylla Summit 2019 Keynote - Avi KivityScylla Summit 2019 Keynote - Avi Kivity
Scylla Summit 2019 Keynote - Avi Kivity
 
Introduction to AWS Outposts
Introduction to AWS OutpostsIntroduction to AWS Outposts
Introduction to AWS Outposts
 
Scylla Cloud on Display: Functionality, Performance and Demos
Scylla Cloud on Display: Functionality, Performance and DemosScylla Cloud on Display: Functionality, Performance and Demos
Scylla Cloud on Display: Functionality, Performance and Demos
 
Scylla Summit 2018: Scylla Feature Talks - Gains by Using Scylla-Specific Dri...
Scylla Summit 2018: Scylla Feature Talks - Gains by Using Scylla-Specific Dri...Scylla Summit 2018: Scylla Feature Talks - Gains by Using Scylla-Specific Dri...
Scylla Summit 2018: Scylla Feature Talks - Gains by Using Scylla-Specific Dri...
 

Similaire à MySQL 和 InnoDB 性能

My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmap
slidethanks
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive Writes
Liran Zelkha
 
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Continuent
 
My sql 5.5_product_update
My sql 5.5_product_updateMy sql 5.5_product_update
My sql 5.5_product_update
henriquesidney
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
hannonhill
 
MySQL HA Sharding-Fabric
MySQL HA Sharding-FabricMySQL HA Sharding-Fabric
MySQL HA Sharding-Fabric
Abdul Manaf
 

Similaire à MySQL 和 InnoDB 性能 (20)

My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmap
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmap
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive Writes
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
 
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksDeep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
 
Laying OpenStack Cinder Block Services
Laying OpenStack Cinder Block ServicesLaying OpenStack Cinder Block Services
Laying OpenStack Cinder Block Services
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
MySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich MasonMySQL State of the Dolphin - Rich Mason
MySQL State of the Dolphin - Rich Mason
 
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
 
Citrix Synergy 2014: Going the CloudPlatform Way
Citrix Synergy 2014: Going the CloudPlatform WayCitrix Synergy 2014: Going the CloudPlatform Way
Citrix Synergy 2014: Going the CloudPlatform Way
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
 
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB ClusterWebinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
Webinar Slides: MySQL HA/DR/Geo-Scale - High Noon #5: Oracle’s InnoDB Cluster
 
MySQL overview
MySQL overviewMySQL overview
MySQL overview
 
My sql 5.5_product_update
My sql 5.5_product_updateMy sql 5.5_product_update
My sql 5.5_product_update
 
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
 
Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
 
MySQL HA Sharding-Fabric
MySQL HA Sharding-FabricMySQL HA Sharding-Fabric
MySQL HA Sharding-Fabric
 

Plus de YUCHENG HU

Confluence 回顾(retrospectives) 蓝图 cwikiossez
Confluence 回顾(retrospectives) 蓝图   cwikiossezConfluence 回顾(retrospectives) 蓝图   cwikiossez
Confluence 回顾(retrospectives) 蓝图 cwikiossez
YUCHENG HU
 

Plus de YUCHENG HU (20)

Confluencewiki 使用空间
Confluencewiki 使用空间Confluencewiki 使用空间
Confluencewiki 使用空间
 
Git
GitGit
Git
 
Presta shop 1.6 如何安装简体中文语言文件
Presta shop 1.6 如何安装简体中文语言文件Presta shop 1.6 如何安装简体中文语言文件
Presta shop 1.6 如何安装简体中文语言文件
 
Logback 介绍
Logback 介绍Logback 介绍
Logback 介绍
 
Presta shop 1.6 详细安装指南
Presta shop 1.6 详细安装指南Presta shop 1.6 详细安装指南
Presta shop 1.6 详细安装指南
 
Presta shop 1.6 的安装环境
Presta shop 1.6 的安装环境Presta shop 1.6 的安装环境
Presta shop 1.6 的安装环境
 
Presta shop 1.6 如何安装简体中文语言文件
Presta shop 1.6 如何安装简体中文语言文件Presta shop 1.6 如何安装简体中文语言文件
Presta shop 1.6 如何安装简体中文语言文件
 
Presta shop 1.6 图文安装教程
Presta shop 1.6 图文安装教程Presta shop 1.6 图文安装教程
Presta shop 1.6 图文安装教程
 
V tiger 5.4.0 图文安装教程
V tiger 5.4.0 图文安装教程V tiger 5.4.0 图文安装教程
V tiger 5.4.0 图文安装教程
 
Confluence 回顾(retrospectives) 蓝图 cwikiossez
Confluence 回顾(retrospectives) 蓝图   cwikiossezConfluence 回顾(retrospectives) 蓝图   cwikiossez
Confluence 回顾(retrospectives) 蓝图 cwikiossez
 
Confluence 会议记录(meeting notes)蓝图 cwikiossez
Confluence 会议记录(meeting notes)蓝图   cwikiossezConfluence 会议记录(meeting notes)蓝图   cwikiossez
Confluence 会议记录(meeting notes)蓝图 cwikiossez
 
VTIGER - 销售机会 - CWIKIOSSEZ
VTIGER - 销售机会 - CWIKIOSSEZ VTIGER - 销售机会 - CWIKIOSSEZ
VTIGER - 销售机会 - CWIKIOSSEZ
 
Confluence 使用一个模板新建一个页面 cwikiossez
Confluence 使用一个模板新建一个页面     cwikiossezConfluence 使用一个模板新建一个页面     cwikiossez
Confluence 使用一个模板新建一个页面 cwikiossez
 
Confluence 使用模板
Confluence 使用模板Confluence 使用模板
Confluence 使用模板
 
Cwikiossez confluence 订阅页面更新邮件通知
Cwikiossez confluence 订阅页面更新邮件通知Cwikiossez confluence 订阅页面更新邮件通知
Cwikiossez confluence 订阅页面更新邮件通知
 
Cwikiossez confluence 关注页面 博客页面和空间
Cwikiossez confluence 关注页面 博客页面和空间Cwikiossez confluence 关注页面 博客页面和空间
Cwikiossez confluence 关注页面 博客页面和空间
 
My sql università di enna a.a. 2005-06
My sql   università di enna a.a. 2005-06My sql   università di enna a.a. 2005-06
My sql università di enna a.a. 2005-06
 
My sql would you like transactions
My sql would you like transactionsMy sql would you like transactions
My sql would you like transactions
 
MySQL 指南
MySQL 指南MySQL 指南
MySQL 指南
 
MySQL 简要介绍
MySQL 简要介绍MySQL 简要介绍
MySQL 简要介绍
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+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...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

MySQL 和 InnoDB 性能