System Architecture. CS143: Disks and Files. Magnetic disk vs SSD. Structure of a Platter CPU. Disk Controller...



Similar documents
CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

Outline. CS 245: Database System Principles. Notes 02: Hardware. Hardware DBMS Data Storage

Price/performance Modern Memory Hierarchy

Sistemas Operativos: Input/Output Disks

Physical Data Organization

Database Management Systems

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

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

Outline. Principles of Database Management Systems. Memory Hierarchy: Capacities and access times. CPU vs. Disk Speed

Disk Storage & Dependability

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University. (

COS 318: Operating Systems. Storage Devices. Kai Li and Andy Bavier Computer Science Department Princeton University

Record Storage and Primary File Organization

Storing Data: Disks and Files

Chapter 13. Disk Storage, Basic File Structures, and Hashing

Storage in Database Systems. CMPSCI 445 Fall 2010

6. Storage and File Structures

Introduction to I/O and Disk Management

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

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

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

1 Storage Devices Summary

RAID Performance Analysis

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

Chapter 9: Peripheral Devices: Magnetic Disks

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15

Solid State Drive Architecture

Flash for Databases. September 22, 2015 Peter Zaitsev Percona

University of Dublin Trinity College. Storage Hardware.

Chapter 10: Mass-Storage Systems

File System Management

Storing Data: Disks and Files. Disks and Files. Why Not Store Everything in Main Memory? Chapter 7

Storage and File Structure

Chapter 8: Structures for Files. Truong Quynh Chi Spring- 2013

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium.

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Operating Systems CSE 410, Spring File Management. Stephen Wagner Michigan State University

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

Chapter 13. Chapter Outline. Disk Storage, Basic File Structures, and Hashing

Overview of I/O Performance and RAID in an RDBMS Environment. By: Edward Whalen Performance Tuning Corporation

DELL SOLID STATE DISK (SSD) DRIVES

William Stallings Computer Organization and Architecture 7 th Edition. Chapter 6 External Memory

Deep Dive: Maximizing EC2 & EBS Performance

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

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

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

Lecture 16: Storage Devices

White Paper. Educational. Measuring Storage Performance

The Classical Architecture. Storage 1 / 36

Mass Storage Structure

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

Measuring Interface Latencies for SAS, Fibre Channel and iscsi

High-Performance SSD-Based RAID Storage. Madhukar Gunjan Chakhaiyar Product Test Architect

Data Storage - II: Efficient Usage & Errors

Dynamic Disk Pools Technical Report

File Management. Chapter 12

Chapter 10: Storage and File Structure

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

CS 6290 I/O and Storage. Milos Prvulovic

Solid State Storage in a Hard Disk Package. Brian McKean, LSI Corporation

Benchmarking Cassandra on Violin

Comparison of Hybrid Flash Storage System Performance

Intel Solid- State Drive Data Center P3700 Series NVMe Hybrid Storage Performance

RAID Overview

Chapter 2 Data Storage

Data Storage - I: Memory Hierarchies & Disks

Architecting High-Speed Data Streaming Systems. Sujit Basu

Definition of RAID Levels

Input/output (I/O) I/O devices. Performance aspects. CS/COE1541: Intro. to Computer Architecture. Input/output subsystem.

A Deduplication File System & Course Review

VMware Virtual SAN Backup Using VMware vsphere Data Protection Advanced SEPTEMBER 2014

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

Managing Storage Space in a Flash and Disk Hybrid Storage System

PARALLELS CLOUD STORAGE

Chapter 12: Mass-Storage Systems

Amadeus SAS Specialists Prove Fusion iomemory a Superior Analysis Accelerator

CHAPTER 13: DISK STORAGE, BASIC FILE STRUCTURES, AND HASHING

Evaluation Report: Accelerating SQL Server Database Performance with the Lenovo Storage S3200 SAN Array

HP Smart Array Controllers and basic RAID performance factors

Database 2 Lecture I. Alessandro Artale

Clash of the Titans. I/O System Performance. mag. Sergej Rožman; Abakus plus d.o.o.

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

Classification of Physical Storage Media. Chapter 11: Storage and File Structure. Physical Storage Media (Cont.) Physical Storage Media

Understanding Flash SSD Performance

PowerVault MD1200/MD1220 Storage Solution Guide for Applications

Configuring Apache Derby for Performance and Durability Olav Sandstå

Best Practices for Optimizing SQL Server Database Performance with the LSI WarpDrive Acceleration Card

A NOR Emulation Strategy over NAND Flash Memory

How To Write On A Flash Memory Flash Memory (Mlc) On A Solid State Drive (Samsung)

White paper. QNAP Turbo NAS with SSD Cache

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

Data storage and high-speed streaming

Using Synology SSD Technology to Enhance System Performance Synology Inc.

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

Transcription:

System Architecture CS143: Disks and Files CPU Word (1B 64B) ~ 10 GB/sec Main Memory System Bus Disk Controller... Block (512B 50KB) ~ 100 MB/sec Disk 1 2 Magnetic disk vs SSD Magnetic Disk Stores data on a magnetic disk Typical capacity: 1TB 10TB Solid State Drive Stores data in NAND flash memory Typical capacity: 100GB 1TB Much faster and more reliable than magnetic disk But, x10 more expensive and limited write cycles (~2000) 3 4 Structure of a Platter Track, cylinder, sector (=block, page) 5 6 1

Typical Magnetic Disk Capacity of Magnetic Disk Platter diameter: 2.5-5.25 in Platters: 1 20 Tracks: 1000 50,000 Sectors per track: 1000 50,000 Sector size: 512 50K Rotation speed: 1000 15000 rpm Overall capacity: 1TB 10TB Q: 2 platters, 2 surfaces/platter, 20,000 tracks/surface, 20,000 sectors/track, 1KB/sector. What is the overall capacity? 7 - Capacity keeps increasing, but what about speed? 8 CPU Memory Access Time page Disk Access Time Access time = (seek time) + (rotational delay) + (transfer time) Q: How long does it take to read a page of a disk to memory? Q: What needs to be done to read a page? 9 10 Seek Time Rotational Delay Time to move a disk head between tracks 5-20x Time Head Here x 1 N Track to track ~ 1ms Average ~ 10 ms Full stroke ~ 20 ms Cylinders Traveled 11 Block I Want Typical disk: 1000 rpm 15000 rpm Q: For 6000 RPM, average rotational delay? 12 2

Transfer Rate Read blocks as the platter rotates (Burst) Transfer Rate (Burst) Transfer rate = (RPM / 60) * (sectors/track) * (bytes/sector) Disk Head 6000 RPM, 10,000 sectors/track, 1KB/sector Q: How long to read one sector? Q: What is the transfer rate (bytes/sec)? 13 14 Sequential vs. Random I/O Q: How long to read 3 sequential sectors? q 6000 RPM q 10,000 sectors/track q Assume the head is above the first sector Sequential vs. Random I/O Q: How long to read 3 random sectors? q 6000 RPM q 10,000 sectors/track q 10ms seek time q Assume the head is above the first sector 15 16 Random I/O For magnetic disks: Random I/O is VERY expensive compared to sequential I/O Avoid random I/O as much as we can Magnetic Disk vs SSD Magnetic SSD Random IO ~100 IOs/sec ~100K IOs/sec Transfer rate ~ 100MB/sec ~500MB/sec Capacity/$ ~1TB/$50 (in 2015) ~100GB/$50 (in 2015) 17 SSD speed gain is mainly from high random IO rate 18 3

RAID Redundant Array of Independent Disks Create a large-capacity disk volumes from an array of many disks Q: Possible advantages and disadvantages? RAID Pros and Cons Potentially high throughput Read from multiple disks concurrently Potential reliability issues One disk failure may lead to the entire disk volume failure How should we store data into disks? Q: How should we organize the disks and store data to maximize benefit and minimize risks? 19 20 RAID Levels RAID 0: striping only (no redundancy) RAID 1: striping + mirroring RAID 5: striping + parity block Data Modification Byte-level modification not allowed Can be modified by blocks Q: How can we modify only a part of a block? 21 22 Abstraction by OS (head, cylinder, sector) Sequential blocks No need to worry about head, cylinder, sector Access to non-adjacent blocks Random I/O Access to adjacent blocks Sequential I/O 1 2 3 4... Buffers, Buffer pool Temporary main-memory cache for disk blocks Avoid future read Hide disk latency Most DBMS let users change buffer pool size 23 24 4

Reference Storage review disk guide http://www.storagereview.com/guide2000/ref/ hdd/index.html Files: Main Problem How to store tables into disks? Jane CS 3.7 Susan ME 1.8 June EE 2.6 Tony CS 3.1 25 26 Spanned vs Unspanned Spanned vs Unspanned Q: 512Byte block. 80Byte tuple. How to store? Unspanned Spanned Q: Maximum space waste for unspanned? 27 28 Variable-Length Tuples How do we store them? Reserved Space Reserve the maximum space for each tuple Q: Any problem? 29 30 5

Variable-Length Space Slotted Page R1 R4 R3 R6 Pack tuples tightly Q: How do we know the end of a record? R5 Q: What to do for delete/update? R2 Block R4 R1 Header R3 R2 Free space Q: How can we point to to a tuple? Q: How can we point to a tuple? 31 32 Long Tuples Long Tuples ProductReview( pid INT, reviewer VARCHAR(50), date DATE, rating INT, comments VARCHAR(1000)) Block size 512B How should we store it? 33 Spanning Splitting tuples Block with short attributes. (a) (a) Block with long attrs. (b) (b) (b) This block may also have fixed-length slots. 34 Sequential File Sequencing Tuples Tuples are ordered by certain attribute(s) (search key) Inserting a new tuple Easy case Elaine CS James ME John EE Peter EE Susan CS Tony EE Search key: Name 3.7 2.8 1.8 3.9 1.0 2.4? 35 36 6

Sequencing Tuples Sequencing Tuples Two options 1) Rearrange 2) Linked list Inserting a new tuple Difficult case T9? 37 38 Overflow page Sequencing Tuples header Overflow page T9 Reserving free space to avoid overflow PCTFREE in DBMS CREATE TABLE R(a int) PCTFREE 40 Disk Things to Remember Platter, track, cylinder, sector, block Seek time, rotational delay, transfer time Random I/O vs Sequential I/O Files Spanned/unspanned tuples Variable-length tuples (slotted page) Long tuples Sequential file and search key Problems with insertion (overflow page) PCTFREE 39 40 7