Welcome! Log In Create A New Profile

Advanced

Re: Tweak fastcgi_buffer

Maxim Dounin
July 29, 2015 06:00PM
Hello!

On Wed, Jul 29, 2015 at 04:45:31PM -0400, Karl Johnson wrote:

> On Thu, Jul 23, 2015 at 3:21 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> > 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@web ~]# getconf PAGESIZE
> > > 4096
> > > [root@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.
> >
>
> Thanks for the recommendation Maxim. There's no issue setting the buffer to
> 128k when the pagesize is 4k?

No issues, though large buffers imply some memory waste when last
buffer isn't fully used. So usually you should consider some
balance between number of buffers and their size.

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Tweak fastcgi_buffer

Karl Johnson July 22, 2015 05:52PM

Re: Tweak fastcgi_buffer

Maxim Dounin July 23, 2015 03:22PM

Re: Tweak fastcgi_buffer

Karl Johnson July 29, 2015 04:46PM

Re: Tweak fastcgi_buffer

Maxim Dounin July 29, 2015 06:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready