Outline. Database Tuning. Disk Allocation Raw vs. Cooked Files. Overview. Hardware Tuning. Nikolaus Augsten. Unit 6 WS 2015/16

Similar documents
Outline. Database Management and Tuning. Overview. Hardware Tuning. Johann Gamper. Unit 12

Outline. Failure Types

Storing Data: Disks and Files

Definition of RAID Levels

DELL RAID PRIMER DELL PERC RAID CONTROLLERS. Joe H. Trickey III. Dell Storage RAID Product Marketing. John Seward. Dell Storage RAID Engineering

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Performance Report Modular RAID for PRIMERGY

IncidentMonitor Server Specification Datasheet

How to choose the right RAID for your Dedicated Server

technology brief RAID Levels March 1997 Introduction Characteristics of RAID Levels

HP Smart Array Controllers and basic RAID performance factors

RAID HARDWARE. On board SATA RAID controller. RAID drive caddy (hot swappable) SATA RAID controller card. Anne Watson 1

RAID Basics Training Guide

RAID 5 rebuild performance in ProLiant

RAID. Tiffany Yu-Han Chen. # The performance of different RAID levels # read/write/reliability (fault-tolerant)/overhead

Benefits of Intel Matrix Storage Technology

CS 6290 I/O and Storage. Milos Prvulovic

As enterprise data requirements continue

How To Create A Multi Disk Raid

CS 153 Design of Operating Systems Spring 2015

PIONEER RESEARCH & DEVELOPMENT GROUP

RAID Technology. RAID Overview

Review. Lecture 21: Reliable, High Performance Storage. Overview. Basic Disk & File System properties CSC 468 / CSC /23/2006

RAID Overview: Identifying What RAID Levels Best Meet Customer Needs. Diamond Series RAID Storage Array

Comprehending the Tradeoffs between Deploying Oracle Database on RAID 5 and RAID 10 Storage Configurations. Database Solutions Engineering

Lecture 36: Chapter 6

UK HQ RAID Chunk Size T F ISO 14001

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

Database Management Systems

Chapter 6 External Memory. Dr. Mohamed H. Al-Meer

Getting Started With RAID

SSDs and RAID: What s the right strategy. Paul Goodwin VP Product Development Avant Technology

WebBIOS Configuration Utility Guide

CS161: Operating Systems

Contents. Overview. Drive Policy RAID 500 features. Disable BGI RAID 700 features. Management Tasks Choosing the RAID Level.

Lecture 18: Reliable Storage

Oracle Database 10g: Performance Tuning 12-1

RAID Technology White Paper

Technical Note. Dell PowerVault Solutions for Microsoft SQL Server 2005 Always On Technologies. Abstract

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Chapter 7. Disk subsystem

Module 6. RAID and Expansion Devices

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

RAID Storage, Network File Systems, and DropBox

TECHNOLOGY BRIEF. Compaq RAID on a Chip Technology EXECUTIVE SUMMARY CONTENTS

Distribution One Server Requirements

Filing Systems. Filing Systems

RAID Overview

In Memory Accelerator for MongoDB

Configuring ThinkServer RAID 500 and RAID 700 Adapters. Lenovo ThinkServer

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

File System Design and Implementation

BrightStor ARCserve Backup for Windows

How To Improve Performance On A Single Chip Computer

1 Storage Devices Summary

VERITAS Volume Manager. for Windows. Best Practices

CSE-E5430 Scalable Cloud Computing P Lecture 5

The team that wrote this redbook Comments welcome Introduction p. 1 Three phases p. 1 Netfinity Performance Lab p. 2 IBM Center for Microsoft

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

CSE 120 Principles of Operating Systems

Storage Technologies - 2

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral

WHITE PAPER FUJITSU PRIMERGY SERVER BASICS OF DISK I/O PERFORMANCE

Sistemas Operativos: Input/Output Disks

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

RAID Level Descriptions. RAID 0 (Striping)

RAID. RAID 0 No redundancy ( AID?) Just stripe data over multiple disks But it does improve performance. Chapter 6 Storage and Other I/O Topics 29

Striped Set, Advantages and Disadvantages of Using RAID

Hard Disk Drives and RAID

Array Tuning Best Practices

Price/performance Modern Memory Hierarchy

Physical Data Organization

Operating Systems. RAID Redundant Array of Independent Disks. Submitted by Ankur Niyogi 2003EE20367

Using RAID6 for Advanced Data Protection

Managing RAID. RAID Options

IBM ^ xseries ServeRAID Technology

Fault Tolerance & Reliability CDA Chapter 3 RAID & Sample Commercial FT Systems

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Q & A From Hitachi Data Systems WebTech Presentation:

RAID Levels and Components Explained Page 1 of 23

Data Storage - II: Efficient Usage & Errors

Disk Array Data Organizations and RAID

Block1. Block2. Block3. Block3 Striping

MANAGING DISK STORAGE

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

An Introduction to RAID. Giovanni Stracquadanio

Flash for Databases. September 22, 2015 Peter Zaitsev Percona

CS420: Operating Systems

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 13-1

NIMSOFT SLM DATABASE

RAID EzAssist Configuration Utility Quick Configuration Guide

StreamServe Persuasion SP5 Microsoft SQL Server

Why disk arrays? CPUs speeds increase faster than disks. - Time won t really help workloads where disk in bottleneck

Optimizing Performance. Training Division New Delhi

EMC Backup and Recovery for Microsoft SQL Server 2008 Enabled by EMC Celerra Unified Storage

White Paper A New RAID Configuration for Rimage Professional 5410N and Producer IV Systems November 2012

Configuring ThinkServer RAID 100 on the Lenovo TS430

Transcription:

Outline Database Tuning Hardware Tuning Nikolaus Augsten University of Salzburg Department of Computer Science Database Group Unit 6 WS 2015/16 1 2 3 Conclusion Adapted from Database Tuning by Dennis Shasha and Philippe Bonnet. Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 1 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 2 / 21 Overview Disk Allocation Raw vs. Cooked Files Tuning the storage subsystem involves configuring: disk allocation disk array (RAID level) controller cache Cooked file: regular operating system file buffered through the operating system logically contiguous blocks might not be physically contiguous possibly indirection to access a particular page (inodes in Unix/Linux) Raw file: also character special device block device (hard disk) configured as raw device (using raw command) e.g., /dev/rsd0f is the raw device of block device /dev/sd0f not buffered by the operating system logically contiguous blocks are physically contiguous more efficient than cooked files Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 3 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 4 / 21

The Controller Cache Write-Back Mode Experiment Updates on 2 Disks - Cache Size 80Mb Read Cache: performs read-ahead after read request, controller continues to read and store in cache database can do better read-ahead since it knows the access patterns in general it is better to turn read cache off! Write-back mode: request terminates when data is written to cache data is written from cache to disk later writes become faster since they do not have to wait for the disk if cache contents get lost (power failure, no battery), then data is lost Write-through mode: request terminates when data is written to disk if cache has no battery, this mode is safer if cache is overloaded, write-through might be more efficient (depends on the efficiency of the replacement policy algorithm) Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 5 / 21 Throughput (tuples/sec) 2000 1500 1000 500 0 cache friendly (90Mb) no cache cache cache unfriendly (900Mb) Cache controller in write-back mode vs. no cache. Cache friendly load: volume of update slightly larger than cache. Cache unfriendly: volume of update much larger than cache. Write-back gives similar benefit in both cases. The controller implements an efficient replacement policy. SQL Server 7 on Windows 2000 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 6 / 21 RAID Redundant Arrays of Inexpensive Disks RAID Levels RAID array multiple hard disks one logical disk (operating system sees only one disk) disks divide and replicate data RAID controller is the interface Benefits: fault tolerance by introducing redundancy increased throughput due to parallel disk access RAID configurations are numbered ( levels ): RAID 0: striping RAID 1: mirroring RAID 5: rotated parity striping RAID 10: striped mirroring other (less important) RAID levels exist Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 7 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 8 / 21

RAID 0 Striping RAID 1 Mirroring RAID 0 striping: data is split into stripes of the same size consecutive stripes are written onto consecutive disks Example: stripe size 1kB, 2 disks write datablock A of 8kB block is split into A = A 1 + A 2 +... + A 8 disk 1: A 1, A 3, A 5, A 7, disk 2: A 2, A 4, A 6, A 8 Read/Write: RAID 0 with n disks, stripe size s small data s: read/write results in access to one physical disk large data s n: read/write results in parallel access to n disks + fast sequential read/write and concurrent seeks + 100% utilization of disk space (=cheap) - no fault-tolerance (array inaccessible if single disk fails) Database use: temporary files Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 9 / 21 RAID 5 Rotated Parity Striping RAID 5 rotated parity striping: n disks fault tolerance by error correction (instead of full redundancy) striped as in RAID 0, but n 1 stripes have an additional parity stripe parity stripes are evenly distributed over disks Example: stripe size 1kB, 4 disks write datablock AB of 6kB datablock is split into AB = A 1 + A 2 + A 3 + A p + B 1 + B 2 + B 3 + B p disk 1: A 1, B 1, disk 2: A 2, B 2, disk 3: A 3, B p, disk 4: A p, B 3 A1 B1 C1 Dp Disk 0 A2 B2 Cp D1 Disk 1 RAID 5 A3 Bp C2 D2 Disk 2 Ap B3 C3 D3 Disk 3 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 11 / 21 RAID 1 mirroring: 2 disks the same data is written to both disks ( mirrored ) no striping Example: 2 disks write datablocks A 1, A 2, A 3, A 4 disk 1: writes A 1 4, disk 2: writes A 1 4 Write one data block: physical write two both disks operation terminates when slower disk is done (!) Read of one data block: physical read from single (least busy) disks + fault tolerant (no interruption if one disk fails) + concurrent seeks (faster random read access) - only 50% utilization of disk space (=expensive) - write speed not increased from single-disk solution Database use: log file (fault tolerance, sequential writes) Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 10 / 21 RAID 5 Rotated Parity Striping Read: like RAID 0 with n 1 disks, parity stripe is not read Writing 1 stripe requires 2 physical reads and writes Write: Update data stripe S with S 1. read old data stripe S and old parity stripe P 2. new parity stripe P = S xor S xor P (for each bit flipped between S and S flip the corresponding bit in P) 3. write S and P (substituting S and P, respectively) Recovery: n disks, failure on disk x S i is the stripe on disk i (either parity or data) lost stripe S x = S 1 xor... xor S x 1 xor S x+1 xor... xor S n + fault tolerant (slowdown, but no interruption if one disk fails) + fast sequential read and concurrent seeks + (100 100/n)% utilization of disk space (=cheap) - write is slower than single-disk solution - recovery after failure much more difficult than with RAID 1 Database use: data and index files (if reads predominate writes) Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 12 / 21

RAID 10 Mirroring + Striping RAID with Read-Intensive Application Experiment RAID 1+0: mirrored RAID 0 stripe data on first n/2 disks (as in RAID 0) use the other disks to mirror these disks + best performance of all RAID levels + fault tolerant (no interruption if one disk fails) + fast sequential read/write and concurrent seeks - 50% utilization of disk space (=expensive) Database use: log file if RAID 1 is too slow data and index files if writes are too slow on RAID 5 Throughput (tuples/sec) 80000 60000 40000 20000 0 Soft- RAID5 Read-Intensive RAID5 RAID0 RAID10 RAID1 Single Disk RAID 1 slightly improves on single disk solution. Striped RAID levels (0,5,10) significantly improve read performance. SQL Server 7 on Windows 2000 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 13 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 14 / 21 RAID with Write-Intensive Application Experiment Outline Write-Intensive Throughput (tuples/sec) 160 120 80 40 0 Soft- RAID5 RAID5 RAID0 RAID10 RAID1 Single Disk 1 2 Software RAID 5: negative impact of the additional read/write operations clearly visible. Hardware RAID 5: controller cache hides negative impact of additional read/write operations. 3 Conclusion SQL Server 7 on Windows 2000 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 15 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 16 / 21

Exam Types of Exam Questions Oral exam, around 15-20 minutes per student Concurrency: while student A is being interviewed student B is preparing for the interview Relevant documents: slides of lecture notes Database Tuning by Dennis Shasha and Philippe Bonnet Relevant chapters in the book: Chapters 1-3 (except 2.4) Chapter 4.6 Appendix B.1 B.4 Do the exercises in the book! Theory question Example: Explain write-ahead logging and how the logging mechanism can be tuned. illustrate situation (database buffer, log buffer, log file, data files) use correct terminology and give precise definitions (e.g., what is a checkpoint?) structure your answer (how does WAL work? list tuning opportunities, then discuss each of them) discussion (advantage/disadvantage) be prepared for the questions why? and what if? Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 17 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 18 / 21 Types of Exam Questions Outline Conclusion Questions with practical part Example: What is transaction chopping and how does it work? Show the algorithm on the following transactions: T 1 : R(a), R(b), W (b), R(e), T 2 : R(b), R(e),... answer theory question give an overview of how you are going to solve the example before you execute a step in the solution, explain the step again, be prepared for the questions why? and what if? Follow-up questions detailed questions on the same topic to test understanding relation to other topics 1 2 3 Conclusion Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 19 / 21 Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 20 / 21

Summary Conclusion raw vs. cooked file setting the controller cache mode choosing the RAID level Nikolaus Augsten (DIS) DBT Hardware Tuning Unit 6 WS 2015/16 21 / 21