Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is average disk seek time one-third of the full seek time?

I have read in many books and papers, considering disk performance, that the average seek time is roughly one-third of the full seek time, but no one really offers any explanation about that. Where does this come from?

like image 744
nikos Avatar asked Mar 22 '12 18:03

nikos


1 Answers

The average is calculated mathematically using calculus. We use the very basic formula for calculation of average.

Average seek time = (Sum of all possible seek times)/(Total no. of possible seek times)

The disk is assumed to have N number of tracks, so that these are numbered from 1...N The position of the head at any point of time can be anything from 0 to N (inclusive). Let us say that the initial position of the disk head is at track 'x' and the final position of the disk head is at track 'y' , so that x can vary from 0 to N and also, y can vary from 0 to N.

On similar lines as we defined average seek time, we can say that,

Average seek distance = (Sum of all possible seek distances)/(total no. of possible seek distances)

By definition of x and y, Total no. of possible seek distances = N*N and Sum of all possible seek distances = SIGMA(x=0,N) SIGMA(y=0,N) |x-y| = INTEGRAL(x=0,N)INTEGRAL(y=0,N) |x-y| dy dx

To solve this, use the technique of splitting modulus of the expression for y = 0 to x and for y = x to N. Then solve for x = 0 to N.

This comes out to be (N^3)/3.

Avg seek distance = (N^3)/3*N*N = N/3

Average seek time = Avg seek distance / seek rate

If the seek time for the from position 0 to track N takes 't' seconds then seek rate = N/t

Therefore, avg seek time = (N/3)/(N/t) = t/3

Reference:

http://pages.cs.wisc.edu/~remzi/OSFEP/file-disks.pdf Page-9 gives a very good answer to this.

like image 155
mayank_hey Avatar answered Sep 30 '22 20:09

mayank_hey