Re: Monitoring disk seeks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Monique Vaz wrote:

I need to compare different applications in terms of the number of
disk seeks they perform.


As far as I know you won't be able to determine the number of seeks as disk drives use logical bock addressing today. Addresses starting at 0 to total number of blocks - 1, so the operating system does not issue seeks it issues reads at a given address for a given read length. The other thing to consider is the fact that Linux has three different IO schedulers http://www.linuxjournal.com/article/6931 to choose from to reorder the actual IO requests to the disk to minimize head movement, so what an application does and what operations make it to the drive do not directly correlate. Looking at the code for these IO schedulers may give clues to what you can monitor.

A logical block address does indeed have a cylinder/head/sector value and on SCSI drives you can do a send receive diagnostic to retrieve the value (don't know about EIDE), but in some cases the drive companies lie about the _actual_ position. I have done this operation on different drives and some give you an algorithmic calculation based on the logical block address and some give you the actual address. It is easy to spot as you don't find missing sector addresses as you would expect from the defect mapping of the disk drive (p-list and g-list entries).

One suggestion I would give is to use strace with the application, collect the data and look at the read/write calls the application makes. A good application will try to do sequential IO instead of random in a file or files as sequential is much faster. Google exploits this fact with their file system ref: http://www.cs.rochester.edu/sosp2003/papers/p125-ghemawat.pdf

Hope this helps!
-Tony

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux