TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler...
-
Upload
ferdinand-johnson -
Category
Documents
-
view
212 -
download
0
Transcript of TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler...
![Page 1: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/1.jpg)
TRACK-ALIGNED EXTENTS:MATCHING ACCESS PATTERNS
TO DISK DRIVE CHARACTERISTICS
J. SchindlerJ.-L.GriffinC. R. Lumb
G. R. GangerCarnegie Mellon University
STILL
INCOMPLETE
![Page 2: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/2.jpg)
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
![Page 3: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/3.jpg)
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
![Page 4: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/4.jpg)
Increasing block size
![Page 5: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/5.jpg)
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)
![Page 6: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/6.jpg)
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
![Page 7: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/7.jpg)
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
![Page 8: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/8.jpg)
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
![Page 9: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/9.jpg)
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
![Page 10: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/10.jpg)
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
![Page 11: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/11.jpg)
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
![Page 12: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/12.jpg)
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
![Page 13: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/13.jpg)
Prototype implementation
• Prototype includes– Two techniques for detecting track boundaries– A modified version of FreeBSD FFS
![Page 14: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/14.jpg)
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)
![Page 15: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/15.jpg)
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
![Page 16: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/16.jpg)
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
![Page 17: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/17.jpg)
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
![Page 18: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/18.jpg)
Evaluation
• Using – Two disks supporting zero-latency access– Two disks supporting it
• Also used Disksim simulator to simulate disks
![Page 19: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/19.jpg)
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
![Page 20: TRACK-ALIGNED EXTENTS: MATCHING ACCESS PATTERNS TO DISK DRIVE CHARACTERISTICS J. Schindler J.-L.Griffin C. R. Lumb G. R. Ganger Carnegie Mellon University.](https://reader036.fdocuments.net/reader036/viewer/2022072013/56649e565503460f94b4e4f0/html5/thumbnails/20.jpg)
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