llancet:

The easy question first: Bad news--It's a costly operation. Generally, if you're forced to make the heads move, you're talking 5+ milliseconds (and the 5ms is probably a high-end drive).

The good news: Modern drives typically read an entire cylinder at a time, so if your seeks are mostly local, you can often bypass the head motion. (The more platters in your drive, the more information in the cylinder.) So when you preprocess the file, try to arrange things to keep the seek distances small, and you'll have fewer head movements.

When a head motion occurs, it has a trapezoidal motion profile: At the start of the movement, it accelerates to "top speed" which is a constant-time operation. At the end of the movement, it decelerates back to zero speed, which is another constant-time operation. After that, it takes a little time to stabilize the motion and sync up with the servo track. Between the start and end of the movement, the heads travel at a fixed velocity, so the more tracks you cross, the more time it will take. (However, I doubt it matters much, as I believe (no evidence) that the time is dominated by the speed up, slow down and synchronize operations.) (Note: I glossed over a good few details, such as short head movements in which case the speed up never gets to full speed before the heads start slowing down.)

Note: I'm not a hardware manufacturer, though I play one on TV.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


In reply to Re: Efficiency of seek by roboticus
in thread Efficiency of seek by llancet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.