[PATCH] fadvise(2) system call

Paul Saab ps at mu.org
Thu Nov 10 00:31:56 UTC 2011


On Wed, Nov 9, 2011 at 3:44 PM, Bruce Cran <bruce at cran.org.uk> wrote:
> On 08/11/2011 13:00, John Baldwin wrote:
>>
>> I think it would be fine to add flags to applications like 'tar' to allow
>> users to alter their behavior in specific use cases when it makes sense.
>> However, I think there are more workloads for 'tar' than the ones you are
>> thinking of and we should be hesitant to change applications to use non-
>> default settings.
>
> Someone's done that for GNU tar on Linux, adding a --no-oscache switch:
> http://www.mysqlperformanceblog.com/2010/04/02/fadvise-may-be-not-what-you-expect/

So adding this support is good, but not for general purpose.  It's
really only good when you're pumping gigs of data through tar.  I did
this for libarchive  (plus other work for O_DIRECT reading and
creating the archive) for copying large amounts of data without
impacting a running system.. It worked great for this, but then it
absolutely fails when extracting a tar archive with millions of little
files because of all the sync operations.

Anyway, this is a good option to enable and has very practical uses
out there, but it should be turned on with an option and not on by
default.


More information about the freebsd-arch mailing list