Eric Bollengier wrote:
> Hello,
> 
> I've already think about this optimization, the only problem is that the
> posix_fadvise argument isn't a bitwise flag. So you can't mix them like that.

Ok, I digged a bit more on google. I think the correct usage would be to
call POSIX_FADV_SEQUENTIAL before reading the file and DONTNEED after
having read it. (SEQUENTIAL should double the readahead window,DONTNEED
will drop it from the pagecache).

> Perhaps you can call this function multiple times, but the documentation is 
> unclear about this subject.

Since NOREUSE will do something it'll also be "evil" to call before
reading the file. This seems to be the best doc I've found.

http://insights.oetiker.ch/linux/fadvise/

The operations gone through above fits quite well to how the file-daemon
works.

Then I found a link to discussing spool-file fadvises on bacula-devel
over a year ago, but since most backup servers are dedicated this will
only harm bacula itself. And I would expect the kernel to drop the spool
files from memory when they subsequently get truncated anyway.

http://www.mail-archive.com/[email protected]/msg03187.html



-- 
Jesper

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to