I wonder what’s the best practice to prevent or limit disk buffering,
when
using nginx as primary http server (php fcgi). Is it possible to turn it
off
completely?
Athan
I wonder what’s the best practice to prevent or limit disk buffering,
when
using nginx as primary http server (php fcgi). Is it possible to turn it
off
completely?
Athan
On Thu, Oct 18, 2007 at 05:21:50PM +0300, Athan D. wrote:
I wonder what’s the best practice to prevent or limit disk buffering, when
using nginx as primary http server (php fcgi). Is it possible to turn it
off completely?
fastcgi_max_temp_file_size 0;
“Igor S.” [email protected] wrote in message
news:[email protected]…
fastcgi_max_temp_file_size 0;
Thanks Igor!
I assume that is an undocumented option, I couldn’t find it in doc wiki
and
your site. Any downsides using it?
Athan
On Thu, October 18, 2007 17:50, Athan D. wrote:
“Igor S.” [email protected] wrote in message
news:[email protected]…fastcgi_max_temp_file_size 0;
Thanks Igor!
I assume that is an undocumented option, I couldn’t find it in doc wiki
and
your site. Any downsides using it?
I guess that your fastcgi process will be stuck spoon-feeding slow
clients
instead of serving blazingly fast to nginx, which in turn spoon-feeds
the
clients… It defeats the purpose to use nginx as an accelerator.
Fastcgi process are a scarce resource, you want them to be pinpointed as
little as possible by the clients, to serve many short requests, unlike
nginx whose been designed to serve many client in parallel.
If you have to serve big files, serve them with nginx and not directly
by
your PHP application. You can use X-Accel-Redirect for local PHP
generated
content…
On Thu, Oct 18, 2007 at 06:47:59PM +0200, Brice F. wrote:
your site. Any downsides using it?
content…
You are right.
Some addition: if FastCGI response are big enough, but you do not want
to write them to disk, them you may increase nginx buffers:
fastcgi_buffer_size 4k;
fastcgi_buffers 128 4k; # up to 4k + 128 * 4k
fastcgi_max_temp_file_size 0;
These directives is not dcoumented in wiki, however, they has the same
meaning as
http://wiki.codemongers.com/NginxHttpProxyModule#proxy_buffer_size
http://wiki.codemongers.com/NginxHttpProxyModule#proxy_buffers
Thank you both for your responses.
So it’s better to leave disk buffering enabled, maybe I have to trim a
little its settings.
Is there any gain from increasing the number or size of memory buffers?
Currently I have fastcgi_buffer_size 8k and fastcgi_buffers 32 8k.
Athan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs