Date: Mon, 14 Nov 2011 11:32:49 -0500 From: John Baldwin <jhb@freebsd.org> To: Bruce Cran <bruce@cran.org.uk> Cc: arch@freebsd.org, Ed Schouten <ed@80386.nl>, Alfred Perlstein <alfred@freebsd.org>, Jilles Tjoelker <jilles@stack.nl>, freebsd-arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call Message-ID: <201111141132.49616.jhb@freebsd.org> In-Reply-To: <4EBB104F.5010000@cran.org.uk> References: <201110281426.00013.jhb@freebsd.org> <201111080800.32717.jhb@freebsd.org> <4EBB104F.5010000@cran.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, November 09, 2011 6:44:15 pm Bruce Cran 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/ > . I think this would be a fine extension to add. You could do it just by using O_DIRECT though, no need for fadvise(). (FADV_NOREUSE effectively forces O_DIRECT on, so if you want to use it for the entire file, you can just use O_DIRECT). However, the application should be very careful to only read full FS blocks on block-aligned boundaries (using fs_bsize from stat) to avoid excessive I/O operations. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111141132.49616.jhb>