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?
相关问题
- What is the best way to do a search in a large fil
- In what practical case bool(std::ifstream) != std:
- Lazily Reading a File in D
- aio_write on linux with rtkaio is sometimes long
- DirectoryStream.Filter example for listing files t
相关文章
- How to replace file-access references for a module
- Why is file_get_contents faster than memcache_get?
- Transactionally writing files in Node.js
- Fastest way to create files in C#
- Getting the cluster size of a hard drive (through
- How can I resolve a relative path to absolute path
- What is the difference between `ioToST` and `unsaf
- Reader interface and the Read method in golang
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.