How To Dump On A Microsoft Server On A Linux Computer (For Ahemmer) On A Slow Computer (Or A Micros) On An Uniden) On Your Own Time (For An Unranced Server) On The Cheap (

Similar documents
Best Practices. EMEA Pug Challenge Nectar Daloglou, White Star Software

MS SQL Performance (Tuning) Best Practices:

PERFORMANCE TIPS FOR BATCH JOBS

System Administration Reference Guide

Big Data, Fast Processing Speeds Kevin McGowan SAS Solutions on Demand, Cary NC

Outline. Failure Types

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

Enhancing SQL Server Performance

Managing your Domino Clusters

Whitepaper: performance of SqlBulkCopy

Toad for Oracle 8.6 SQL Tuning

Database Maintenance Essentials

Performance rule violations usually result in increased CPU or I/O, time to fix the mistake, and ultimately, a cost to the business unit.

I-Motion SQL Server admin concerns

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Exceptions to the Rule: Essbase Design Principles That Don t Always Apply

PostgreSQL Backup Strategies

Sharing Static Data with Amazon S3 PAUL KOUFALIS PRESIDENT PROGRESSWIZ CONSULTING

MySQL Cluster New Features. Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com

Distribution One Server Requirements

Ensuring scalability and performance with Drupal as your audience grows

Informix Performance Tuning using: SQLTrace, Remote DBA Monitoring and Yellowfin BI by Lester Knutsen and Mike Walker! Webcast on July 2, 2013!

PARALLELS CLOUD STORAGE

Dave Stokes MySQL Community Manager

x64 Servers: Do you want 64 or 32 bit apps with that server?

Throwing Hardware at SQL Server Performance problems?

Oracle9i Release 2 Database Architecture on Windows. An Oracle Technical White Paper April 2003

Top 10 Performance Tips for OBI-EE

Geospatial Server Performance Colin Bertram UK User Group Meeting 23-Sep-2014

Oracle DBA Course Contents

Troubleshooting SQL Server Enterprise Geodatabase Performance Issues. Matthew Ziebarth and Ben Lin

Topics in Computer System Performance and Reliability: Storage Systems!

DMS Performance Tuning Guide for SQL Server

ROUNDTABLE TSMS 11.5 Installation Guide

Configuring Apache Derby for Performance and Durability Olav Sandstå

File Systems Management and Examples

Cognos Performance Troubleshooting

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Scaling Analysis Services in the Cloud

Capacity Planning Process Estimating the load Initial configuration

Preparing a SQL Server for EmpowerID installation

Running a Workflow on a PowerCenter Grid

LISTSERV in a High-Availability Environment DRAFT Revised

SQL Best Practices for SharePoint admins, the reluctant DBA. ITP324 Todd Klindt

Recommended hardware system configurations for ANSYS users

Hands-On Microsoft Windows Server 2008

SQL Server Maintenance Plans

Cloud Storage. Parallels. Performance Benchmark Results. White Paper.

Considerations when Choosing a Backup System for AFS

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Considerations when Choosing a Backup System for AFS

Server & Workstation Installation of Client Profiles for Windows

Latency: The Heartbeat of a Solid State Disk. Levi Norman, Texas Memory Systems

StreamServe Persuasion SP5 Oracle Database

Tuning Tableau Server for High Performance

SQL Server Upgrading to. and Beyond ABSTRACT: By Andy McDermid

DBA 101: Best Practices All DBAs Should Follow

Virtualisa)on* and SAN Basics for DBAs. *See, I used the S instead of the zed. I m pretty smart for a foreigner.

Installation Guide QAD Customer Relationship Management

As we start this session, please keep handy your 3 ring binder which should have the checklists at the front of it and the presentations after.

Storage Performance Testing

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

Hardware Configuration Guide

Performance And Scalability In Oracle9i And SQL Server 2000

Deploying and Optimizing SQL Server for Virtual Machines

Cambridge English: ESOL Skills for Life

MySQL: Cloud vs Bare Metal, Performance and Reliability

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Senior Operational DBA

Best Practices Every SQL Server DBA Must Know

Quantcast Petabyte Storage at Half Price with QFS!

Load Testing Analysis Services Gerhard Brückl

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

General DBA Best Practices

RAID Utility User Guide. Instructions for setting up RAID volumes on a computer with a Mac Pro RAID Card or Xserve RAID Card

DB2 Database Layout and Configuration for SAP NetWeaver based Systems

Secure Web. Hardware Sizing Guide

Configuration and Coding Techniques. Performance and Migration Progress DataServer for Microsoft SQL Server

The 5-minute SQL Server Health Check

Choosing Storage Systems

Rational Application Developer Performance Tips Introduction

Name: 1. CS372H: Spring 2009 Final Exam

Lua as a business logic language in high load application. Ilya Martynov ilya@iponweb.net CTO at IPONWEB

RAID Utility User s Guide Instructions for setting up RAID volumes on a computer with a MacPro RAID Card or Xserve RAID Card.

Keys to optimizing your backup environment: Veritas NetBackup

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

PostgreSQL when it s not your job. Christophe Pettus PostgreSQL Experts, Inc. DjangoCon Europe 2012

GIVE YOUR ORACLE DBAs THE BACKUPS THEY REALLY WANT

Using SQL Server 2014 In-Memory Optimized Columnstore with SAP BW

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture

SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

Load Testing Basics: These are the basic ideas in setting up a load test By: Bob Wescott

Maximizing SQL Server Virtualization Performance

Condusiv s V-locity Server Boosts Performance of SQL Server 2012 by 55%

Outline: Operating Systems

Transcription:

27 Days to 27 Hours Best Practices in Dump & Load Optimization PAUL KOUFALIS PRESIDENT PROGRESSWIZ CONSULTING

27 Days to 27 Hours!?! What does that mean? At one client, the resident DBA/consultant told them it would take 27 days to D&L their PROD environment OFFLINE!! Stop laughing! It s true! We did it in 27 hours. 2 27 Days to 27 Hours

In 100 Slides or Less You will learn: Some basics The time/cost trade-off: planning versus execution Sneaky tricks à la Why didn t I think of that!?! Bonus: Some cool benchmark results from the new 10.2B06 Index Rebuild parameters 3 27 Days to 27 Hours

What You Won t Learn Basic syntax I will assume you can RTFM Scripting Windows vs. UNIX: it s all the same to me RAID 0, 1, 5, 6, 10, 50, 60 Feel free to ask me during Q&A at the end 4 27 Days to 27 Hours

Paul Koufalis? Who is Paul Koufalis? Famous quote from my junior college days Buy me a beer and I ll tell you the story Progress DBA and UNIX sysadmin for 18 years I have clients with DBs of all sizes Some have one prod DB, others 50 Each has its unique set of D&L challenges 5 27 Days to 27 Hours

Let s Get Started Two kinds of dumps: ASCII (via Data Admin or custom EXPORT) Binary (via _proutil C dump) Three kinds of loads: ASCII (via Data Admin or custom EXPORT) Bulk (via _proutil C bulkload) Binary (via _proutil C load) Bonus BUFFER-COPY() method 6 27 Days to 27 Hours

ASCII Dump Dictionary or ABL EXPORT command Really the same thing Dictionary dump uses the primary index Process Load index block(s) Locate ROWID of next row Load data block Copy record to program s record buffer Export data in dump-file format 7 27 Days to 27 Hours

ASCII Dump PROs Easy: Admin Dump Data Contents Overall faster for small databases Can write complex ABL dump code Including data transformations Still always used for _user.d, _seqvals.d 8 27 Days to 27 Hours

ASCII Dump CONs Slooooowwwwww for big-ish tables Uses primary index only (_admin.p) Custom ABL EXPORT could lead to errors Skipped and/or mangled data Codepage Year-offset 9 27 Days to 27 Hours

Binary Dump Export entire record in same format as stored in database No conversion NOT readable text 10 27 Days to 27 Hours

Binary Dump - PROs Fast! Multi-threaded in later version Can select index DumpSpecified allows limited WHERE clause 11 27 Days to 27 Hours

Binary Dump - CONs Requires scripting One _proutil C dump command per table Need to test and prep more than ASCII dump Your scripts Load on your server Needs more comprehensive error checking Grep through logs 12 27 Days to 27 Hours

ASCII Load Dictionary or ABL IMPORT command Read the file one line at a time: REPEAT: CREATE <table>. IMPORT <record>. END. Create index entries for every record creation 13 27 Days to 27 Hours

ASCII Load PROs Easy: Admin Load Data Contents Can write complex ABL load code You see errors right away Still always used for _user.d, _seqvals.d 14 27 Days to 27 Hours

ASCII Load CONs Slooooowwwwww Create table create indexes create table Same as dump: mostly just slow and painful 15 27 Days to 27 Hours

Binary Load Import record directly from binary dump file to db block Little manipulation needed 16 27 Days to 27 Hours

Binary Load - PROs Fast! Imports entire record in one shot! CRC-check makes sure target schema is identical to source schema Watch out for R-POS Your choice: build indexes inline with load or afterwards 17 27 Days to 27 Hours

Binary Load - CONs Same as dump Requires scripting Each bin-dump file must be loaded Need to test and prep more Needs more comprehensive error checking Can accidentally load the same file twice Will find out during index rebuild! 18 27 Days to 27 Hours

Bulk Load This is an ASCII load without building indexes I rarely use this Could be useful if you did a custom dump Bulkload + idxbuild faster than dict load 19 27 Days to 27 Hours

BUFFER-COPY() ABL code method Connect the source and target DB FIND source.table. CREATE target.table BUFFER-COPY source.table TO target.table. 20 27 Days to 27 Hours

BUFFER-COPY() Conceptually very cool One or more _progres session per table Only one small index active on target Rebuild the rest later I have not had the opportunity to try it Certain respected DBAs like this method 21 27 Days to 27 Hours

Planning Your Dump & Load 22 27 Days to 27 Hours

Planning Your Dump & Load I like to emphasize FAST and GOOD But this means it WON T be CHEAP More time (money) preparing = less surprises In your world, you need to decide 23 27 Days to 27 Hours

Define Your Limits How much time to you have? Don t forget UAT time Example: Down Friday 6pm Finished by Sunday noon UAT until Sunday 4pm Go/No-Go Sunday 4:30pm Up Sunday 8pm 24 27 Days to 27 Hours

Define Your Limits How much disk space do you have? Dump files Temp files (index rebuild) New databases Backups Old DB New DB at multiple stages in process Fast disks? SSD? FC-SAN? Or NFS? Can you borrow fast disk space? 25 27 Days to 27 Hours

Define Your Limits How many servers can you use? Can you dump on one and load on another? Is it worth it? How much RAM do they have? CPU? Can you use it ALL? (be greedy) Can you borrow more? (VM/LPAR) 26 27 Days to 27 Hours

Preparing the DUMP Use Table Analysis to tell you approximately how big each dump will be Note the big tables Often 5-10 tables = 90% of data 27 27 Days to 27 Hours

Baseline DUMP Baseline Start the DB with the biggest B you can binary dump everything in parallel _proutil db C dump table & By default uses the primary index Typically ALL the tables except a handful will finish dumping in a very short period 28 27 Days to 27 Hours

Baseline DUMP Server is freaking out for the first 10-20 min 3-4-500 parallel dumps running! Don t stress If it s taking forever abort Extrapolate dump time for remaining tables If it s fast enough for you you re done Good, fast AND cheap! Lucky you! 29 27 Days to 27 Hours

DUMP #2 You have identified the x slooooow dumps Surprise! Some of the slow dumps may not be your biggest tables! Make a few changes: Dump the slow tables in parallel Dump the fast/small tables in series Will take some of the stress off the server Won t affect overall dump time 30 27 Days to 27 Hours

DUMP #2 What to do with the slow tables? Option 1: Use -index 0 No index. Just dump in physical order in DB MOST EFFICIENT Requires Type II S.A. and 10.2B0x Watch out for bugs in earlier versions Won t fix logical scatter 31 27 Days to 27 Hours

Dump #2 Option 2: Pick a small index Use Index Analysis Good when no Type II S.A. or index 0 not supported Option 3: Pick most-used index Use IndexStat VST May not be fastest dump but will be fastest access in target 32 27 Days to 27 Hours

Dump #2 So? Better? What did we forget? Oh yeah multi-threaded binary dump! 33 27 Days to 27 Hours

Dump #3 Small/fast tables dump Single-threaded In series Default (primary) index Large/slow tables Multi-threaded In parallel -index 0 or other specific index 34 27 Days to 27 Hours

Sneaky Dump Tricks Still not fast enough!?! Here s some ideas: Multi-threaded dump May not be very multi-threaded Index limitations Use multiple DUMPSPECIFIED 35 27 Days to 27 Hours

Sneaky Dump Tricks No fast index? Add an index Add + idxbuild + dump may still be faster than dump with slow index Do you have a DEV / TEST / DR box? Dump from multiple servers Use last backup + AI files to prepare 36 27 Days to 27 Hours

Sneaky Dump Tricks Convert Your V9 DB to OE 10.2B06 proutil db C conv910 Now you can use all the cool toys in OE 10 Don t forget to backup your source DB! 37 27 Days to 27 Hours

Preparing the Load Hopefully will take advantage of Type II S.A. Prepare your empty DB (DF only) in advance Take a backup for easy restart DON T throw away that test DB It s already pre-grown to the right size! Just prorest DF_ONLY.probkp into it Create a /loaded dir Move loaded.bd files after successful load 38 27 Days to 27 Hours

Load #1 Single user, single threaded, one after the other So many people disagree, but this is sooo often the fastest way It is also usually fast enough See Sneaky Load Tricks 39 27 Days to 27 Hours

Load #2??? What load #2??? #1 is the BOMB! OK try massively parallel loads BIG B _mprosrv with -i Binload s with -i -bibufs 200-300-400 (low cost) HUGE BI cluster size + 16 Kb BI block size Two APW + BIW 40 27 Days to 27 Hours

Sneaky Load Tricks My favourite: ulimit during dump Set it to x Gb (some fraction of the total size) As soon as bindump switches to.bd(n+1), start loading.bd(n) BROKEN IN 10.2B0x??? (Breaking news) 41 27 Days to 27 Hours

Sneaky Load Tricks Use your DR or some other server to load You can start loading within minutes of starting the dump Use shared drive for.bd* files Disk native to dump server NFS mount to load servers Especially beneficial when many DBs 42 27 Days to 27 Hours

Sneaky Load Tricks Use -i (no-integrity) ATM load tests: 1h36 (no -i) 0h07 (with -i) CAREFUL: If it crashes you need to restart from empty 43 27 Days to 27 Hours

Sneaky Load Tricks Backup your target(s) at key points So many people ignore this OK to ignore if time is not an issue Or if you can try again next week 44 27 Days to 27 Hours

Question Marks LOBs I still have to benchmark single-user versus multi-user THIS may be faster in multi-user 45 27 Days to 27 Hours

Index Rebuild ONE important point: MEMORY = SPEED The more you do in RAM, the faster it will be 46 27 Days to 27 Hours

Index Rebuild PRE 10.2B06 Use RAM disks Beg/borrow/steal as much RAM as you can Use srt file and t to monitor 47 27 Days to 27 Hours

Index Rebuild PRE 10.2B06 SRT File: Progress will stripe tmp files across all the dirs in the SRT This is NOT optimal: 10000000 /ramdisk/ 0 /scratch_on_disk Will use half-half 48 27 Days to 27 Hours

Index Rebuild PRE 10.2B06 This is better: 1000000 /ramdisk/d1 1000000 /ramdisk/d2... 1000000 /ramdisk/d10 0 /scratch_on_disk 49 27 Days to 27 Hours

Index Rebuild 10.2B06 Lots of new toys (Thanks Rich!) Mostly moves bottlenecks from OpenEdge to hardware Benchmarks showing MASSIVE reductions in time 50 27 Days to 27 Hours

Index Rebuild Sneaky Tricks Build indexes by AREA If idxbuild crashes can restart with confidence Can also control resource use better CAREFUL after idxbuild crash: Delete the.xb Do a dummy index rebuild Ex.: a schema table To clear errors 51 27 Days to 27 Hours

Index Rebuild Sneaky Tricks Use all the tools available to you See Idxbuild Results 52 27 Days to 27 Hours

Nmon is your friend 53 27 Days to 27 Hours

Other Tips DB Analysis before and after Compare rows in tables Check that all the indexes have data Script anything you have to do more than a handful of times Ex.: grep Binary Load Complete or Binary Load Failed 54 27 Days to 27 Hours

Other Tips Document your procedure in enough detail that your boss could run it Include estimated times Create and print an XLS checklist D&L steps vs. DBs Check off boxes when completed successfully Critical when running multiple tasks concurrently 55 27 Days to 27 Hours

Other Tips Keep a close eye on virtual memory usage You never want paging space activity Do not confuse with FS cache paging This is normal Careful how you interpret I/O Wait Does not always imply problem 56 27 Days to 27 Hours

Credits 57 27 Days to 27 Hours

Progresswiz Consulting Based in Montréal, Québec, Canada Providing technical consulting in Progress, UNIX, Windows, MFG/PRO and more Specialized in performance tuning, system availability and business continuity planning and security of Progress-based systems 58 27 Days to 27 Hours

Questions? 59 27 Days to 27 Hours