Asking for Help on Seeking to End of File

Siddhesh Poyarekar siddhesh.poyarekar@gmail.com
Thu Jun 5 16:13:00 GMT 2014


On 5 June 2014 20:59, Linlin Yan (颜林林) <yanll@mail.cbi.pku.edu.cn> wrote:
> Hi Godmar,
>
> Thank you for your suggestion!
>
> Actually, what the issue affects on our server is a python2-based
> application that is using buffered file I/O functions. In addition, I
> guess there are many other (scientific computing, biological in our
> case) programs also have such problem potentially, since many
> non-computer-science background developers usually use those
> fopen/fseek/fread functions. So, I would like to know what parameters
> of file system and/or storage device could affect the buffered I/O
> behaviour, and I think such tuning on system level could help to solve
> the problem easier.

The lseek value is rounded on the block size boundary, so a file
system with smaller block size will tend to have a smaller residual
read().  The idea there is to buffer the following block so that it is
faster to read from.  Kernel based prefetch in Linux (readahead) seems
to make this redundant, so maybe this buffering is not useful anymore.

Siddhesh
-- 
http://siddhesh.in



More information about the Libc-help mailing list