You did not provide any configuration snippet for the thread pool you
are
using and only showing partial configuration bits.
I hope the unshown is configured properly…
On Friday 22 January 2016 16:30:38 Anoop A. wrote:
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 ?
[…]
I wouldn’t recommend these settings for everyone. Actually there
are no settings that work for everyone and that’s the reason why
these directives exist and tunable.
Direct IO is questionable if you aren’t serving gigabytes of movies.
You don’t need direct IO and aio if your working data set is less
than the amount of RAM.
“sendfile_max_chunk 512k” with “directio 4m” looks surplus.
Actually the default settings usually work well. So in general it’s
not a good idea to tune anything unless you’re experiencing problems
and fully understand what you’re going to change and why. Also you
need some metrics and/or benchmarks to test your settings, blind
tuning can make the result worse.
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) .
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 S.
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 [email protected]
My use case is mixed mass hosting environment where some vhost may be
serving large files and some may be serving small files and where adding
something like location /video with directio enabled is not practical as
I
being the webhost may not be knowing if the vhost user is serving a
video
etc .
In such cases …do you recommend using something like
file served of size 100m or less use sendfile and anything larger than
100m
( in which case it may have a high chance of being a multimedia file) is
served via directio .
Part of these setting are derived from what I understood is good from
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.