Skip to content

Commit 4ab25d6

Browse files
committed
Documented that directio does not apply to cached files.
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.
1 parent b17afd4 commit 4ab25d6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

xml/en/docs/http/ngx_http_core_module.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@ the <c-def>O_DIRECT</c-def> flag (FreeBSD, Linux),
522522
the <c-def>F_NOCACHE</c-def> flag (macOS),
523523
or the <c-func>directio</c-func> function (Solaris),
524524
when reading files that are larger than or equal to
525-
the specified <value>size</value>.
525+
the specified <value>size</value>
526+
(does not apply to files served from the
527+
<link doc="ngx_http_proxy_module.xml" id="proxy_cache">proxy cache</link>).
526528
The directive automatically disables (0.7.15) the use of
527529
<link id="sendfile"/>
528530
for a given request.

0 commit comments

Comments
 (0)