SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
MySQL Tuning
  Ford AntiTrust
What ?




“Managing performance of the memory and processing
    resources of the computer running the DBMS
Why ?




  Default settings are for toy databases
Why ?




Maximum performance (or Optimal between
   other services) and Maximum speed
How ? | today
• I/O tuning
• Optimize Queries
• Maintenances
• Configurations on DBMS
How ? | today
• I/O tuning
• Configurations on DBMS
I/O tuning




    The first bottleneck in database
       performance encountered.
I/O tuning | effect
• Transaction logs
• Files associated
  – Temporary file storage
  – Table file storage
  – Index file storage
I/O tuning | recommended
• CPU : Disabling HyperThreading
• Used different physical storage
   –   Transaction logs                 Transaction logs and
   –   Temporary file storage       temporary spaces are heavy
   –   Table file storage
                                    consumers of I/O, and affect
   –   Index file storage
                                    performance for all users of
• Hard Drive
                                    the database.
   – 7,200+ rpm
   – SATA/SCSI
• RAID levels : 5 +
   – With battery backed up cache may be important.
   – Not use NAS.
How ? | today
• I/O tuning
• Configurations on DBMS
In Architecture
                             •   Caches
                             •   Connections
                             •   Thread
                             •   Buffer
                             •   Temp tables
                             •   Index
                             •   Storage Engine
                             •   File System
                             •   Network I/O
                             •   Client Library



                  http://dev.mysql.com/doc/
General
• Set ‘sql-mode’
   – STRICT_TRANS_TABLES
   – NO_AUTO_CREATE_USER
   – NO_ENGINE_SUBSTITUTION“
• Set ‘default-storage-engine’
   – to INNODB
• Not used ‘old_passwords’
• Use ‘big-tables’
• Use ‘skip-name-resolve’
Log
• Use ‘log-slow-queries’ and ‘log-warnings’
  – For monitor long time queries and warning messages.
• Set ‘long_query_time’
  – For log all queries that have taken more than
    ‘long_query_time’ seconds
Key Buffer
Key blocks unused              27683
Key blocks used                1312

Key read requests              1318393
Key reads                      1344
Key Buffer = (Key read requests - Key reads) * 100 / Key read requests
Sort / Read / Join Buffer
• Set ‘sort_buffer_size’
  – Dynamic by number of ‘ORDER BY’ query
• Set ‘read_buffer_size’
  – Dynamic by traffic and b/w
• Set ‘read_rnd_buffer_size’
  – Dynamic by ‘GROUP BY’ or ‘ORDER BY’
• Set ‘join_buffer_size’
  – Dynamic by join table not use indexes
Query Cache
• Set ‘query_cache_size’
  – to 10% RAM
• Set ‘query_cache_type’
  – to 1, Cache all query results except for those
    that begin with SELECT SQL_NO_CACHE
• Set ‘query_cache_limit’
  – to 5-10% RAM
Temp Table
• Set ‘tmp_table_size’
  – to 5-10% RAM
• Set ‘max_tmp_tables’
  – to 5-10% number of table in all databases
• Set ‘tmpdir’ to different physical drive
Thread
• Use ‘skip-thread-priority’
• Set ‘thread_concurrency’
  – number of Core CPU * 2
• Set ‘thread_cache_size’
  – to 100 - ((threads_created / max_connections) * 100)
Table Cache
Open tables     1024
Opened tables   1120

table_cache     =1024
for InnoDB
• Set ‘innodb_buffer_pool_size’
   – Typical value 60-80% of memory
     (If Innodb is only your storage engine)
• Use ‘innodb_file_per_table’
• Set ‘innodb_additional_mem_pool_size’
   – Do not set too high, avoid memory waste
• Set ‘innodb_flush_log_at_trx_commit’ = 2
   – Control by OS
• Set ‘innodb_thread_concurrency’
   – 2*(NumCPUs+NumDisks) – in theory
Never ending in tune-up theory
References
• Optimizing the mysqld variables, June 15, 2004
  (www.databasejournal.com/features/mysql/article.php/3367871)
• MySQL Database Design and Tuning, Robert D. Schneider, Sams
  Publishing, ISBN: 0-672-32765-1
• InnoDB Architecture and Performance Optimization (OS-DB-
  CON2006), Peter Zaitsev, Percona Ltd
• InnoDB Performance Optimization Heikki Tuuri, Innobase Oy/Oracle
  Corp. Peter Zaitsev, Percona Ltd, uc2007 (April 23-26 2007)
• MySQL/Innodb performance optimization Peter Zaitsev, MySQL AB,
  O'Reilly Open Source Convention 2004 Portland,OR July 26-30
Ford AntiTrust


THANK YOU

Más contenido relacionado

La actualidad más candente

Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsFrederic Descamps
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresqlbotsplash.com
 
MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바NeoClova
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZENorvald Ryeng
 
PostgreSQL High_Performance_Cheatsheet
PostgreSQL High_Performance_CheatsheetPostgreSQL High_Performance_Cheatsheet
PostgreSQL High_Performance_CheatsheetLucian Oprea
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
MariaDB Optimization
MariaDB OptimizationMariaDB Optimization
MariaDB OptimizationJongJin Lee
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialSveta Smirnova
 
Cassandra concepts, patterns and anti-patterns
Cassandra concepts, patterns and anti-patternsCassandra concepts, patterns and anti-patterns
Cassandra concepts, patterns and anti-patternsDave Gardner
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxNeoClova
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLKenny Gryp
 
PostgreSQL Administration for System Administrators
PostgreSQL Administration for System AdministratorsPostgreSQL Administration for System Administrators
PostgreSQL Administration for System AdministratorsCommand Prompt., Inc
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryOlivier DASINI
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMike Dirolf
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바NeoClova
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxNeoClova
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxNeoClova
 

La actualidad más candente (20)

Open Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and HistogramsOpen Source 101 2022 - MySQL Indexes and Histograms
Open Source 101 2022 - MySQL Indexes and Histograms
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
PostgreSQL High_Performance_Cheatsheet
PostgreSQL High_Performance_CheatsheetPostgreSQL High_Performance_Cheatsheet
PostgreSQL High_Performance_Cheatsheet
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
MariaDB Optimization
MariaDB OptimizationMariaDB Optimization
MariaDB Optimization
 
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete TutorialMySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
 
Cassandra concepts, patterns and anti-patterns
Cassandra concepts, patterns and anti-patternsCassandra concepts, patterns and anti-patterns
Cassandra concepts, patterns and anti-patterns
 
Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
 
Reducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQLReducing Risk When Upgrading MySQL
Reducing Risk When Upgrading MySQL
 
PostgreSQL Administration for System Administrators
PostgreSQL Administration for System AdministratorsPostgreSQL Administration for System Administrators
PostgreSQL Administration for System Administrators
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features Summary
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바MySQL Advanced Administrator 2021 - 네오클로바
MySQL Advanced Administrator 2021 - 네오클로바
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docx
 

Destacado

Objective-C for Java developers
Objective-C for Java developersObjective-C for Java developers
Objective-C for Java developersFábio Bernardo
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)CommonsWare
 
Android performance tuning. Memory.
Android performance tuning. Memory.Android performance tuning. Memory.
Android performance tuning. Memory.Sergii Kozyrev
 
Deep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDeep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDavide De Chiara
 
iOS Developer Overview - DevWeek 2014
iOS Developer Overview - DevWeek 2014iOS Developer Overview - DevWeek 2014
iOS Developer Overview - DevWeek 2014Paul Ardeleanu
 
Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Abdullatif Tarakji
 
التحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجالتحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجbosy sadek
 
MarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine
 
Oracle hard and soft parsing
Oracle hard and soft parsingOracle hard and soft parsing
Oracle hard and soft parsingIshaan Guliani
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK toolsHaribabu Nandyal Padmanaban
 
Lesson5 Print and export databases
Lesson5 Print and export databases Lesson5 Print and export databases
Lesson5 Print and export databases Abdullatif Tarakji
 
الوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاالوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاAmin Abu Hammad
 
Performance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabasePerformance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabaseGrant Fritchey
 

Destacado (20)

MySQL on AWS 101
MySQL on AWS 101MySQL on AWS 101
MySQL on AWS 101
 
My SQL 101
My SQL 101My SQL 101
My SQL 101
 
Objective-C for Java developers
Objective-C for Java developersObjective-C for Java developers
Objective-C for Java developers
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
 
Android performance tuning. Memory.
Android performance tuning. Memory.Android performance tuning. Memory.
Android performance tuning. Memory.
 
Deep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile AppsDeep Parameters Tuning for Android Mobile Apps
Deep Parameters Tuning for Android Mobile Apps
 
iOS Developer Overview - DevWeek 2014
iOS Developer Overview - DevWeek 2014iOS Developer Overview - DevWeek 2014
iOS Developer Overview - DevWeek 2014
 
Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases
 
التحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجالتحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالج
 
Trabalho fitos digitais
Trabalho fitos digitaisTrabalho fitos digitais
Trabalho fitos digitais
 
Lesson11 Create Query
Lesson11 Create QueryLesson11 Create Query
Lesson11 Create Query
 
Lesson8 Manage Records
Lesson8 Manage RecordsLesson8 Manage Records
Lesson8 Manage Records
 
MarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine Country Statistics Database
MarketLine Country Statistics Database
 
Oracle hard and soft parsing
Oracle hard and soft parsingOracle hard and soft parsing
Oracle hard and soft parsing
 
Chapter 11new
Chapter 11newChapter 11new
Chapter 11new
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Lesson5 Print and export databases
Lesson5 Print and export databases Lesson5 Print and export databases
Lesson5 Print and export databases
 
الوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاالوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتها
 
Performance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabasePerformance Tuning Azure SQL Database
Performance Tuning Azure SQL Database
 
Introduction to ART (Android Runtime)
Introduction to ART (Android Runtime)Introduction to ART (Android Runtime)
Introduction to ART (Android Runtime)
 

Similar a MySQL Tuning

Performance Whack A Mole
Performance Whack A MolePerformance Whack A Mole
Performance Whack A Moleoscon2007
 
Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) PostgreSQL Experts, Inc.
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB plc
 
Evergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen ILS
 
How to build a state-of-the-art rails cluster
How to build a state-of-the-art rails clusterHow to build a state-of-the-art rails cluster
How to build a state-of-the-art rails clusterTim Lossen
 
MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017Ivan Zoratti
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadMarius Adrian Popa
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningLenz Grimmer
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedEqunix Business Solutions
 
MySQL Server Settings Tuning
MySQL Server Settings TuningMySQL Server Settings Tuning
MySQL Server Settings Tuningguest5ca94b
 
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDS
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDSAccelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDS
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDSCeph Community
 
CASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for successCASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for successErick Ramirez
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersSeveralnines
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMariaDB plc
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQDon Brizendine
 
Scalabe MySQL Infrastructure
Scalabe MySQL InfrastructureScalabe MySQL Infrastructure
Scalabe MySQL InfrastructureBalazs Pocze
 
Oracle Performance On Linux X86 systems
Oracle  Performance On Linux  X86 systems Oracle  Performance On Linux  X86 systems
Oracle Performance On Linux X86 systems Baruch Osoveskiy
 

Similar a MySQL Tuning (20)

Performance Whack A Mole
Performance Whack A MolePerformance Whack A Mole
Performance Whack A Mole
 
Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009) Performance Whack-a-Mole Tutorial (pgCon 2009)
Performance Whack-a-Mole Tutorial (pgCon 2009)
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
Performance Whackamole (short version)
Performance Whackamole (short version)Performance Whackamole (short version)
Performance Whackamole (short version)
 
Evergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival SkillsEvergreen Sysadmin Survival Skills
Evergreen Sysadmin Survival Skills
 
How to build a state-of-the-art rails cluster
How to build a state-of-the-art rails clusterHow to build a state-of-the-art rails cluster
How to build a state-of-the-art rails cluster
 
MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
 
MySQL Server Settings Tuning
MySQL Server Settings TuningMySQL Server Settings Tuning
MySQL Server Settings Tuning
 
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDS
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDSAccelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDS
Accelerating Cassandra Workloads on Ceph with All-Flash PCIE SSDS
 
CASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for successCASSANDRA MEETUP - Choosing the right cloud instances for success
CASSANDRA MEETUP - Choosing the right cloud instances for success
 
Development to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB ClustersDevelopment to Production with Sharded MongoDB Clusters
Development to Production with Sharded MongoDB Clusters
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimizationMaximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQ
 
Scalabe MySQL Infrastructure
Scalabe MySQL InfrastructureScalabe MySQL Infrastructure
Scalabe MySQL Infrastructure
 
VDI Design Guide
VDI Design GuideVDI Design Guide
VDI Design Guide
 
Oracle Performance On Linux X86 systems
Oracle  Performance On Linux  X86 systems Oracle  Performance On Linux  X86 systems
Oracle Performance On Linux X86 systems
 

Más de Ford AntiTrust

Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureFord AntiTrust
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for WindowsFord AntiTrust
 
Web Design, Running A Website And Hosting
Web Design, Running A Website And HostingWeb Design, Running A Website And Hosting
Web Design, Running A Website And HostingFord AntiTrust
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + MemcachedFord AntiTrust
 
PHP Hoffman Framework (HMF) at Barcamp Bangkok 2
PHP Hoffman Framework(HMF) at Barcamp Bangkok 2PHP Hoffman Framework(HMF) at Barcamp Bangkok 2
PHP Hoffman Framework (HMF) at Barcamp Bangkok 2Ford AntiTrust
 
GoOO->PHP [5] at Barcamp Bangkok 2
GoOO->PHP [5]  at Barcamp Bangkok 2GoOO->PHP [5]  at Barcamp Bangkok 2
GoOO->PHP [5] at Barcamp Bangkok 2Ford AntiTrust
 

Más de Ford AntiTrust (10)

Google calendar
Google calendarGoogle calendar
Google calendar
 
Qbasic
QbasicQbasic
Qbasic
 
Drupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows AzureDrupal in the Cloud with Windows Azure
Drupal in the Cloud with Windows Azure
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
 
Web Design, Running A Website And Hosting
Web Design, Running A Website And HostingWeb Design, Running A Website And Hosting
Web Design, Running A Website And Hosting
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + Memcached
 
PHP Hoffman Framework (HMF) at Barcamp Bangkok 2
PHP Hoffman Framework(HMF) at Barcamp Bangkok 2PHP Hoffman Framework(HMF) at Barcamp Bangkok 2
PHP Hoffman Framework (HMF) at Barcamp Bangkok 2
 
GoOO->PHP [5] at Barcamp Bangkok 2
GoOO->PHP [5]  at Barcamp Bangkok 2GoOO->PHP [5]  at Barcamp Bangkok 2
GoOO->PHP [5] at Barcamp Bangkok 2
 
PHP on AJAX
PHP on AJAXPHP on AJAX
PHP on AJAX
 
PHP Hoffman Framework
PHP Hoffman FrameworkPHP Hoffman Framework
PHP Hoffman Framework
 

Último

Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncrdollysharma2066
 
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...ShrutiBose4
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxMarkAnthonyAurellano
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Riya Pathan
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCRashishs7044
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMVoces Mineras
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?Olivia Kresic
 
IoT Insurance Observatory: summary 2024
IoT Insurance Observatory:  summary 2024IoT Insurance Observatory:  summary 2024
IoT Insurance Observatory: summary 2024Matteo Carbone
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 

Último (20)

Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
 
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptxContemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
Contemporary Economic Issues Facing the Filipino Entrepreneur (1).pptx
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQM
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?
 
IoT Insurance Observatory: summary 2024
IoT Insurance Observatory:  summary 2024IoT Insurance Observatory:  summary 2024
IoT Insurance Observatory: summary 2024
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 

MySQL Tuning

  • 1. MySQL Tuning Ford AntiTrust
  • 2. What ? “Managing performance of the memory and processing resources of the computer running the DBMS
  • 3. Why ? Default settings are for toy databases
  • 4. Why ? Maximum performance (or Optimal between other services) and Maximum speed
  • 5. How ? | today • I/O tuning • Optimize Queries • Maintenances • Configurations on DBMS
  • 6. How ? | today • I/O tuning • Configurations on DBMS
  • 7. I/O tuning The first bottleneck in database performance encountered.
  • 8. I/O tuning | effect • Transaction logs • Files associated – Temporary file storage – Table file storage – Index file storage
  • 9. I/O tuning | recommended • CPU : Disabling HyperThreading • Used different physical storage – Transaction logs Transaction logs and – Temporary file storage temporary spaces are heavy – Table file storage consumers of I/O, and affect – Index file storage performance for all users of • Hard Drive the database. – 7,200+ rpm – SATA/SCSI • RAID levels : 5 + – With battery backed up cache may be important. – Not use NAS.
  • 10.
  • 11. How ? | today • I/O tuning • Configurations on DBMS
  • 12. In Architecture • Caches • Connections • Thread • Buffer • Temp tables • Index • Storage Engine • File System • Network I/O • Client Library http://dev.mysql.com/doc/
  • 13. General • Set ‘sql-mode’ – STRICT_TRANS_TABLES – NO_AUTO_CREATE_USER – NO_ENGINE_SUBSTITUTION“ • Set ‘default-storage-engine’ – to INNODB • Not used ‘old_passwords’ • Use ‘big-tables’ • Use ‘skip-name-resolve’
  • 14. Log • Use ‘log-slow-queries’ and ‘log-warnings’ – For monitor long time queries and warning messages. • Set ‘long_query_time’ – For log all queries that have taken more than ‘long_query_time’ seconds
  • 15. Key Buffer Key blocks unused 27683 Key blocks used 1312 Key read requests 1318393 Key reads 1344 Key Buffer = (Key read requests - Key reads) * 100 / Key read requests
  • 16. Sort / Read / Join Buffer • Set ‘sort_buffer_size’ – Dynamic by number of ‘ORDER BY’ query • Set ‘read_buffer_size’ – Dynamic by traffic and b/w • Set ‘read_rnd_buffer_size’ – Dynamic by ‘GROUP BY’ or ‘ORDER BY’ • Set ‘join_buffer_size’ – Dynamic by join table not use indexes
  • 17. Query Cache • Set ‘query_cache_size’ – to 10% RAM • Set ‘query_cache_type’ – to 1, Cache all query results except for those that begin with SELECT SQL_NO_CACHE • Set ‘query_cache_limit’ – to 5-10% RAM
  • 18. Temp Table • Set ‘tmp_table_size’ – to 5-10% RAM • Set ‘max_tmp_tables’ – to 5-10% number of table in all databases • Set ‘tmpdir’ to different physical drive
  • 19. Thread • Use ‘skip-thread-priority’ • Set ‘thread_concurrency’ – number of Core CPU * 2 • Set ‘thread_cache_size’ – to 100 - ((threads_created / max_connections) * 100)
  • 20. Table Cache Open tables 1024 Opened tables 1120 table_cache =1024
  • 21. for InnoDB • Set ‘innodb_buffer_pool_size’ – Typical value 60-80% of memory (If Innodb is only your storage engine) • Use ‘innodb_file_per_table’ • Set ‘innodb_additional_mem_pool_size’ – Do not set too high, avoid memory waste • Set ‘innodb_flush_log_at_trx_commit’ = 2 – Control by OS • Set ‘innodb_thread_concurrency’ – 2*(NumCPUs+NumDisks) – in theory
  • 22. Never ending in tune-up theory
  • 23. References • Optimizing the mysqld variables, June 15, 2004 (www.databasejournal.com/features/mysql/article.php/3367871) • MySQL Database Design and Tuning, Robert D. Schneider, Sams Publishing, ISBN: 0-672-32765-1 • InnoDB Architecture and Performance Optimization (OS-DB- CON2006), Peter Zaitsev, Percona Ltd • InnoDB Performance Optimization Heikki Tuuri, Innobase Oy/Oracle Corp. Peter Zaitsev, Percona Ltd, uc2007 (April 23-26 2007) • MySQL/Innodb performance optimization Peter Zaitsev, MySQL AB, O'Reilly Open Source Convention 2004 Portland,OR July 26-30