I am trying to measure the I/O speed programmatically from our application. 
I've tried the naïve approach of periodically getting the file size and 
calculating the growth like this (simplified):

speed = (H5File::getFileSize() - H5File::getFreeSpace()) / time_period;

This produces good clean results on Windows but running the same program on 
Linux produces very "jerky" results.
The file size jumps by about 300MB every minute or so, but the reported free 
space is always constant (and very small, about 2 KB), resulting in the 
reported I/O speed of 0 most of the time, jumping to over 100MB/s once a minute 
or so.

I could understand that there may be some caching going on and the cache is 
dumped from time to time. However running iotop on the same machine proves that 
our application writes to the file all the time at a steady rate, suggesting 
that the file size increase jump should be reflected as free space.

So why does getFreeSpace() keep returning a constant value?
Is there a better way of measuring the I/O speed?
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to