On 2/20/2019 11:19 AM, jes...@krogh.cc wrote:
Note that posix_fadvise() only affects caching and read-ahead at the OS
level. While the use of posix_fadvise() may indeed improve i/o
performance for particular use cases, it is not parallelism and does not
cause multiple user-space threads to be executed in parallel. I believe
that Kern is referring to a multi-threaded approach in the bacula-fd,
where multiple threads are executing in parallel to read and process
files.

Also, I believe that bacula-fd already does make use of posix_fadvise()
Yes, but - it does not deliver the correct pattern. It does it on
open - the time spend in bacula between bopen and read it sub millisecond
leaving the kernel zero time for actually async fetching data for you.


I think I get it now. You are "advising" the OS to read ahead and cache several files before actually opening the first file. This allows the OS to work on caching some of the next files while bacula-fd is concurrently processing the current file. I think that is a great idea and it seems it should be safe enough. Certainly easier than multi-threading the fd, although I still think that multi-threading the fd is more beneficial, since it allows multiple cores to work on the compression and encryption phases in addition to the read-ahead.




_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to