Does Posix_fadvise (WILLNEED) make IO slower?

On a CentOS 5.5 machine with Linux kernel version 2.6.18-194.26.1.el5, I noticed that posix_fadvise (WILLNEED) makes reading 60K files much slower than regular IO by almost 200%.

It seems that the actual fadvise call is synchronous, and also delays the scheduling of other threads in the application using data read from files.

Is it possible that the kernel is busy extracting data from disks due to a fadvise call and ends up delaying another scheduled task? This seems to contradict the expected asynchronous election behavior that we expect from accepting a welcome call.

My question is: are there any custom kernel parameters that can be used to provide asynchronous behavior for posix_fadvise (WILLNEED)? Like the increased threads of the IO kernel, page cache?

+6
linux filesystems posix linux-kernel operating-system
source share
1 answer

This was most recently in LKML . This is exactly how it was developed. If you need non-blocking fadvise , do it in another thread.

+7
source share

All Articles