Faster Than Alter – Less Downtime Chris Schneider.

Slides:



Advertisements
Similar presentations
13,000 Jobs and counting…. Advertising and Data Platform Our System.
Advertisements

Big Data Working with Terabytes in SQL Server Andrew Novick
Common Mistakes Developers Make By Bryan Oliver SQL Server Mentor at SolidQ.
1 Magnetic Disks 1956: IBM (RAMAC) first disk drive 5 Mb – Mb/in $/year 9 Kb/sec 1980: SEAGATE first 5.25’’ disk drive 5 Mb – 1.96 Mb/in2 625.
DataBase Administration Scheduling jobs Backing up and restoring Performing basic defragmentation and index rebuilding Using alerts Archiving.
Cacti Workshop Tony Roman Agenda What is Cacti? The Origins of Cacti Large Installation Considerations Automation The Current.
SharePoint and SQL Server integration Demo: SQL Server Optimizing Configurations SQL Server 2014 for SharePoint 2013 Avoiding ginormous transaction.
High-Performance Task Distribution for Volunteer Computing Rom Walton
Proper Care and Feeding of your SQL MDB -Recommendations for General MDB Maintenance -Read the notes on the foils! -Revised October
Reliable MySQL Using Replication Issac Goldstand Mirimar Networks
Simplify your Job – Automatic Storage Management Angelo Session id:
MOVE-4: Upgrading Your Database to OpenEdge® 10 Gus Björklund Wizard, Vice President Technology.
1 Storage Refinement. Outline Disk failures To attack Intermittent failures To attack Media Decay and Write failure –Checksum To attack Disk crash –RAID.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Database Storage Considerations Adam Backman White Star Software DB-05:
Exam QUESTION CertKiller.com has hired you as a database administrator for their network. Your duties include administering the SQL Server 2008.
Technology Expectations in an Aeros Environment October 15, 2014.
MySQL and SSD: Usage Patterns MySQL Conference & Expo Apr-2011 Vadim Tkachenko Co-founder, CTO, Percona Inc Date, time, place: Reporter:
Zabbix Performance Tuning
Index tuning Performance Tuning.
NLM Digital Repository Server Architecture January 18, 2011.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
HBase A column-centered database 1. Overview An Apache project Influenced by Google’s BigTable Built on Hadoop ▫A distributed file system ▫Supports Map-Reduce.
Goodbye rows and tables, hello documents and collections.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
Presented by, MySQL AB® & O’Reilly Media, Inc. 0 to 60 in 3.1 Tyler Carlton Cory Sessions.
1 Moshe Shadmon ScaleDB Scaling MySQL in the Cloud.
1 Wenguang WangRichard B. Bunt Department of Computer Science University of Saskatchewan November 14, 2000 Simulating DB2 Buffer Pool Management.
Block1 Wrapping Your Nugget Around Distributed Processing.
FEN  Data Definition: CREATE TABLE, ALTER TABLE  Data Manipulation: INSERT, UPDATE, DELETE  Queries: SELECT SQL: Structured Query Language.
LSST Database server Osman AÏDEL. Plan Infrastructure State of the art Post ingestion Procedure Indexes jeudi 22 octobre 2015Osman AÏDEL2.
Module 16: Performing Ongoing Database Maintenance
1 Performance Tuning Next, we focus on lock-based concurrency control, and look at optimising lock contention. The key is to combine the theory of concurrency.
Present :Arezoo Mollahasani. Step 1  Define your server connection Open MySQL WorkBench and click New Server Instance on the right of the window.
© Pearson Education Limited, Chapter 13 Physical Database Design – Step 4 (Choose File Organizations and Indexes) Transparencies.
A Brief Documentation.  Provides basic information about connection, server, and client.
Jeremy Bingham, DailyKos.com. Initial Problems Site tipped over way too often Required intensive administration Load times needed to be faster.
LFC Replication Tests LCG 3D Workshop Barbara Martelli.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Tuning Sakai for Large Production Systems: Hints and Tricks Raúl Mengod Universidad Politécnica de Valencia (Spain)
| See the possibilities… ePace Hardware Overview FUSION 08 Tom Dodge.
The DCS lab. Computer infrastructure Peter Chochula.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
MySQL Gubbins Richard Sinclair HepSysMan – 11/05/2012.
Computational Research in the Battelle Center for Mathmatical medicine.
MySQL and GRID status Gabriele Carcassi 9 September 2002.
CNAF Database Service Barbara Martelli CNAF-INFN Elisabetta Vilucchi CNAF-INFN Simone Dalla Fina INFN-Padua.
for all Hyperion video tutorial/Training/Certification/Material Essbase Optimization Techniques by Amit.
Lock Tuning. Overview Data definition language (DDL) statements are considered harmful DDL is the language used to access and manipulate catalog or metadata.
LHC Logging Cluster Nilo Segura IT/DB. Agenda ● Hardware Components ● Software Components ● Transparent Application Failover ● Service definition.
FroNtier Stress Tests at Tier-0 Status report Luis Ramos LCG3D Workshop – September 13, 2006.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Unit-8 Introduction Of MySql. Types of table in PHP MySQL supports various of table types or storage engines to allow you to optimize your database. The.
HP Proliant Server  Intel Xeon E3-1220v3 (3.1GHz / 4-core / 8MB / 80W).  HP 4GB Dual Rank x8 PC E (DDR3-1600) Unbuffered Memory Kit.  HP Ethernet.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Experiences with Xen virtualization and multi-brick Evergreen Environments Presented by Mike Peters – Indiana State Library & Niles Ingalls– Hussey Mayfield.
High-Availability MySQL with DR:BD and Heartbeat: MTV Japan mobile services ©2008 MTV Networks Japan K.K.
Only Aggressive Elephants are Fast Elephants Nov 11 th 2013 Database Lab. Wonseok Choi.
Testing the Zambeel Aztera Chris Brew FermilabCD/CSS/SCS Caveat: This is very much a work in progress. The results presented are from jobs run in the last.
Understanding and Improving Server Performance
Get the Most out of SQL Server Standard Edition
Flash Storage 101 Revolutionizing Databases
Importing and Exporting Data with MySQL
MyRocks at Facebook and Roadmaps
NGS Oracle Service.
Alejandro Álvarez on behalf of the FTS team
Introduction to Computers
Storage Virtualization
Turbo-Charged Transaction Logs
8 6 MySQL Special Topics A Guide to MySQL.
Presentation transcript:

Faster Than Alter – Less Downtime Chris Schneider

Overview  Some problems  Alter table  Load Data INFILE  Fragmentation  De-Fragmentation  Some tools to consider  Use of slave servers  Real world application - Schema change - Defragmentation

Some Problems DDL can be a pain in a working system  Need to add or remove a column  Need to add or remove a clustered or secondary key  Running into performance degradation - You’ve tried tuning the my.cnf but still need better performance

Alter Table  Alter table is very useful but can be unmanageable with large data sets  Everyone in here should about alter table!!!!!!!  Classic INNODB - ALTERs will run a table rebuild - Innodb Table space will grow  Innodb Plugin (Bonus) - Table space will be rebuilt in place WHEN: -- Dropping a secondary index -- Adding a secondary index

Load Data Infile  Load Data Infile is very fast and pretty easy to work with  Most people in here should know about LOAD DATA INFILE!!!  You should also know about SELECT INTO OUTFILE  Also the tab delimited mysqldump  Working with TSV and CSV files - Make sure when you export you do it in PK order

Fragmentation  Happens over time  Write activity creates holes and degrades performance  You did not load your data set initially in PK order  Can happen by accident - Update table set column1 = 2 where column1 = 1;

Defragmentation  You will see performance gains from a dump out and reload - 30% - 80% increase in overall throughput  For MyISAM and INNODB setups you will regain disk space  Upper management will be pleased with the sudden increase in database performance  Your customers will also be pleased, we HOPE!  Depending on your server count and setup you might only have to do this twice a year or less

Defragmentation (Cont) Tools to Consider  mk-parallel-dump - Dump tables in parallel  mk-parallel-restore - Load tables in parallel  mk-fifo-split - Split files and pipe lines to a fifo without really splitting  Select into outfile  LOAD data infile  MySQL Tab delimited dump

Using Slave Servers  Slave servers can be used to run alters or run an dump and reload of data  Some Considerations - Do you have a slave? - Do you have a good failover mechanism - Semi-Automated - Full-Automation The General Idea: 1.ON the slave, Stop slave, Select INTO OUTFILE, LOAD DATA INFILE 2.Fail over from the master to the slave 3.Repeat step 1 on OLD MASTER

Using Slave Servers (Cont)

Real World Applications Example 1: NEW COLUMN and INDEX needed  I have a system with 10, two node clusters, one master and one slave in each cluster  Each cluster has 10 databases on it with an average dataset of 70GB  The master servers cannot go down or be locked or an extended period of time. In this case I was given a 10 minute window (off hours) for a maintenance window Server Specs  Dell 2850  16GB RAM  Dual Quad – Intel 2.50GHz  8 x 300GB 10K SATA RAID 10

Real World Applications (CONT) Example 2: Defragmentation  Did you know that it takes 2 years to paint the Golden Gate bridge?  I have a system with thousands of servers that have been running a 60/40 (READ/WRITE) ratio for years  Each system is INNODB and has, on average, 170GB of data and index Server Specs  HP DL380 G5  32GB RAM  Dual Quad – Intel Xeon 2.50GHz  8x146GB 15K SAS  Two RAID sets - 2 disk mirror for OS - 6 disk RAID 10 for DATA

FYI and Questions  Slides will go up on  Questions?