track-aligned extents: matching access patterns to disk drive characteristics j. schindler...

Post on 28-Dec-2015

212 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

TRACK-ALIGNED EXTENTS:MATCHING ACCESS PATTERNS

TO DISK DRIVE CHARACTERISTICS

J. SchindlerJ.-L.GriffinC. R. Lumb

G. R. GangerCarnegie Mellon University

STILL

INCOMPLETE

Key Ideas

• Track-based disk access could improve performance of modern disk drives by up to 50%

• Track boundaries can be detected at a reasonable cost

• This knowledge can be used by existing file systems without creating hardware dependencies

• The technique results significant improvements of application performance

MOTIVATION

• Modern disk drives virtualize their storage space as a “flat array of fixed-size blocks”– Prevents OS from taking into account actual

characteristics of disk drive• Sole feasible optimization technique is

increasing block size– Introduces several problems– Has limited benefits

Increasing block size

Increasing block sizes (cont’d)

• Achieving good disk efficiency requiresvery large blocks:– Only 50% efficiency for random writes with

256K blocks• Aligning blocks with track boundaries achieves

much higher efficiencies: – Best results obtained when block size is

multiple of track size (264KB in example)

TRACK-BASED DISK ACCESS

• Cannot keep increasing disk request sizes because large disk requests– Have higher latency– Require more I/O buffer space– Work best when applications access

sequentially very large files– Require collocation of related small files

Disk characteristics

• Head switches occur anytime a single request accesses blocks that span two tracks– Cause a delay of 0.6 to 1ms– Are not likely to diminish in the near future

• Zero-latency access allows disk firmware to read data blocks in the order they can be read rather than in the requested order

Example

• Disk firmware wants to read sector 200-299

• Disk head located before sector 250

• Firmware will read– Fist sectors 250 to 299– Then sectors 200 to 249

TRACK-AWARE SYSTEM DESIGN

• Locating track boundaries is not easy because– Outer tracks have more sectors than inner tracks– Tracks have spare blocks – Defect handling schemes vary widely among disk

makes and models• Need be performed once

– Defects only appear during first 48 hours of operation

Allocation and access (I)

• To use track boundary information, file system must support variable extents

• Extent-based file systems specify ranges of LBNs allocated to each file (extents)– Should always specify extents that fit track

boundaries

Allocation and access (II)

• Block-based file systems, such as FFS, group LBNs into fixed-size groups of 2n sectors called blocks– Must ensure that blocks will never span track

boundaries– Wastes less than 5% of disk space– This space could still be used for other

purposes

Allocation and access (III)

• Should also– Extend or clip prefetch and write back requests

based on track boundaries– Use disk command queuing to fully take

advantage of zero-latency disks• Current SCSI and IDE/ATA controllers do

not allow out-of-order delivery to or from the host

Prototype implementation

• Prototype includes– Two techniques for detecting track boundaries– A modified version of FreeBSD FFS

Detecting track boundaries (I)

• First technique:– Identifies discontinuities in access efficiency– Could be done by linearly increasing number

of sector in each I/O request– Uses instead binary search algorithm and

tries to predict size of next extent– Still very slow (4 hours for 9GB disk)

Detecting track boundaries (II)

• Second technique:– Specific to SCSI disks– Extract disk information through SCSI

commands– Exploits the regularity of disk geometry– Much faster ( < one minute per disk)– Does not always work when disk mapping

scheme is not knwon

FreeBSD FFS overview

• Each block has– An lblkno (logical block number) specifying its

offset from the beginning of the file– A blkno (physical block number) , which is an

abstract representation of disk addresses used by the OS

• Each blkno corresponds to a range of contiguous disk sector numbers

Free BSD modifications

• Exclude from all allocation decisions all blocks that span track boundaries– Mark them as used in the free block map

• FFS clustered read-ahead algorithm – Accesses runs of blocks between excluded

blocks with a single request• Must still take care of track boundaries

without excluded blocks

Evaluation

• Using – Two disks supporting zero-latency access– Two disks supporting it

• Also used Disksim simulator to simulate disks

Disk performance

• Measured request head time, that is, amount of time that the head is dedicated to a request– Biggest improvements were for disks

supporting zero-delay access• Efficiency improvements of up to 50%• Also reduced standard-deviation of

response times

Other experiments

• With a modified FFS file system– Not that different timings

• With a video server– Track extents resulted in much lower startup

latency at high arrival rates• A log-structured file system

top related