From d1dc7392c2fdad84895c2364fa8b21077289885a Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 5 Feb 2018 16:15:36 +0000 Subject: [PATCH] Open file with O_NOATIME, not O_SYNC O_SYNC is not necessary as we're not doing direct writes to the file. O_NOATIME might give some speed boost. --- src/common/ioutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ioutil.c b/src/common/ioutil.c index 6a8309a..4c1a4bd 100644 --- a/src/common/ioutil.c +++ b/src/common/ioutil.c @@ -85,7 +85,7 @@ int open_and_mmap(const char* filename, int* out_fd, uint64_t *out_size, void ** off64_t size; /* O_DIRECT should not be used with mmap() */ - *out_fd = open(filename, O_RDWR | O_SYNC ); + *out_fd = open(filename, O_RDWR | O_NOATIME ); if (*out_fd < 1) { warn("open(%s) failed: does it exist?", filename);