nginx-0.7.7

Igor Sysoev is at rambler-co.ru
Sat May 16 19:57:20 MSD 2009


On Fri, May 15, 2009 at 05:59:02PM +0200, Joe Bofh wrote:

> Why would one use directio vs sendfile? Why would/should they be 
> mutually exclusive?

The main sendfile advantage is that it uses pages of cached files.
directio disables file caching. This example should be corrected as

      sendfile  on;
      directio  4m;

Then files up to 4M would have good chances to be cached in VM.

> --J
> 
> Igor Sysoev wrote:
> 
> > 
> > directio  [off|size]
> > http/server/location level
> > default  off
> > 
> > The directive enables O_DIRECT or F_NOCACHE (Mac OS X) options for
> > files open for reading if their size is bigger than specified in 
> > directive.
> > 
> > Example:
> > 
> >      directio  4m;
> >      sendfile  off;
> 
> -- 
> Posted via http://www.ruby-forum.com/.

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list