{"action":"closed","issue":{"url":"https://api.github.com/repos/proftpd/proftpd/issues/218","repository_url":"https://api.github.com/repos/proftpd/proftpd","labels_url":"https://api.github.com/repos/proftpd/proftpd/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/proftpd/proftpd/issues/218/comments","events_url":"https://api.github.com/repos/proftpd/proftpd/issues/218/events","html_url":"https://github.com/proftpd/proftpd/issues/218","id":135253950,"number":218,"title":"Use posix_fadvise(), when available, for log files","user":{"login":"Castaglia","id":821749,"avatar_url":"https://avatars.githubusercontent.com/u/821749?v=3","gravatar_id":"","url":"https://api.github.com/users/Castaglia","html_url":"https://github.com/Castaglia","followers_url":"https://api.github.com/users/Castaglia/followers","following_url":"https://api.github.com/users/Castaglia/following{/other_user}","gists_url":"https://api.github.com/users/Castaglia/gists{/gist_id}","starred_url":"https://api.github.com/users/Castaglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Castaglia/subscriptions","organizations_url":"https://api.github.com/users/Castaglia/orgs","repos_url":"https://api.github.com/users/Castaglia/repos","events_url":"https://api.github.com/users/Castaglia/events{/privacy}","received_events_url":"https://api.github.com/users/Castaglia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/proftpd/proftpd/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"Castaglia","id":821749,"avatar_url":"https://avatars.githubusercontent.com/u/821749?v=3","gravatar_id":"","url":"https://api.github.com/users/Castaglia","html_url":"https://github.com/Castaglia","followers_url":"https://api.github.com/users/Castaglia/followers","following_url":"https://api.github.com/users/Castaglia/following{/other_user}","gists_url":"https://api.github.com/users/Castaglia/gists{/gist_id}","starred_url":"https://api.github.com/users/Castaglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Castaglia/subscriptions","organizations_url":"https://api.github.com/users/Castaglia/orgs","repos_url":"https://api.github.com/users/Castaglia/repos","events_url":"https://api.github.com/users/Castaglia/events{/privacy}","received_events_url":"https://api.github.com/users/Castaglia/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-02-21T20:24:27Z","updated_at":"2016-03-20T01:49:49Z","closed_at":"2016-03-20T01:49:49Z","body":"The [`posix_advise`](http://linux.die.net/man/2/posix_fadvise) function, where available, can be used to give hints to the kernel about _expected_ access patterns for a file.  When writing log files, for example, `proftpd` can advise the kernel that the application does **not** expect to read back in the data written out, _e.g._:\r\n\r\n    posix_fadvise(logfd, 0, 0, POSIX_FADV_DONTNEED);\r\n\r\nThis should allow the kernel to *not* keep that data in the buffer cache, freeing up that buffer cache for other uses more rapidly.\r\n\r\nThis would apply to `ExtendedLog`, `TransferLog`, `TraceLog`, and any per-module logging."}}