SlideShare a Scribd company logo
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, October 20, 2015 Oracle Confidential – Restricted
MySQL 5.7 InnoDB Update
1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Tuesday, October 20, 2015 Oracle Confidential – Restricted 2
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Intro
Key parameters
InnoDB 5.6 vs. 5.7
InnoDB ‘Always online’
GIS
MySQL Enterprise Backup
News From The Lab!
1
Tuesday, October 20, 2015 Oracle Confidential – Restricted
2
3
4
5
6
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Intro1
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL within Oracle
More Investment, More Innovation
Dez 2009 May 2015
5
... 20 Years MySQL
… 10 Years InnoDB of Oracle Stewardship
… 5 Years MySQL within Oracle
 2x Engineering Staff
 3x QA Staff
 2x Support Staff
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
InnoDB
•Default Storage Engine since MySQL 5.5 (previous as ‘Oracle’)
•ACID-compliant transactions, MVCC
•Row-level locking
•Two phase commit
•Efficient indexing
•Fast DDL operations
•Table compression
•Automatic crash recovery
•Referential integrity
•Online backup
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Key parameters2
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
innodb_file_per_table
• .ibd files
• MySQL 5.5:Off, MySQL 5.6:On, MySQL 5.7:On
• Easier to reclaim space
• TRUNCATE for a table is faster
• Can monitor table size on the file system
• Can store specific tables on different storage devices
• (5.6) Transportable tablespaces
• What are you using when you’ve updated from older version?
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
innodb_flush_log_at_trx_commit
• Performance vs. Durability
• Redo logs :
– innodb_flush_log_at_trx_commit = 1 // best durability (ACID Compliant), default
– innodb_flush_log_at_trx_commit = 2 // better performance (not ACID Compliant)
– innodb_flush_log_at_trx_commit = 0 // best performance (not ACID Compliant)
• Linux only :
– innodb_flush_method = O_DIRECT // skips the FS cache
9
http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
innoDB buffer pool
• Global
• Caches data and indexes
• innodb_buffer_pool_size
– 60 – 80% of the total RAM
– Not too large: OS should never swap !
– Active data <= innodb_buffer_pool_size <= 0.8 * RAM
• Use read only transactions
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
innodb_log_file_size
• Size of file on disk
• Larger the file, the less checkpoint activity
• Size for each log file
• Max combined log file size
– MySQL 5.5 <4G
– MySQL 5.6 & MySQL 5.7 = 512G (!!!)
– innodb_log_file_size = 256M / 512M / 1G (‘often’ 32M default)
• Larger the log file ➯ longer recovery time
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
innodb_log_buffer_size
• Buffer for writing to log files on disk
• Large transactions? Write heavy?
– Increasing can help with IO
• Default: 8M (16M)?
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Tip!
• Especially for HDD, read and write, use dedicated partitions
• Separate :
– datadir
– innodb_data_file_path
– innodb_undo_directory
– innodb_log_group_home_dir
– log-bin
– tmpdir
– backups
Random, SSD
Sequential, spinning
Random, SSD, tmpfs
(NFS, ButterFS, ZFS …)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
InnoDB 5.6 vs. 5.73
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Scaling with InnoDB, 5.6 (up to 48 CPUs*) vs. 5.7 (beyond 72 CPUs*)
* CPU Cores-HT
0
100,000
200,000
300,000
400,000
500,000
600,000
700,000
18 36 72
QueriesperSecond
CPU Cores – HT
MySQL 5.7: Sysbench – OLTP Read Write
MySQL 5.7
MySQL 5.6
MySQL 5.5
Intel(R) Xeon(R) CPU E7-8890 v3
4 sockets x 18 cores-HT (144 CPU threads)
2.5 Ghz, 512GB RAM
Linux kernel 3.16
MySQL 5.7 Sysbench Benchmark
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
 Key-value access to InnoDB
- Bypasses SQL Parsing
 SQL for rich queries, JOINs, FKs,
etc.
 Implemented via:
- Memcached plug-in to mysqld
- Memcached mapped to native
InnoDB API
- Use existing Memcached clients
- Shared process for ultra-low latency
MySQL 5.6 – InnoDB, NoSQL With Memcached
More Flexibility - Memcached API
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Improved: MySQL 5.7: InnoDB, NoSQL With Memcached
MySQL 5.7 is 6x faster than MySQL 5.6
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
8 16 32 64 128 256 512 1,024
QueriesperSecond
Connections
MySQL 5.7 vs 5.6 - InnoDB & Memcached
MySQL 5.7
MySQL 5.6
1 Million QPS
18
Intel(R) Xeon(R) CPU E7-4860 x86_64
4 sockets x 10 cores-HT (80 CPU threads)
2.3 GHz, 512 GB RAM
Oracle Linux 6.5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
InnoDB Full-Text Index support
• MySQL 5.6
– InnoDB Full-Text Index support
• Fully ACID compliant, MVCC search
• With performance improvements over MyISAM
• Easily customizable stop-word lists
• MySQL 5.7
– (Significant) better Performance
– Pluggable Full-Text Parser support
– CJK Support
• N-gram parser for Chinese, Japanese, and Korean
• MeCab parser for Japanese
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is it?
• Search entire documents
– Character based fields
• VARCHAR, TEXT, BLOB
• For a search string
– Combinations of words
– Phrases: “specific string to match”
– Wildcards: *
– Requirements: +, -, ~
– Expressions: (…)
– Relevancy weight characters: <, >
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Example
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
InnoDB ‘Always online’4
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB – Always Online
• Resize the InnoDB Buffer Pool online
– Allows DBAs to tune the buffer size without any downtime
– Adapt in real-time to changes in database usage patterns
• Separate UNDO tablespace
– With automatic online truncation
• Additional Online ALTER TABLE support
– Enlarge / instant change VARCHAR, Rename / instant Index
• Dynamic configuration
– Making existing settings dynamically configurable
– As a design principle for new features & settings
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB – Example
• Resize the InnoDB Buffer Pool online
– Allows DBAs to tune the buffer size without any downtime
– Increase or decrease online, Operation is
performed in chunks (default 128MB)
– Assign memory to MySQL/Apps during
runtime
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Native Partitioning
– Eliminates previous limitations
– Eliminates resource usage problems
– Transportable tablespace support
• Native Spatial Indexes
• Transparent page compression
• Support for 32K and 64K pages
– Use with transparent page compression for
very high compression ratios
• General TABLESPACE support
– Store multiple tables in user defined shared
tablespaces
• Improved support for cache preloading
– Load your hottest data loaded at startup
• Configurable fill-factor
– Allows for improvements in storage footprint
• Improved bulk-data load performance
MySQL 5.7: InnoDB Improvements
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB Improvements
• Enhanced FusionIO integration
– Doublewrite buffer disabled when NVMFS/DirectFS detected
• Parallel “dirty page” flushing
– Higher throughput, performance, and scalability
• Partitions support for Transportable Tablespaces (TTS)
– TTS support for individual partitions
• Improved crash recovery to ensure data safety
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
InnoDB File format
– Antelope MySQL 5.1, 5.5, 5.6
vs. Barracuda MySQL 5.7
• RAW performance
• Lower memory and disk space footprint
• Great in combination with SSD
– SHOW TABLE STATUS
• Antelope  Compact or Redundant
• Barracuda  Compressed or Dynamic
27
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB Compression
• Transparent Page Level Compression
– Happens transparently in background threads
– Managed entirely within the IO layer
– Uses sparse file and "hole punching" support in OS kernels and File Systems
• Reduces IO
– Improves MySQL performance
– Improves storage efficiency
– Reduces write cycles, thus increasing SSD lifespan
• Applies to all InnoDB data, including the system tablespace and UNDO logs
28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB Temp Tables
• New separate tablespace for temporary tables
– Improved CREATE/DROP performance
– DDL changes are transient, which eliminates some disk IO
• Optimize DML operations
– No REDO logging, no change buffering, less locking
• New intrinsic temporary tables
– Specialized temporary tables with tailored ACID/MVCC semantics
– Light weight and ultra-fast, great for intermediate query execution operations
• InnoDB as additional storage engine for temp tables
– Switch optimizer from MyISAM to InnoDB (faster) for internal temp tables
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
GIS5
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 : GIS Reborn
• Dev scrapped much of the old algorithms and related code …
– Replacing it with the FOSS Boost.Geometry library (1.58)
• …and rounded out our OGC spatial function support
– Standardized the namespace
• Added native GEOMETRY data type support to InnoDB
– We then added SPATIAL INDEX support to InnoDB (using R-tree)
• Added Geohash and GeoJSON support
• Added helper functions: ST_Distance_Sphere(), ST_MakeEnvelope(), ST_IsValid(),
ST_Validate(), ST_Simplify, …
31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Spatial Indexes for InnoDB
• R-tree based
– Full transactional support
– Predicate locking to prevent phantoms
– Records contain minimum bounding box
• Small and compact
– Currently only supports 2D data
• We would like to add 3D support in the future
– Supports historical spatial index DDL syntax
32
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Additional Features
• GeoHash
– B-tree indexes on the generated hash values
– Quick lookups for exact matches
– Not very accurate for proximity searches
• GeoJSON
• Additional functions
– ST_IsValid(), ST_Simplify(), ST_Buffer() …
– ST_Distance_Sphere()
• Limited SRID support
– Laying the groundwork for CRS support
33
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]
},
"properties": {
"name": "Dinagat Islands"
}
}
GeoJSON Example
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Replaced custom code
– For spatial calculations
– For spatial analysis
• Provides OGC compliance
– With improved performance
• Boost.Geometry contains
– Field and domain experts
– Bustling and robust communit
MySQL 5.7: GIS - Integrating Boost.Geometry
34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup6
Tuesday, October 20, 2015 Oracle Confidential – Restricted
MySQL Enterprise Backup now writes tape information
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup 4.0
• Online, non-locking backup and recovery
– Complete MySQL instance backup (data and config)
– Partial backup and restore
• Direct Cloud storage backups via Swift API
• Incremental backups & Point-in-time recovery
• Advanced compressed and encryption
• InnoDB tables with page sizes of 32 and 64K can be backed up and restored.
• Optimistic backups
• Support for MySQL 5.7
– General Tablespaces
New & Improved
36
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
•MySQL Enterprise Backup images to tape (like RMN)
•Via SBT interface (standard for MMS)
•Encryption, policy-based management, vault rotation
•Common management, SOP for Oracle, MySQL backups
•Improved SBT Backups to MMS Systems
•Includes Backup/tape information
Oracle Integrations: Secure Backup
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
News From The Lab!7
Tuesday, October 20, 2015 Oracle Confidential – Restricted
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication Plugin
Tuesday, October 20, 2015
M M M M M
Replication Group
• Multi-master update everywhere
• Automatic group membership
management and failure detection.
• No need for server fail-over.
• Automatic reconfiguration.
• No single point of failure.
• Shared-nothing state machine
replication.
• InnoDB compliant. Off-the-shelf
hardware friendly.
Oracle Confidential – Restricted 39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL Group Replication Plugin
• Great technology for deployments where elasticity is a requirement, such
as cloud based infrastructures.
– Integrated with the server core through a well defined API.
– It is integrated with GTIDs, row based replication.
– It is integrated with performance schema tables.
– It is elastic and self-healing: adding or removing servers does not need human
intervention.
Tuesday, October 20, 2015 Oracle Confidential – Restricted 40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Strong development cycles and continuous community engagement
through regular and frequent releases on labs.mysql.com.
MySQL Group Replication
Tuesday, October 20, 2015 Oracle Confidential – Restricted 41
2014-Sep-29
Labs release: 0.2.0
2015-Apr-06
Labs release: 0.3.0
2014-Aug-06
Labs release: 0.4.0
2015-Sep-14
Labs release: 0.5.0
Introduces standalone plugin,
with its own release cycle!
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Dependable and Scalable MySQL
Tuesday, October 20, 2015 Oracle Confidential – Restricted 42
Global Data Shard 1 Shard 2
MySQL Fabric
Controller
SQL Queries
Server/Shard State &
Mapping
Global Group HA Group
Coordination
and Control
HA Group
Group Replication
cluster
Group Replication
cluster
Group Replication
cluster
MySQL
Router
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Dependable and Scalable MySQL Setups
Tuesday, October 20, 2015 Oracle Confidential – Restricted
M
App
M M
MySQL Fabric (Orchestration)
MApp M M
Simple Shard
Mapping, State and
Extra metadata.
Control, Coordinate, Provision
...
Monitoring (MEM)
MySQL Router Group Replication – Shard 1
Group Replication – Shard N
C, PHP, Perl, ...
43
MySQL Router
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 44
MySQL Tech Tour 2015 - 5.7 InnoDB

More Related Content

PPTX
MySQL Tech Tour 2015 - 5.7 Whats new
PDF
MySQL 5.7: Focus on InnoDB
PDF
MySQL 5.7 Replication News
PDF
MySQL configuration - The most important Variables
PDF
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
PDF
MySQL 5.7: What's New, Nov. 2015
PDF
My sql5.7 whatsnew_presentedatgids2015
ODP
MySQL Enterprise Portfolio
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL 5.7: Focus on InnoDB
MySQL 5.7 Replication News
MySQL configuration - The most important Variables
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
MySQL 5.7: What's New, Nov. 2015
My sql5.7 whatsnew_presentedatgids2015
MySQL Enterprise Portfolio

What's hot (20)

PDF
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
PDF
MySQL Security
PDF
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
PPTX
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
PDF
An introduction into Oracle VM V3.x
PDF
Mysql User Camp : 20th June - Mysql New Features
PDF
MySQL 5.6, news in 5.7 and our HA options
PDF
MySQL Manchester TT - Performance Tuning
PDF
MySQL 5.7 in a Nutshell
PDF
Upcoming changes in MySQL 5.7
PDF
MySQL 5.7 - What's new, How to upgrade and Document Store
PDF
MySQL for Software-as-a-Service (SaaS)
PDF
NoSQL and MySQL: News about JSON
ODP
MySQL 5.7 - What's new and How to upgrade
PDF
MySQL Security
PDF
What's new in my sql smug
ODP
MySQL Cluster
PDF
TWJUG August, What's new in MySQL 5.7 RC
PDF
TWJUG August, MySQL JDBC Driver "Connector/J"
PDF
MySQL Performance Metrics that Matter
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
MySQL Security
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
An introduction into Oracle VM V3.x
Mysql User Camp : 20th June - Mysql New Features
MySQL 5.6, news in 5.7 and our HA options
MySQL Manchester TT - Performance Tuning
MySQL 5.7 in a Nutshell
Upcoming changes in MySQL 5.7
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL for Software-as-a-Service (SaaS)
NoSQL and MySQL: News about JSON
MySQL 5.7 - What's new and How to upgrade
MySQL Security
What's new in my sql smug
MySQL Cluster
TWJUG August, What's new in MySQL 5.7 RC
TWJUG August, MySQL JDBC Driver "Connector/J"
MySQL Performance Metrics that Matter
Ad

Viewers also liked (20)

PPTX
Precesores independencia
PDF
BDTC2015-新加坡管理大学-朱飞达
PPTX
El Fantasma De La óPera
PDF
greencore northampton
PPTX
Kotler framework 5e_13_sppt
PDF
Social Media Expo
PDF
chamblee-welcome-packet-2016-FIX-072516-sm
PDF
Bentley Smith - Written Reference - Shell Autocare Pty Ltd
PDF
Marketing-Methods,Marketing Automation & Marketing‘s Accountability
PDF
Verdi traviata
PPTX
Postura correcta
PDF
Lista de precios guatemala
PPT
Lezione 1 Qualità Non Alimentari
PDF
Las empresas de la industria de la moda sostenibilidad y rse en sus reportes ...
DOC
2 environmental issues in dyeing
PPTX
INTRODUCTION TO IKM LUMUT
PDF
Dior - Marcas e patentes
PDF
Pse02 - zipato siren user manual v1.2 English
PDF
Sensative Door Window Sensor Strip Z-Wave Plus User Manual
PDF
Zipato zipatile-data-sheet-1.2z
Precesores independencia
BDTC2015-新加坡管理大学-朱飞达
El Fantasma De La óPera
greencore northampton
Kotler framework 5e_13_sppt
Social Media Expo
chamblee-welcome-packet-2016-FIX-072516-sm
Bentley Smith - Written Reference - Shell Autocare Pty Ltd
Marketing-Methods,Marketing Automation & Marketing‘s Accountability
Verdi traviata
Postura correcta
Lista de precios guatemala
Lezione 1 Qualità Non Alimentari
Las empresas de la industria de la moda sostenibilidad y rse en sus reportes ...
2 environmental issues in dyeing
INTRODUCTION TO IKM LUMUT
Dior - Marcas e patentes
Pse02 - zipato siren user manual v1.2 English
Sensative Door Window Sensor Strip Z-Wave Plus User Manual
Zipato zipatile-data-sheet-1.2z
Ad

Similar to MySQL Tech Tour 2015 - 5.7 InnoDB (20)

PDF
What's New in MySQL 5.7
PDF
MySQL 5.7 what's new
PDF
MySQL 5.6 - Operations and Diagnostics Improvements
PDF
MySQL Manchester TT - 5.7 Whats new
PPT
State of the Dolphin, at db tech showcase Osaka 2014
PDF
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
PPT
My sql vivo_5.5_product_update_pt
PDF
MySQL :What's New #GIDS16
PDF
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
PDF
제3회난공불락 오픈소스 인프라세미나 - MySQL
PDF
My sql indo_comm
PDF
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
PDF
My sql 5.6&MySQL Cluster 7.3
PDF
MySQL 5.7 -- SCaLE Feb 2014
PDF
What's new in MySQL 5.5?
PPT
MySQL Performance Tuning at COSCUP 2014
PDF
My sql 56_roadmap_april2012
PDF
MySQL 5.5&5.6 new features summary
PDF
Using MySQL in Automated Testing
PPTX
MySQL Tech Tour 2015 - Intro
What's New in MySQL 5.7
MySQL 5.7 what's new
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL Manchester TT - 5.7 Whats new
State of the Dolphin, at db tech showcase Osaka 2014
Netherlands Tech Tour - 07 MySQL Whats upcoming in 5.7
My sql vivo_5.5_product_update_pt
MySQL :What's New #GIDS16
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
제3회난공불락 오픈소스 인프라세미나 - MySQL
My sql indo_comm
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
My sql 5.6&MySQL Cluster 7.3
MySQL 5.7 -- SCaLE Feb 2014
What's new in MySQL 5.5?
MySQL Performance Tuning at COSCUP 2014
My sql 56_roadmap_april2012
MySQL 5.5&5.6 new features summary
Using MySQL in Automated Testing
MySQL Tech Tour 2015 - Intro

More from Mark Swarbrick (20)

PDF
MySQL NoSQL Document Store
PPSX
MySQL @ the University Of Nottingham
PDF
InnoDb Vs NDB Cluster
PDF
MySQL Security & GDPR
PDF
Intro To MySQL 2019
PDF
PDF
MySQL Dublin Event Nov 2018 - MySQL 8
PDF
MySQL Dublin Event Nov 2018 - State of the Dolphin
PDF
Oracle Code Event - MySQL JSON Document Store
PDF
TLV - MySQL Security overview
PDF
TLV - MySQL Enterprise Edition + Cloud
PDF
TLV - Whats new in MySQL 8
PDF
MySQL At University Of Nottingham - 2018 MySQL Days
PDF
MySQL At Mastercard - 2018 MySQL Days
PDF
MySQL 8 - 2018 MySQL Days
PDF
MySQL Security + GDPR - 2018 MySQL Days
PDF
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
PDF
MySQL Cloud - 2018 MySQL Days
PDF
MySQL 2018 Intro - 2018 MySQL Days
PDF
MySQL + GDPR
MySQL NoSQL Document Store
MySQL @ the University Of Nottingham
InnoDb Vs NDB Cluster
MySQL Security & GDPR
Intro To MySQL 2019
MySQL Dublin Event Nov 2018 - MySQL 8
MySQL Dublin Event Nov 2018 - State of the Dolphin
Oracle Code Event - MySQL JSON Document Store
TLV - MySQL Security overview
TLV - MySQL Enterprise Edition + Cloud
TLV - Whats new in MySQL 8
MySQL At University Of Nottingham - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL Days
MySQL 8 - 2018 MySQL Days
MySQL Security + GDPR - 2018 MySQL Days
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
MySQL Cloud - 2018 MySQL Days
MySQL 2018 Intro - 2018 MySQL Days
MySQL + GDPR

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
cuic standard and advanced reporting.pdf
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
cuic standard and advanced reporting.pdf
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation_ Review paper, used for researhc scholars
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

MySQL Tech Tour 2015 - 5.7 InnoDB

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |Tuesday, October 20, 2015 Oracle Confidential – Restricted MySQL 5.7 InnoDB Update 1
  • 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Tuesday, October 20, 2015 Oracle Confidential – Restricted 2
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Intro Key parameters InnoDB 5.6 vs. 5.7 InnoDB ‘Always online’ GIS MySQL Enterprise Backup News From The Lab! 1 Tuesday, October 20, 2015 Oracle Confidential – Restricted 2 3 4 5 6 7
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Intro1 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL within Oracle More Investment, More Innovation Dez 2009 May 2015 5 ... 20 Years MySQL … 10 Years InnoDB of Oracle Stewardship … 5 Years MySQL within Oracle  2x Engineering Staff  3x QA Staff  2x Support Staff
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | InnoDB •Default Storage Engine since MySQL 5.5 (previous as ‘Oracle’) •ACID-compliant transactions, MVCC •Row-level locking •Two phase commit •Efficient indexing •Fast DDL operations •Table compression •Automatic crash recovery •Referential integrity •Online backup 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Key parameters2 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | innodb_file_per_table • .ibd files • MySQL 5.5:Off, MySQL 5.6:On, MySQL 5.7:On • Easier to reclaim space • TRUNCATE for a table is faster • Can monitor table size on the file system • Can store specific tables on different storage devices • (5.6) Transportable tablespaces • What are you using when you’ve updated from older version? 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | innodb_flush_log_at_trx_commit • Performance vs. Durability • Redo logs : – innodb_flush_log_at_trx_commit = 1 // best durability (ACID Compliant), default – innodb_flush_log_at_trx_commit = 2 // better performance (not ACID Compliant) – innodb_flush_log_at_trx_commit = 0 // best performance (not ACID Compliant) • Linux only : – innodb_flush_method = O_DIRECT // skips the FS cache 9 http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | innoDB buffer pool • Global • Caches data and indexes • innodb_buffer_pool_size – 60 – 80% of the total RAM – Not too large: OS should never swap ! – Active data <= innodb_buffer_pool_size <= 0.8 * RAM • Use read only transactions 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | innodb_log_file_size • Size of file on disk • Larger the file, the less checkpoint activity • Size for each log file • Max combined log file size – MySQL 5.5 <4G – MySQL 5.6 & MySQL 5.7 = 512G (!!!) – innodb_log_file_size = 256M / 512M / 1G (‘often’ 32M default) • Larger the log file ➯ longer recovery time 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | innodb_log_buffer_size • Buffer for writing to log files on disk • Large transactions? Write heavy? – Increasing can help with IO • Default: 8M (16M)? 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Tip! • Especially for HDD, read and write, use dedicated partitions • Separate : – datadir – innodb_data_file_path – innodb_undo_directory – innodb_log_group_home_dir – log-bin – tmpdir – backups Random, SSD Sequential, spinning Random, SSD, tmpfs (NFS, ButterFS, ZFS …)
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | InnoDB 5.6 vs. 5.73 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Scaling with InnoDB, 5.6 (up to 48 CPUs*) vs. 5.7 (beyond 72 CPUs*) * CPU Cores-HT 0 100,000 200,000 300,000 400,000 500,000 600,000 700,000 18 36 72 QueriesperSecond CPU Cores – HT MySQL 5.7: Sysbench – OLTP Read Write MySQL 5.7 MySQL 5.6 MySQL 5.5 Intel(R) Xeon(R) CPU E7-8890 v3 4 sockets x 18 cores-HT (144 CPU threads) 2.5 Ghz, 512GB RAM Linux kernel 3.16 MySQL 5.7 Sysbench Benchmark
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |  Key-value access to InnoDB - Bypasses SQL Parsing  SQL for rich queries, JOINs, FKs, etc.  Implemented via: - Memcached plug-in to mysqld - Memcached mapped to native InnoDB API - Use existing Memcached clients - Shared process for ultra-low latency MySQL 5.6 – InnoDB, NoSQL With Memcached More Flexibility - Memcached API
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Improved: MySQL 5.7: InnoDB, NoSQL With Memcached MySQL 5.7 is 6x faster than MySQL 5.6 0 200,000 400,000 600,000 800,000 1,000,000 1,200,000 8 16 32 64 128 256 512 1,024 QueriesperSecond Connections MySQL 5.7 vs 5.6 - InnoDB & Memcached MySQL 5.7 MySQL 5.6 1 Million QPS 18 Intel(R) Xeon(R) CPU E7-4860 x86_64 4 sockets x 10 cores-HT (80 CPU threads) 2.3 GHz, 512 GB RAM Oracle Linux 6.5
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | InnoDB Full-Text Index support • MySQL 5.6 – InnoDB Full-Text Index support • Fully ACID compliant, MVCC search • With performance improvements over MyISAM • Easily customizable stop-word lists • MySQL 5.7 – (Significant) better Performance – Pluggable Full-Text Parser support – CJK Support • N-gram parser for Chinese, Japanese, and Korean • MeCab parser for Japanese 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is it? • Search entire documents – Character based fields • VARCHAR, TEXT, BLOB • For a search string – Combinations of words – Phrases: “specific string to match” – Wildcards: * – Requirements: +, -, ~ – Expressions: (…) – Relevancy weight characters: <, > 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Example 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | InnoDB ‘Always online’4 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB – Always Online • Resize the InnoDB Buffer Pool online – Allows DBAs to tune the buffer size without any downtime – Adapt in real-time to changes in database usage patterns • Separate UNDO tablespace – With automatic online truncation • Additional Online ALTER TABLE support – Enlarge / instant change VARCHAR, Rename / instant Index • Dynamic configuration – Making existing settings dynamically configurable – As a design principle for new features & settings 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB – Example • Resize the InnoDB Buffer Pool online – Allows DBAs to tune the buffer size without any downtime – Increase or decrease online, Operation is performed in chunks (default 128MB) – Assign memory to MySQL/Apps during runtime 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Native Partitioning – Eliminates previous limitations – Eliminates resource usage problems – Transportable tablespace support • Native Spatial Indexes • Transparent page compression • Support for 32K and 64K pages – Use with transparent page compression for very high compression ratios • General TABLESPACE support – Store multiple tables in user defined shared tablespaces • Improved support for cache preloading – Load your hottest data loaded at startup • Configurable fill-factor – Allows for improvements in storage footprint • Improved bulk-data load performance MySQL 5.7: InnoDB Improvements 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB Improvements • Enhanced FusionIO integration – Doublewrite buffer disabled when NVMFS/DirectFS detected • Parallel “dirty page” flushing – Higher throughput, performance, and scalability • Partitions support for Transportable Tablespaces (TTS) – TTS support for individual partitions • Improved crash recovery to ensure data safety 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | InnoDB File format – Antelope MySQL 5.1, 5.5, 5.6 vs. Barracuda MySQL 5.7 • RAW performance • Lower memory and disk space footprint • Great in combination with SSD – SHOW TABLE STATUS • Antelope  Compact or Redundant • Barracuda  Compressed or Dynamic 27
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB Compression • Transparent Page Level Compression – Happens transparently in background threads – Managed entirely within the IO layer – Uses sparse file and "hole punching" support in OS kernels and File Systems • Reduces IO – Improves MySQL performance – Improves storage efficiency – Reduces write cycles, thus increasing SSD lifespan • Applies to all InnoDB data, including the system tablespace and UNDO logs 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB Temp Tables • New separate tablespace for temporary tables – Improved CREATE/DROP performance – DDL changes are transient, which eliminates some disk IO • Optimize DML operations – No REDO logging, no change buffering, less locking • New intrinsic temporary tables – Specialized temporary tables with tailored ACID/MVCC semantics – Light weight and ultra-fast, great for intermediate query execution operations • InnoDB as additional storage engine for temp tables – Switch optimizer from MyISAM to InnoDB (faster) for internal temp tables 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | GIS5 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 : GIS Reborn • Dev scrapped much of the old algorithms and related code … – Replacing it with the FOSS Boost.Geometry library (1.58) • …and rounded out our OGC spatial function support – Standardized the namespace • Added native GEOMETRY data type support to InnoDB – We then added SPATIAL INDEX support to InnoDB (using R-tree) • Added Geohash and GeoJSON support • Added helper functions: ST_Distance_Sphere(), ST_MakeEnvelope(), ST_IsValid(), ST_Validate(), ST_Simplify, … 31
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Spatial Indexes for InnoDB • R-tree based – Full transactional support – Predicate locking to prevent phantoms – Records contain minimum bounding box • Small and compact – Currently only supports 2D data • We would like to add 3D support in the future – Supports historical spatial index DDL syntax 32
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Additional Features • GeoHash – B-tree indexes on the generated hash values – Quick lookups for exact matches – Not very accurate for proximity searches • GeoJSON • Additional functions – ST_IsValid(), ST_Simplify(), ST_Buffer() … – ST_Distance_Sphere() • Limited SRID support – Laying the groundwork for CRS support 33 { "type": "Feature", "geometry": { "type": "Point", "coordinates": [125.6, 10.1] }, "properties": { "name": "Dinagat Islands" } } GeoJSON Example
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Replaced custom code – For spatial calculations – For spatial analysis • Provides OGC compliance – With improved performance • Boost.Geometry contains – Field and domain experts – Bustling and robust communit MySQL 5.7: GIS - Integrating Boost.Geometry 34
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Backup6 Tuesday, October 20, 2015 Oracle Confidential – Restricted MySQL Enterprise Backup now writes tape information
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Backup 4.0 • Online, non-locking backup and recovery – Complete MySQL instance backup (data and config) – Partial backup and restore • Direct Cloud storage backups via Swift API • Incremental backups & Point-in-time recovery • Advanced compressed and encryption • InnoDB tables with page sizes of 32 and 64K can be backed up and restored. • Optimistic backups • Support for MySQL 5.7 – General Tablespaces New & Improved 36
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | •MySQL Enterprise Backup images to tape (like RMN) •Via SBT interface (standard for MMS) •Encryption, policy-based management, vault rotation •Common management, SOP for Oracle, MySQL backups •Improved SBT Backups to MMS Systems •Includes Backup/tape information Oracle Integrations: Secure Backup
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | News From The Lab!7 Tuesday, October 20, 2015 Oracle Confidential – Restricted
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Plugin Tuesday, October 20, 2015 M M M M M Replication Group • Multi-master update everywhere • Automatic group membership management and failure detection. • No need for server fail-over. • Automatic reconfiguration. • No single point of failure. • Shared-nothing state machine replication. • InnoDB compliant. Off-the-shelf hardware friendly. Oracle Confidential – Restricted 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Group Replication Plugin • Great technology for deployments where elasticity is a requirement, such as cloud based infrastructures. – Integrated with the server core through a well defined API. – It is integrated with GTIDs, row based replication. – It is integrated with performance schema tables. – It is elastic and self-healing: adding or removing servers does not need human intervention. Tuesday, October 20, 2015 Oracle Confidential – Restricted 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Strong development cycles and continuous community engagement through regular and frequent releases on labs.mysql.com. MySQL Group Replication Tuesday, October 20, 2015 Oracle Confidential – Restricted 41 2014-Sep-29 Labs release: 0.2.0 2015-Apr-06 Labs release: 0.3.0 2014-Aug-06 Labs release: 0.4.0 2015-Sep-14 Labs release: 0.5.0 Introduces standalone plugin, with its own release cycle!
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Dependable and Scalable MySQL Tuesday, October 20, 2015 Oracle Confidential – Restricted 42 Global Data Shard 1 Shard 2 MySQL Fabric Controller SQL Queries Server/Shard State & Mapping Global Group HA Group Coordination and Control HA Group Group Replication cluster Group Replication cluster Group Replication cluster MySQL Router
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Dependable and Scalable MySQL Setups Tuesday, October 20, 2015 Oracle Confidential – Restricted M App M M MySQL Fabric (Orchestration) MApp M M Simple Shard Mapping, State and Extra metadata. Control, Coordinate, Provision ... Monitoring (MEM) MySQL Router Group Replication – Shard 1 Group Replication – Shard N C, PHP, Perl, ... 43 MySQL Router
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 44