{"action":"created","issue":{"url":"https://api.github.com/repos/borgbackup/borg/issues/158","labels_url":"https://api.github.com/repos/borgbackup/borg/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/158/comments","events_url":"https://api.github.com/repos/borgbackup/borg/issues/158/events","html_url":"https://github.com/borgbackup/borg/issues/158","id":101904521,"number":158,"title":"fadvise should be more cautious, to make sure we don't break read-ahead","user":{"login":"sourcejedi","id":14057,"avatar_url":"https://avatars.githubusercontent.com/u/14057?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcejedi","html_url":"https://github.com/sourcejedi","followers_url":"https://api.github.com/users/sourcejedi/followers","following_url":"https://api.github.com/users/sourcejedi/following{/other_user}","gists_url":"https://api.github.com/users/sourcejedi/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcejedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcejedi/subscriptions","organizations_url":"https://api.github.com/users/sourcejedi/orgs","repos_url":"https://api.github.com/users/sourcejedi/repos","events_url":"https://api.github.com/users/sourcejedi/events{/privacy}","received_events_url":"https://api.github.com/users/sourcejedi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-19T14:17:24Z","updated_at":"2015-08-20T14:58:58Z","closed_at":"2015-08-20T03:35:46Z","body":"Researching `fadvise`, GNU dd suggested a possible problem with running DONTNEED on the entire file during reads:\r\n\r\n<pre>\r\n          /* Note we're being careful here to only invalidate what\r\n             we've read, so as not to dump any read ahead cache.  */\r\n#if HAVE_POSIX_FADVISE\r\n            adv_ret = posix_fadvise (fd, input_offset - clen - pending, clen,\r\n                                     POSIX_FADV_DONTNEED);\r\n#else\r\n            errno = ENOTSUP;\r\n#endif\r\n</pre>\r\n\r\nhttp://git.savannah.gnu.org/cgit/coreutils.git/tree/src/dd.c#n1024"},"comment":{"url":"https://api.github.com/repos/borgbackup/borg/issues/comments/133041011","html_url":"https://github.com/borgbackup/borg/issues/158#issuecomment-133041011","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/158","id":133041011,"user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T14:58:58Z","updated_at":"2015-08-20T14:58:58Z","body":"btw, some simple benchmark @pguth made today showed no difference at all in backup speed with and without respecting readahead (== code before and after the change of today).\r\n\r\nbut maybe this is because the drive itself might also do readahead in its internal buffer and thus the readahead of the OS doesn't make a big difference in that simple scenario (there was no other I/O load on the disk)."}}