Welcome! Log In Create A New Profile

Advanced

Re: Client body buffering with FastCGI

Maxim Dounin
February 18, 2011 05:42PM
Hello!

On Fri, Feb 18, 2011 at 03:17:25PM -0500, Maxim Khitrov wrote:

> On Fri, Feb 18, 2011 at 10:28 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > Hello!
> >
> > On Fri, Feb 18, 2011 at 07:43:09AM -0500, Maxim Khitrov wrote:
> >
> > [...]
> >
> >> Here's the information in case you want to see why unix sockets cause
> >> this problem. I don't think you even need to use the specific software
> >> I was trying to configure. Write a 1-line PHP script that saves some
> >> POSTed variable to a file. Then post more than 64 MB of data and see
> >> if it breaks.
> >>
> >> The OS is FreeBSD 7.3-RELEASE-p4 amd64. Nginx 0.8.54 configuration for
> >> AjaXplorer with irrelevant parts removed:
> >
> > [...]
> >
> >>     sendfile on;
> >
> > [...]
> >
> >>             fastcgi_pass unix:/tmp/php.sock;
> >
> > [...]
> >
> > Ok, thanks for info.  I tend to think that it's kernel problem
> > with sendfile(2) and unix sockets.
> >
> > Could you please test if a) not using sendfile (in location in
> > question) resolves the problem and b) not using unix sockets
> > resolves the problem?  Just to make things more clear.
> >
> > I'll try to reproduce this issue here and dig further into it, but
> > unfortunately I'm a bit busy now and it's unlikely to happen
> > anytime soon.
> >
> > Maxim Dounin
>
> Interesting - both a and b solve the problem. I didn't think that
> sendfile would be used to transfer the request to the FastCGI socket,
> but I guess that's where the problem is.

Ok, thanks for testing.

> Which configuration provides more efficient data transfer - sendfile
> on with a TCP socket, or sendfile off with a unix socket?

The speed difference between tcp and unix sockets isn't that huge,
and copyin/copyout overhead without sendfile is likely to be
bigger. Though a) I've never tested and b) disk seeks may be more
important if you in fact hitting disk.

Maxim Dounin

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

Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 09:56AM

Re: Client body buffering with FastCGI

Maxim Dounin February 17, 2011 12:08PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 01:52PM

Re: Client body buffering with FastCGI

Igor Sysoev February 17, 2011 02:42PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 02:42PM

Re: Client body buffering with FastCGI

Igor Sysoev February 17, 2011 02:48PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 17, 2011 02:50PM

Re: Client body buffering with FastCGI

Maxim Dounin February 17, 2011 02:58PM

Re: Client body buffering with FastCGI

Maxim Khitrov February 18, 2011 07:46AM

Re: Client body buffering with FastCGI

Igor Sysoev February 18, 2011 08:48AM

Re: Client body buffering with FastCGI

Maxim Dounin February 18, 2011 10:32AM

Re: Client body buffering with FastCGI

Maxim Khitrov February 18, 2011 03:22PM

Re: Client body buffering with FastCGI

Maxim Dounin February 18, 2011 05:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready