SlideShare a Scribd company logo
1 of 20
Download to read offline
Confessions of a DBA:
worst and best things I've
done in production
Emily Slocombe
Open Source Bridge 2014
High and Low lights:
• at it since 1999!
• I’ve used the blackhole storage engine a few
awesome times
• I’ve seriously broken things
• I’ve confessed breaking things to rather famous
mysql people
• They remember these stories for years
Breaking things = learning
image: http://www.boredpanda.org/lets-see-who-can-post-the-cutest-animal-photo/#post0
Adventures in:
• Engine=blackhole
• data migration
• ‘Ghetto RAID’: mistakes in innodb
• the Hammer that is mysqltuner.pl
• MyISAM
• bad and worse
• Benchmarking!
Engine=blackhole
set	
  sql_log_bin=0;	
  alter	
  
table	
  blah	
  engine=blackhole;
1. Master was for bin logs only on
this one table.
2. Slave could not keep up with
replication and this giant table
with giant text blobs was IO
pain!	
  
image from: http://www.bearlakereserve.com/what-are-our-furry-friends-up-to/
Data Migration
• no sleep for 1 week!
• lived on energy drinks, greek
yogurt, and chocolate covered
espresso beans.!
• couldn’t eat vegetables for 1
year
ssh tunnel(s)!
Sad, cheap RAID
• 5.1.47 MySQL
• slow disks, long wait for more fast SSD / FC
• 1 SSD
• InnoDB: could symlink folders, not files
Sad, cheap RAID
• I should have tested this.
• BTW: InnoDB is ‘sparse file type’
• oops
I am not a DBA
• mysqltuner.pl seems like a great idea
• max heap / query cache
I am not a DBA
RECOMMENDATIONS:	
  
version	
  less	
  then	
  5.1,	
  upgrade!	
  
version	
  less	
  then	
  5.1.30	
  (the	
  first	
  GA	
  release	
  of	
  5.1),	
  upgrade!	
  
The	
  MySQL	
  manual	
  only	
  is	
  accurate	
  for	
  official	
  MySQL	
  binaries,	
  Percona	
  documentation	
  is	
  at	
  http://
www.percona.com/docs/wiki/	
  
The	
  query	
  cache	
  is	
  not	
  being	
  fully	
  utilized.	
  
Increase	
  query_cache_size	
  -­‐-­‐	
  there	
  are	
  too	
  many	
  low	
  memory	
  prunes.	
  
Too	
  many	
  sorts	
  are	
  causing	
  temporary	
  tables.	
  	
  Consider	
  increasingnsort_buffer_size	
  and/or	
  
read_rnd_buffer_size	
  
There	
  are	
  lots	
  of	
  rows	
  being	
  sorted.	
  	
  Consider	
  using	
  indexes	
  in	
  more	
  queries	
  to	
  avoid	
  sorting	
  too	
  often.	
  
There	
  are	
  too	
  many	
  joins	
  without	
  indexes	
  -­‐-­‐	
  this	
  means	
  that	
  joins	
  are	
  doing	
  full	
  table	
  scans.	
  
The	
  rate	
  of	
  reading	
  the	
  first	
  index	
  entry	
  is	
  high;	
  this	
  usually	
  indicates	
  frequent	
  full	
  index	
  scans.	
  
The	
  rate	
  of	
  reading	
  data	
  from	
  a	
  fixed	
  position	
  is	
  high;	
  this	
  indicates	
  many	
  queries	
  need	
  to	
  sort	
  results	
  
and/or	
  do	
  a	
  full	
  table	
  scan,	
  including	
  join	
  queries	
  that	
  do	
  not	
  use	
  indexes.	
  
The	
  rate	
  of	
  reading	
  the	
  next	
  table	
  row	
  is	
  high;	
  this	
  indicates	
  many	
  queries	
  are	
  doing	
  full	
  table	
  scans.	
  
Too	
  many	
  temporary	
  tables	
  are	
  being	
  written	
  to	
  disk.	
  	
  Increase	
  max_heap_table_size	
  and	
  tmp_table_size.	
  
Too	
  many	
  intermediate	
  temporary	
  tables	
  are	
  being	
  created;	
  consider	
  increasing	
  sort_buffer_size	
  (sorting),	
  
read_rnd_buffer_size	
  (random	
  read	
  buffer,	
  ie,	
  post-­‐sort),	
  read_buffer_size	
  (sequential	
  scan).	
  
MyISAM	
  key	
  buffer	
  (index	
  cache)	
  %	
  used	
  is	
  low.	
  	
  You	
  may	
  need	
  to	
  decrease	
  the	
  size	
  of	
  key_buffer_size,	
  re-­‐
examine	
  your	
  tables	
  to	
  see	
  if	
  indexes	
  have	
  been	
  removed,	
  or	
  examine	
  queries	
  and	
  expectations	
  about	
  what	
  
indexes	
  are	
  being	
  used.	
  
MyISAM	
  key	
  buffer	
  (index	
  cache)	
  %	
  used	
  is	
  low.	
  	
  You	
  may	
  need	
  to	
  decrease	
  the	
  size	
  of	
  key_buffer_size,	
  re-­‐
examine	
  your	
  tables	
  to	
  see	
  if	
  indexes	
  have	
  been	
  removed,	
  or	
  examine	
  queries	
  and	
  expectations	
  about	
  what	
  
indexes	
  are	
  being	
  used.	
  
Size	
  of	
  the	
  table	
  cache	
  
InnoDB	
  log	
  file	
  size	
  is	
  not	
  an	
  appropriate	
  size,	
  in	
  relation	
  to	
  the	
  InnoDB	
  buffer	
  pool.	
  	
  Consider	
  changing	
  
eitherninnodb_log_file_size	
  or	
  innodb_buffer_pool_size	
  
MyISAM
• drupal node table
• nearly read-only
• why not?
MyISAM
• 200+G table on EBS
• internally corrupt
• version 5.0.92
• upgrade version
• need to fix table
• add disk space
MyISAM, now InnoDB
I’d rather be blaming MyISAM, but I cannot.
MyISAM, now InnoDB
Benchmarking
Breaking things = learning
Emily Slocombe!
Twitter: @NinjaBunny_
Work: emily.slocombe@acquia.com
Photocredits:
piggie: http://www.boredpanda.org/lets-see-who-can-post-the-cutest-animal-photo/#post0
squirrel: http://www.bearlakereserve.com/what-are-our-furry-friends-up-to/
!
Other credits:
mysqltuner.pl: https://launchpad.net/mysqltuner

More Related Content

Similar to confessions of a dba: worst and best things I've done in production - Open Source Bridge 2014

MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB
 
MySQL Performance Tuning - GNUnify 2010
MySQL Performance Tuning - GNUnify 2010MySQL Performance Tuning - GNUnify 2010
MySQL Performance Tuning - GNUnify 2010OSSCube
 
Managing Memory & Locks - Series 1 Memory Management
Managing  Memory & Locks - Series 1 Memory ManagementManaging  Memory & Locks - Series 1 Memory Management
Managing Memory & Locks - Series 1 Memory ManagementDAGEOP LTD
 
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 20197 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019Dave Stokes
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQLlefredbe
 
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
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB plc
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterChris Henry
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013hernanibf
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB plc
 
Colvin exadata mistakes_ioug_2014
Colvin exadata mistakes_ioug_2014Colvin exadata mistakes_ioug_2014
Colvin exadata mistakes_ioug_2014marvin herrera
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningKenichiro Nakamura
 
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
 
Dba lounge-sql server-performance-troubleshooting
Dba lounge-sql server-performance-troubleshootingDba lounge-sql server-performance-troubleshooting
Dba lounge-sql server-performance-troubleshootingDan Andrei Stefan
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL-Consulting
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014Ryusuke Kajiyama
 
Unbreaking Your Django Application
Unbreaking Your Django ApplicationUnbreaking Your Django Application
Unbreaking Your Django ApplicationOSCON Byrum
 
What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010jbellis
 

Similar to confessions of a dba: worst and best things I've done in production - Open Source Bridge 2014 (20)

MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
 
MySQL Performance Tuning - GNUnify 2010
MySQL Performance Tuning - GNUnify 2010MySQL Performance Tuning - GNUnify 2010
MySQL Performance Tuning - GNUnify 2010
 
Managing Memory & Locks - Series 1 Memory Management
Managing  Memory & Locks - Series 1 Memory ManagementManaging  Memory & Locks - Series 1 Memory Management
Managing Memory & Locks - Series 1 Memory Management
 
MySQL Query Optimization.
MySQL Query Optimization.MySQL Query Optimization.
MySQL Query Optimization.
 
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 20197 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
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
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb Cluster
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
 
Colvin exadata mistakes_ioug_2014
Colvin exadata mistakes_ioug_2014Colvin exadata mistakes_ioug_2014
Colvin exadata mistakes_ioug_2014
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance Tuning
 
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
 
Dba lounge-sql server-performance-troubleshooting
Dba lounge-sql server-performance-troubleshootingDba lounge-sql server-performance-troubleshooting
Dba lounge-sql server-performance-troubleshooting
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
Unbreaking Your Django Application
Unbreaking Your Django ApplicationUnbreaking Your Django Application
Unbreaking Your Django Application
 
What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

confessions of a dba: worst and best things I've done in production - Open Source Bridge 2014

  • 1. Confessions of a DBA: worst and best things I've done in production Emily Slocombe Open Source Bridge 2014
  • 2. High and Low lights: • at it since 1999! • I’ve used the blackhole storage engine a few awesome times • I’ve seriously broken things • I’ve confessed breaking things to rather famous mysql people • They remember these stories for years
  • 3. Breaking things = learning image: http://www.boredpanda.org/lets-see-who-can-post-the-cutest-animal-photo/#post0
  • 4. Adventures in: • Engine=blackhole • data migration • ‘Ghetto RAID’: mistakes in innodb • the Hammer that is mysqltuner.pl • MyISAM • bad and worse • Benchmarking!
  • 5. Engine=blackhole set  sql_log_bin=0;  alter   table  blah  engine=blackhole; 1. Master was for bin logs only on this one table. 2. Slave could not keep up with replication and this giant table with giant text blobs was IO pain!   image from: http://www.bearlakereserve.com/what-are-our-furry-friends-up-to/
  • 6. Data Migration • no sleep for 1 week! • lived on energy drinks, greek yogurt, and chocolate covered espresso beans.! • couldn’t eat vegetables for 1 year ssh tunnel(s)!
  • 7.
  • 8. Sad, cheap RAID • 5.1.47 MySQL • slow disks, long wait for more fast SSD / FC • 1 SSD • InnoDB: could symlink folders, not files
  • 9. Sad, cheap RAID • I should have tested this. • BTW: InnoDB is ‘sparse file type’ • oops
  • 10. I am not a DBA • mysqltuner.pl seems like a great idea • max heap / query cache
  • 11. I am not a DBA RECOMMENDATIONS:   version  less  then  5.1,  upgrade!   version  less  then  5.1.30  (the  first  GA  release  of  5.1),  upgrade!   The  MySQL  manual  only  is  accurate  for  official  MySQL  binaries,  Percona  documentation  is  at  http:// www.percona.com/docs/wiki/   The  query  cache  is  not  being  fully  utilized.   Increase  query_cache_size  -­‐-­‐  there  are  too  many  low  memory  prunes.   Too  many  sorts  are  causing  temporary  tables.    Consider  increasingnsort_buffer_size  and/or   read_rnd_buffer_size   There  are  lots  of  rows  being  sorted.    Consider  using  indexes  in  more  queries  to  avoid  sorting  too  often.   There  are  too  many  joins  without  indexes  -­‐-­‐  this  means  that  joins  are  doing  full  table  scans.   The  rate  of  reading  the  first  index  entry  is  high;  this  usually  indicates  frequent  full  index  scans.   The  rate  of  reading  data  from  a  fixed  position  is  high;  this  indicates  many  queries  need  to  sort  results   and/or  do  a  full  table  scan,  including  join  queries  that  do  not  use  indexes.   The  rate  of  reading  the  next  table  row  is  high;  this  indicates  many  queries  are  doing  full  table  scans.   Too  many  temporary  tables  are  being  written  to  disk.    Increase  max_heap_table_size  and  tmp_table_size.   Too  many  intermediate  temporary  tables  are  being  created;  consider  increasing  sort_buffer_size  (sorting),   read_rnd_buffer_size  (random  read  buffer,  ie,  post-­‐sort),  read_buffer_size  (sequential  scan).   MyISAM  key  buffer  (index  cache)  %  used  is  low.    You  may  need  to  decrease  the  size  of  key_buffer_size,  re-­‐ examine  your  tables  to  see  if  indexes  have  been  removed,  or  examine  queries  and  expectations  about  what   indexes  are  being  used.   MyISAM  key  buffer  (index  cache)  %  used  is  low.    You  may  need  to  decrease  the  size  of  key_buffer_size,  re-­‐ examine  your  tables  to  see  if  indexes  have  been  removed,  or  examine  queries  and  expectations  about  what   indexes  are  being  used.   Size  of  the  table  cache   InnoDB  log  file  size  is  not  an  appropriate  size,  in  relation  to  the  InnoDB  buffer  pool.    Consider  changing   eitherninnodb_log_file_size  or  innodb_buffer_pool_size  
  • 12. MyISAM • drupal node table • nearly read-only • why not?
  • 13. MyISAM • 200+G table on EBS • internally corrupt • version 5.0.92 • upgrade version • need to fix table • add disk space
  • 14. MyISAM, now InnoDB I’d rather be blaming MyISAM, but I cannot.
  • 17.
  • 18. Breaking things = learning
  • 19. Emily Slocombe! Twitter: @NinjaBunny_ Work: emily.slocombe@acquia.com