• Secondary storage device of choice.
  • Main advantage over tapes: random access vs. sequential.
  • Data is stored and retrieved in units called disk blocks or pages.
  • Unlike RAM, time to retrieve a disk page varies depending upon location on disk.

    • Therefore, relative placement of pages on disk has major impact on DBMS performance!

Components of a Disk

  • The platters spin (say, 90rps).
  • The arm assembly is moved in or out to position a head on a desired track. Tracks under heads make a cylinder (imaginary!).
  • Only one head reads/writes at any one time.
  • Block size is a multiple of sector size (which is fixed).

Accessing a Disk Page

  • Time to access (read/write) a disk block:

    • seek time (moving arms to position disk head on track)
    • rotational delay (waiting for block to rotate under head)
    • transfer time (actually moving data to/from disk surface)

  • Seek time and rotational delay dominate.

    • Seek time varies from about 1 to 20msec
    • Rotational delay varies from 0 to 10msec
    • Transfer rate is about 1msec per 4KB page

  • Key to lower I/O cost: reduce seek/rotation delays! Hardware vs. software solutions?

Arranging Pages on Disk

  • `Next’ block concept:

    • blocks on same track, followed by
    • blocks on same cylinder, followed by
    • blocks on adjacent cylinder

  • Blocks in a file should be arranged sequentially on disk (by `next’), to minimize seek and rotational delay.
  • For a sequential scan, pre-fetching several pages at a time is a big win!

You can view the detailed description of this article on:

http://webmasters-forums.com/Disks-Detailed-Introduction-t-610.html

Tags: , ,

Related Posts

This post has No comment. Add your own.

Close
E-mail It