directio sendfile aio

Anoop Alias anoopalias01 at gmail.com
Fri Jan 22 11:00:38 UTC 2016


I think the weird issue I mentioned had something to do with ngx_pagespeed
with a memcached backed and memcached was not running . It is working fine
with memcached now running .

Somehow the sendfile and directio setting was affecting that. as I
mentioned the issue fixed with enabling either sendfile and directio on
with memcached not running (I think pagespeed falls back to a file based
cache if memcached is not running) .

Right now with

sendfile on;
sendfile_max_chunk 512k;
aio threads=iopool;
directio 4m;

and memcached running ;I dont see any issues .

if memcached is not running (used by pagespeed) and the above setting
produce weird errors that goes away if directio and sendfile is used in a
mutually exclusive fashion.



#########
the book is NGINX High Performance
By Rahul Sharma

You can check the exact section in page #53 available in google books as a
sample.
#########

So the setting

sendfile on;
sendfile_max_chunk 512k;
aio threads=iopool;   #thread_pool iopool is defined in the main context
directio 4m;


is good ?


On Fri, Jan 22, 2016 at 3:35 PM, Valentin V. Bartenev <vbart at nginx.com>
wrote:

> On Friday 22 January 2016 14:38:13 Anoop Alias wrote:
> > From an nginx book i read setting
> >
>
> What's the name of the book?
>
>
> > ###########
> > http {
> >
> > sendfile on;
> > sendfile_max_chunk 512k;
> > aio threads=default;
> > directio 4m;
> > ############
> >
> > is good as it use (if i understand it correctly)
>
> In some specific use case scenarios these settings can be good.
>
>
> >
> > sendfile for files less than 4m and directio for files larger than 4m
> >
> > But the above config is causing issues like static css files images etc
> not
> > being served. I am not sure what exactly is the issue But commenting out
> >
> > directio from the above fix it or commenting out sendfile fix it .
> >
> > But adding them both creates a mess.
> >
> > The question is is the above combination valid and if yes what might be
> > causing  the issue .
> >
>
> Could you provide the full configuration and a debug log
> (see http://nginx.org/en/docs/debugging_log.html)?
>
> I'm unable to reproduce any issues on a simple configuration
> example with the settings above.
>
>   wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
*Anoop P Alias*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160122/99d21392/attachment.html>


More information about the nginx mailing list