Document that directio does not apply to cached files#259
Open
climagabriel wants to merge 1 commit intonginx:mainfrom
Open
Document that directio does not apply to cached files#259climagabriel wants to merge 1 commit intonginx:mainfrom
climagabriel wants to merge 1 commit intonginx:mainfrom
Conversation
Users commonly assume directio takes effect for files served from proxy_cache (the most widespread nginx deployment), and configure it expecting reduced page cache pressure on the cache path. It does not: cached responses are served through buffered I/O regardless of the directive. See nginx/nginx#654 for context.
b2f7e62 to
4ab25d6
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
directioonly works for static content in Nginx. It's by design.So everything we serve from disk cache passes through the page cache and always has.
Motivation
People routinely assume directio applies to cache files, which it currently doesn't. They enable it expecting a decline in page cache pressure or memory pressure and are confused to see no change at all.
Related: nginx/nginx#654. freenginx has since added it — see freenginx 306b71004f29 ("Cache: directio support when reading cache files") and the follow-up 6afd081c554e ("Open file cache: correct directio handling with threads").