Performance improvements in MySQL 5.5

Similar documents
Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011

What's new in MySQL 5.5? Performance/Scale Unleashed

InnoDB: Status, Architecture, and Latest Enhancements

MySQL 5.6: Advantages in a Nutshell. Peter Zaitsev, CEO, Percona Percona Technical Webinars March 6, 2013

Innodb Architecture and Performance Optimization

PolarDB. Cloud Native Alibaba. Lixun Peng Inaam Rana Alibaba Cloud Team

Innodb Architecture and Performance Optimization. Peter Zaitsev, CEO Percona 25 September 2017

Innodb Performance Optimization

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona

InnoDB Scalability Limits. Peter Zaitsev, Vadim Tkachenko Percona Inc MySQL Users Conference 2008 April 14-17, 2008

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona Percona Technical Webinars 9 May 2018

Innodb Architecture and Internals. Peter Zaitsev Percona Live, Washington DC 11 January 2012

MySQL Database Scalability

XtraDB 5.7: Key Performance Algorithms. Laurynas Biveinis Alexey Stroganov Percona

InnoDB: What s new in 8.0

How to Fulfill the Potential of InnoDB's Performance and Scalability

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Tips & Tricks on Tuning MySQL Performance

Best Practices for MySQL Scalability. Peter Zaitsev, CEO, Percona Percona Technical Webinars May 1, 2013

Scale out Read Only Workload by sharing data files of InnoDB. Zhai weixiang Alibaba Cloud

Choosing Hardware and Operating Systems for MySQL. Apr 15, 2009 O'Reilly MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

Replication features of 2011

Percona Live September 21-23, 2015 Mövenpick Hotel Amsterdam

Switching to Innodb from MyISAM. Matt Yonkovit Percona

What's New in MySQL 5.7?

InnoDB: What s new in 8.0

ScaleArc Performance Benchmarking with sysbench

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

Delegates must have a working knowledge of MariaDB or MySQL Database Administration.

Why Choose Percona Server For MySQL? Tyler Duzan

Beyond MySQL 5.1 What is happening in MySQL Space. Feb 16, 2011 Percona Live San Francisco,CA by Peter Zaitsev, Percona Inc

MySQL Replication: What's New In MySQL 5.7 and MySQL 8. Luís Soares Software Development Director MySQL Replication

MySQL Performance Tuning 101

What is MariaDB 5.5? w: e: Daniel Bartholomew Oct 2012

How To Rock with MyRocks. Vadim Tkachenko CTO, Percona Webinar, Jan

Analysis of Derby Performance

Effective Testing for Live Applications. March, 29, 2018 Sveta Smirnova

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

High Availability Solutions for the MySQL Database

Optimizing MySQL Configuration

MySQL 8.0 Performance: InnoDB Re-Design

Why we re excited about MySQL 8

Preventing and Resolving MySQL Downtime. Jervin Real, Michael Coburn Percona

Everything You Need to Know About MySQL Group Replication

MySQL Performance Improvements

MySQL Replication Options. Peter Zaitsev, CEO, Percona Moscow MySQL User Meetup Moscow,Russia

Handlersocket. Ryan Lowe Percona Live London 2011

MySQL High Availability

MySQL Architecture and Components Guide

Optimizer Standof. MySQL 5.6 vs MariaDB 5.5. Peter Zaitsev, Ovais Tariq Percona Inc April 18, 2012

Aurora, RDS, or On-Prem, Which is right for you

Outline. Database Tuning. Ideal Transaction. Concurrency Tuning Goals. Concurrency Tuning. Nikolaus Augsten. Lock Tuning. Unit 8 WS 2013/2014

<Insert Picture Here> Looking at Performance - What s new in MySQL Workbench 6.2

Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

MySQL 5.7 For Operational DBAs an Introduction. Peter Zaitsev, CEO, Percona February 16, 2016 Percona Technical Webinars

Database Management and Tuning

Here, we consider Database bottleneck as a problem and provide solution for some of common problems.

MySQL usage of web applications from 1 user to 100 million. Peter Boros RAMP conference 2013

SSD/Flash for Modern Databases. Peter Zaitsev, CEO, Percona October 08, 2014 Percona Technical Webinars

Welcome to Virtual Developer Day MySQL!

CO MySQL for Database Administrators

Upgrading MySQL Best Practices. Apr 11-14, 2011 MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

Load Testing Tools. for Troubleshooting MySQL Concurrency Issues. May, 23, 2018 Sveta Smirnova

MySQL HA Solutions Selecting the best approach to protect access to your data

MySQL Performance Tuning

MySQL vs MariaDB. Where are we now?

Scaling Without Sharding. Baron Schwartz Percona Inc Surge 2010

Accelerating OLTP performance with NVMe SSDs Veronica Lagrange Changho Choi Vijay Balakrishnan

MySQL Storage Engines Which Do You Use? April, 25, 2017 Sveta Smirnova

Heckaton. SQL Server's Memory Optimized OLTP Engine

The Care and Feeding of a MySQL Database for Linux Adminstrators. Dave Stokes MySQL Community Manager

Resolving and Preventing MySQL Downtime

MySQL and SSD: Usage Patterns

MyRocks in MariaDB. Sergei Petrunia MariaDB Tampere Meetup June 2018

ITS. MySQL for Database Administrators (40 Hours) (Exam code 1z0-883) (OCP My SQL DBA)

TokuDB vs RocksDB. What to choose between two write-optimized DB engines supported by Percona. George O. Lorch III Vlad Lesin

MySQL 8.0: Atomic DDLs Implementation and Impact

State of the Linux Kernel

SSD/Flash for Modern Databases. Peter Zaitsev, CEO, Percona November 1, 2014 Highload Moscow,Russia

MySQL for Database Administrators Ed 3.1

Taking hot backups with XtraBackup. Principal Software Engineer April 2012

MariaDB: Community Driven SQL Server. Kristian Nielsen MariaDB developer Monty Program AB

Accelerate MySQL for Demanding OLAP and OLTP Use Cases with Apache Ignite. Peter Zaitsev, Denis Magda Santa Clara, California April 25th, 2017

Introduction to MySQL InnoDB Cluster

State of the Dolphin Developing new Apps in MySQL 8

Oracle Database 10g The Self-Managing Database

CPSC 421 Database Management Systems. Lecture 19: Physical Database Design Concurrency Control and Recovery

CSE 544: Principles of Database Systems

Percona Server for MySQL 8.0 Walkthrough

Percona XtraDB Cluster

How Percona Contributes to Open Source Database Ecosystem. Peter Zaitsev 5 October 2016

Which technology to choose in AWS?

Enabling and Optimizing MariaDB on Qualcomm Centriq 2400 Arm-based Servers

Mysql Cluster Could Not Acquire Global Schema Lock

"Charting the Course... Oracle Database 12c: Architecture & Internals. Course Summary

File Structures and Indexing

MySQL Replication Update

Practical MySQL Performance Optimization. Peter Zaitsev, CEO, Percona July 02, 2015 Percona Technical Webinars

Anti-Caching: A New Approach to Database Management System Architecture. Guide: Helly Patel ( ) Dr. Sunnie Chung Kush Patel ( )

Transcription:

Performance improvements in MySQL 5.5 Percona Live Feb 16, 2011 San Francisco, CA By Peter Zaitsev Percona Inc

-2- Performance and Scalability Talk about Performance, Scalability, Diagnostics in MySQL 5.5 All either directly seen as Performance or provide a pathway to getting one Major Areas of Improvements SQL Level Innodb Windows Performance Schema

-3- Improvements to What? We compare MySQL 5.5 to MySQL 5.1 with Innodb Plugin MySQL 5.1 by default uses very old Innodb code which has a lot more problems Some articles out there compare MySQL 5.5 to MySQL 5.1 without plugin showing more gains

-4- LOCK_open Table Cache Operations did not scale well in MySQL A lot of operations had to be done under global lock making it hot spot Linear Search used for some operations MySQL 5.5 reduces contention introducing MDL (Meta Data Locking) Subsystem Both optimizations for number of operations and reduced contention

-5- Smaller Optimizations LOCK_alarm mutex Replaced by SO_SNDTIMEO/SO_RCVTIMEO on platforms what support it Most current do LOCK_thread_count mutex Reduced usage to connect/disconnect from 1-2 times per query THR_LOCK_charset Previously used for character set setup. Removed

-6- Innodb Optimizations A lot of Scalability improvements Important performance optimization for Purging, IO Subsystem and Change Buffering

-7- Improved Log Sys Mutex Served double duty protecting Log records and LSN Pages in buffer pool changed than MTR is commited Changed to 2 separate mutexes Contention can still be observed by heavy log write workloads

-8- Separate Flush_list Mutex Buffer Pool operations and Flush List operations were bound on very hot buffer pool mutex Flush list has its own mutex reducing pressure on buffer pool mutex Which remains rather hot

-9- Multiple Buffer Pool Instances buffer pool mutex remains hot But we can now create multiple buffer pools to relief this problem innodb_buffer_pool_instances Pages will be hashed across these buffer pools No user level table mapping etc Some will contain hot pages and may get hot Many buffer pools can increase internal overhead

-10- Multiple Rollback Segments Innodb used to have single rollback segment Both contention spot and limit to 1023 concurrent transactions (or less) Now 128 Segments Reducing contention and giving up to 128K transactions innodb_fast_shutdown=0 needed for upgrade Old Inoodb Versions will benefit from this change They can use more than one segment, just do not create more than one

-11- Asynchronous IO on Linux Before MySQL 5.5 Innodb would use Native Async IO only on Windows On Linux it was Simulated by using helper threads Assumes O_DIRECT Good to use anyway More outstanding IO requests Pushes burden of merging io requests to Kernel Can make crash recovery up to 1.5x faster

-12- Change Buffering Insert Buffer existed in Innodb forever Speeding up Inserts for IO bound workloads Updates and Deletes were a lot slower, unable to use this feature MySQL 5.5 support delete mark and purge change buffering It handles update case as well as delete because secondary indexes are never updated in place Up to 40x performance improvement for large deletes

-13- Separate Purge Thread Before MySQL 5.5 purging of old records is done by main thread Making it stall on other activities while doing purge Making purging lag more often than it should Very large History Length with purge thread unable to keep up a big problem innodb_purge_threads=1 to use separate purge thread

-14- Innodb Adaptive Flushing Not a new feature in MySQL 5.5 Was adjusted to deal with multiple buffer pools Getting constants small tunings MySQL 5.5 should be a lot smoother on many workloads This will likely continue to improve as MySQL 5.5 matures

-15- Windows Optimizations Using Native Windows calls instead of POSIX subsystem Use CriticalSection for mutexes and use native ConditionVariables in newer Windows OS Windows Optimizations graphs from Innodb Blog

-16- Windows Reads

-17- Windows Writes

-18- Performance Schema Performance Schema includes many Innodb Probes Can be used by developers and by Users to better understand sources of Performance problems Hence contributing to further Innodb improvements

-19- Remaining issues in 5.5 Per Index Lock Restricts performance for high update workloads Use Partitioning as partial Workaround Kernel Mutex Seems to be significant focus for Innodb optimization in MySQL 5.6

-20- Remaining Issues MySQL 5.5 Dropping Tablespace with Innodb File Per Table Operation requires scan of LRU list So the larger is buffer pool the slower it gets Log Mutex Still causing contention Group Commit Is fixed now only if you chose not to use sync_binlog=1 and so lose binary logs on crash

-21- What about Percona Server MySQL 5.5 and Percona Server 5.1 work on many similar bottlenecks, though approaches sometimes different Percona Server is focused on more simple changes to ensure shorter time to market MySQL 5.5 is often faster than Percona Server 5.1 on Multi Core CPUs with Many Connections Percona Server 5.5 Beta is available combining best changes from both code bases http://www.percona.com/software/

-22- Ideas Exchange MySQL Changes are released under GPL We review developments in current and next version and use the code/ideas if it gives good performance Sames goes back We're making our code available for Oracle to integrate, though no changes were taken directly after Ken Jacobs left Focus on short time to market allow to see safe parts of the future today

-23- LOCK_open Table Cache Operations did not scale well in MySQL A lot of operations had to be done under global lock making it hot spot Linear Search used for some operations MySQL 5.5 reduces contention introducing MDL (Meta Data Locking) Subsystem Both optimizations for number of operations and reduced contention

MySQL 5.5 vs Percona Server 5.5-24-

-25- Questions? Thanks for coming! Contact at pz@percona.com Do not forget to come to Ignite show at 7PM