Re: problem about PHP-FPM in TCP socket and Unix socket
| From: | Daniel Fenn | Date: | Fri, 02 Mar 2012 22:41:14 +0000 |
| Subject: | Re: problem about PHP-FPM in TCP socket and Unix socket | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316859@lists.php.net to get a copy of this message | ||
This how I would look at it, if it on the same box use socket, and yes
it is expected that socket is faster than TCP since (as far as I know)
you don't need to deal with the overhead of TCP.
Regards,
Daniel Fenn
On Sat, Mar 3, 2012 at 3:56 AM, Yuchen Wang <phobosw@gmail.com> wrote:
> Hello all,
>
> I am trying to config some new server
>
> All of my servers are using TCP Socket(127.0.0.1:9000) between nginx and
> php-fpm before
>
> But, I run ab(ab -n 20000 -c50 http://192.168.74.130:81/) to
> test the
> performance of Unix Socket and TCP Socket,
> the result is Unix is little better than TCP
>
> Usually we run php and web server in the same server,
> So, TCP socket and Unix socket
> Which method do you prefer ?
>
> Thank you
>
> --
> *Yuchen Wang*