2 messages in ru.sysoev.nginxRe: Buffers, PHP-FastCGI and nginx
FromSent OnAttachments
Phillip B OldhamJun 23, 2008 9:20 am 
Igor SysoevJun 23, 2008 12:29 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Buffers, PHP-FastCGI and nginxActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Jun 23, 2008 12:29:25 pm
List:ru.sysoev.nginx

On Mon, Jun 23, 2008 at 05:20:34PM +0100, Phillip B Oldham wrote:

Am I correct in assuming I'll get the best performance from my nginx+php setup if I: - set PHP's output_buffering to 4096 - set PHP's zlib.output_compression to On

You should turn PHP's zlib.output_compression off.

- set nginx's fastcgi_buffers to the same number of php instances, and to a size of 4k

No, fastcgi_buffers is per connection. For example, if

fastcgi_pass 8 4k;

then each FastCGI connection may use up to 8 buffers.

You should set fastcgi_buffers to correspond to a typical response size.

- set nginx's client_body_buffer_size to 4k

Probably, no. You should set it bigger, something about 64K or 128K to avoid buffering to tempoarary file.

- set nginx to gzip everything if the client accepts it

Yes.