Local Filesystems (part 2) CPS210 Spring 2006. Papers  Towards Higher Disk Head Utilization: Extracting Free Bandwidth From Busy Disk Drives  Christopher.

Slides:



Advertisements
Similar presentations
COMP375 Computer Architecture and Organization Senior Review.
Advertisements

Overview of Mass Storage Structure
Silberschatz, Galvin and Gagne Operating System Concepts Disk Scheduling Disk IO requests are for blocks, by number Block requests come in an.
1 Parallel Scientific Computing: Algorithms and Tools Lecture #2 APMA 2821A, Spring 2008 Instructors: George Em Karniadakis Leopold Grinberg.
Lecture 8: Memory Hierarchy Cache Performance Kai Bu
Lecture 12 Reduce Miss Penalty and Hit Time
CSE506: Operating Systems Disk Scheduling. CSE506: Operating Systems Key to Disk Performance Don’t access the disk – Whenever possible Cache contents.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
File System Implementation
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
Chapter 12 – Disk Performance Optimization Outline 12.1 Introduction 12.2Evolution of Secondary Storage 12.3Characteristics of Moving-Head Disk Storage.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
Chapter 1 and 2 Computer System and Operating System Overview
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 5 Disks CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
Disks.
Device Management.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed, Nov 9, 2005 Topic: Caches (contd.)
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
SECTIONS 13.1 – 13.3 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin SECONDARY STORAGE MANAGEMENT.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
Disk and I/O Management
CS4432: Database Systems II Data Storage (Better Block Organization) 1.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
1 File System Implementation Operating Systems Hebrew University Spring 2010.
Lecture 11: DMBS Internals
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
External Storage Primary Storage : Main Memory (RAM). Secondary Storage: Peripheral Devices –Disk Drives –Tape Drives Secondary storage is CHEAP. Secondary.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
Chapter 8 External Storage. Primary vs. Secondary Storage Primary storage: Main memory (RAM) Secondary Storage: Peripheral devices  Disk drives  Tape.
CS 153 Design of Operating Systems Spring 2015 Lecture 21: File Systems.
Lecture 3 Page 1 CS 111 Online Disk Drives An especially important and complex form of I/O device Still the primary method of providing stable storage.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Lecture 40: Review Session #2 Reminders –Final exam, Thursday 3:10pm Sloan 150 –Course evaluation (Blue Course Evaluation) Access through.
PARALLEL DATA LABORATORY Carnegie Mellon University Advanced disk scheduling “ Freeblock scheduling” Eno Thereska (slide contributions by Chris Lumb and.
I/O Management and Disk Scheduling Chapter 11. Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and.
Disks and Disk Scheduling Steve Muckle Monday, March 31st Spring 2003.
Local Filesystems (part 1) CPS210 Spring Papers  The Design and Implementation of a Log- Structured File System  Mendel Rosenblum  File System.
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
NUS.SOC.CS5248 Ooi Wei Tsang 1 Course Matters. NUS.SOC.CS5248 Ooi Wei Tsang 2 Make-Up Lecture This Saturday, 23 October TR7, 1-3pm Topic: “CPU scheduling”
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
DMBS Architecture May 15 th, Generic Architecture Query compiler/optimizer Execution engine Index/record mgr. Buffer manager Storage manager storage.
PARALLEL DATA LABORATORY Carnegie Mellon University A framework for implementing IO-bound maintenance applications Eno Thereska.
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
1 Lecture 16: Data Storage Wednesday, November 6, 2006.
Speculative execution Landon Cox April 13, Making disk accesses tolerable Basic idea Remove disk accesses from critical path Transform disk latencies.
Chapter 10: Mass-Storage Systems
Chapter 2: Computer-System Structures
Lecture 16: Data Storage Wednesday, November 6, 2006.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
CSC 4250 Computer Architectures
Disk Scheduling Algorithms
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Research on Disks and Disk Scheduling
Lecture 45 Syed Mansoor Sarwar
Lecture 11: DMBS Internals
Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin
Operating Systems (CS 340 D)
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Disks and scheduling algorithms
Persistence: hard disk drive
Speculative execution and storage
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

Local Filesystems (part 2) CPS210 Spring 2006

Papers  Towards Higher Disk Head Utilization: Extracting Free Bandwidth From Busy Disk Drives  Christopher Lumb  Automatic I/O Generation through Speculative Execution  Fay Chang (Duke, ‘94)

About to read Blue sector

After reading Blue sector After BLUE read

Red request scheduled next After BLUE read

Seek to Red’s track After BLUE readSeek for RED SEEK

Wait for Red sector to reach head After BLUE readSeek for REDRotational latency ROTATESEEK

Read Red sector After BLUE readSeek for REDRotational latencyAfter RED read ROTATESEEK

Freeblock scheduling  Observation  Head passes lots of sectors during rotation  May be can read those sectors for “free”?  Use free bandwidth for background tasks  Don’t wait for long idle periods  Interleave traffic with high priority requests

Rotational latency gap utilization After BLUE read

Seek to third track After BLUE readSeek to Third SEEK

Free transfer After BLUE readSeek to ThirdFree transfer SEEKFREE TRANSFER

Seek to Red’s track After BLUE readSeek to ThirdSeek to REDFree transfer SEEK FREE TRANSFER

Read Red sector After BLUE readSeek to ThirdSeek to REDAfter RED readFree transfer SEEK FREE TRANSFER

Many possible schedules

What information is needed?  Must have detailed info about the disk  t(access) = t(seek) + t(rotate) + t(read)  Current head position  Disk geometry  Cylinders, tracks/cylinder, sectors/track  Disk physics  Seek time, min/max seek, spindle speed  (State machine + cost of transitions)

Freeblock scheduler Foreground Scheduler Request Queue Disk State Machine and Physics Engine Freeblock Scheduler

Freeblock scheduling requirements  Which background apps is this best for?  Low priority  Large sets of desired blocks  No ordering constraints  Small memory working sets  Example apps:  Scanners, layout optimization, prefetching

Feasibility of freeblock scheduling  Impact of disk characteristics  “Random” workload  10,000 requests  4KB requests  Uniform start location  Two reads per write  ~1/3 time in rotation

Feasibility of freeblock scheduling  Impact of workload characteristics More locality, more opportunity Smaller requests increase opportunity

Feasibility of freeblock scheduling  Impact of foreground scheduling algorithm  Four algorithms  First-come-first-served  Circular-LOOK  Shortest-Seek-Time-First  Shortest-Positioning-Time-First  Random, at least 20 outstanding requests

Feasibility of freeblock scheduling  SPTF uses same info as free-BW  Siphons off free-BW  Instead we want  Low positioning delay  High rotational latency  Use SPTF-SWn%

SPTF-SWn%  Compute A via SPTF  Of remaining requests  Compute those within n% of A  Compute B with smallest seek from that set  Schedule B  SPTF = SPTF-SW0%  SSTF=SPTF-SW∞%

SPTF-n% results What is the right balance between foreground performance and free-BW?

Scheduling algorithm  At A, foreground scheduler picks B  r(A, B) = rotational latency from A to B  For each track, t, between A and B  s(t,A,B) = seek time from A to t and t to B  How many reqs under head r(A,B) - s(t,A,B)?  Skip tracks where num reqs < best found  Skip tracks where free BW < best found  Start with source/dst cylinders  Search in ascending s(t,A,B) order

Scheduling algorithm  Best case?  One seek: from A to B  Worst case?  Lots of small requests evenly distributed  Most searches take 0-2.5ms  550MHz PII  Average access time ~ 10ms

How do we deal with disk latency?  Writes?  “Write-behind” buffering  Return to app before data on disk  Reads?  Caching  Prefetching

Prefetching  Basics  Assume most reads are sequential  On request for block at B, also read B+1  Next read depends on last position  Some reads aren’t sequential  Not all that useful for small reads (< block size)  Next read might depend on last content  A wrong guess can hurt performance

SpecHint idea  Generate hints via speculative execution  Want more synchronous cache reads  Use speculation to populate cache  This adds CPU load. Why is that OK?  Processes are stalled during IO (10s of ms)  CPU performances increases exponentially  Disk performance gains are flatter

Assumptions  What assumptions does SpecHint make?  Read data does affect control flow  Damage of stray speculation can be limited  Lots of idle CPU time  Are these reasonable?  Does this make sense for one-disk systems?

Design goals  Correctness  Leave results of transformed app unchanged  Free  Worst-case: < 10% slower  Effective  Increase in cache hits

Generating hints  Want to issue as many hints as possible  Want to issue those hints early  “On track” vs “off track”  Is hint correct?  Might start speculation after each IO stall  Limits speculation to ~ 10ms  Instead always run speculation  Restart when it goes off track

Detecting stray speculation  Maintain a hint log  Original checks hint log before a read  If next entry is null, spec is off track  If next entry is wrong, spec is off track  If next entry matches, spec is on track  If speculative is off track, hit restart  Recopy registers, cancel hints, clear c-o-w  Other ways to detect stray speculation?