Benchmarking an IO library



Hi there,

I am currently working on an open source IO library for DICOM files.
I have been trying to optimize the reading time, and found something I
do not understand. The first time I am reading a file, the time to
read (as measured with the unix 'time' command) can be around ~24s,
while if I read it back again immediately it can be as low as ~3s.

1. Is this something known ?
2. What is this ?
3. Is there a way to control that from my application (let say I know
the list of files that need to be read next) ?

Thanks
-Mathieu

System: debian/stable, 2.6.18-4-686-bigmem SMP, 4 CPU
and for the disk specs, I copied a section of the output of lshw:

....
*-disk:2
description: SCSI Disk
product: VIRTUAL DISK
vendor: Dell
physical id: 1.0.0
bus info: scsi@6:1.0.0
logical name: /dev/sda
version: 1028
size: 298GB
capacity: 298GB
capabilities: partitioned partitioned:dos
configuration: ansiversion=5
*-volume:0
description: Linux filesystem partition
physical id: 1
bus info: scsi@6:1.0.0,1
logical name: /dev/sda1
capacity: 243MB
capabilities: primary
*-volume:1
description: Linux LVM partition
physical id: 2
bus info: scsi@6:1.0.0,2
logical name: /dev/sda2
capacity: 297GB
capabilities: primary multi
....
.



Relevant Pages

  • Re: error accessing NTFS partition
    ... bus info: scsi@1:0.0.0 ... capabilities: partitioned partitioned:dos ... description: Linux filesystem partition ... capacity: 1466MB ...
    (Ubuntu)
  • Re: early boot lockup with 2.6.23-rc1
    ... capabilities: isa pci pnp apm upgrade shadowing escd cdboot ... bus info: pci@00:01.1 ... capacity: 2016MB ... Linux swap / Solaris partition ...
    (Linux-Kernel)