Setting POSIX_FADV_RANDOM makes no measurable difference, but at least
it's the right thing to do.
POSIX_FADV_WILLNEED makes no measurable difference either.
Changing POSIX_FADV_NOREUSE on the input file descriptor to
POSIX_FADV_DONTNEED slows things down by about 10%.
---
builder/pxzcat-c.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c
index 44722bc..0a1c368 100644
--- a/builder/pxzcat-c.c
+++ b/builder/pxzcat-c.c
@@ -215,6 +215,9 @@ pxzcat (value filenamev, value outputfilev, unsigned nr_threads)
}
guestfs_int_fadvise_noreuse (fd);
+ guestfs_int_fadvise_random (fd);
+ guestfs_int_fadvise_random (ofd);
+ guestfs_int_fadvise_willneed (ofd);
/* Iterate over blocks. */
iter_blocks (idx, nr_threads, filenamev, fd, outputfilev, ofd);
--
2.7.4