Tweak fastcgi_buffer

Maxim Dounin mdounin at mdounin.ru
Thu Jul 23 19:21:24 UTC 2015


Hello!

On Wed, Jul 22, 2015 at 05:50:12PM -0400, Karl Johnson wrote:

> Hello,
> 
> I need to tweak fastcgi_buffer to 1m on a website that has heavy requests
> to avoid buffer. If I use a distro with 4096 pagesize, is it better to do
> 256x 4k or 4x 256k?
> 
> [root at web ~]# getconf PAGESIZE
> 4096
> [root at web ~]#
> 
> fastcgi_buffer_size 4k;
> fastcgi_buffers 256 4k;
> 
> OR
> 
> fastcgi_buffer_size 256k;
> fastcgi_buffers 4 256k;

I would recommend the latter.  Or, alternatively, something like

    fastcgi_buffers 8 128k;

Too many small buffers will result in extra processing overhead, 
and it's unlikely to be a good solution.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list