drupal-with-nginx icon indicating copy to clipboard operation
drupal-with-nginx copied to clipboard

Improving performance when using unix sockets on a single machine

Open haggag opened this issue 10 years ago • 1 comments

The upstream_phpcgi_unix.conf file is using 2 unix sockets (php-fpm.sock and php-fpm-zwei.sock) in the upstream block. Dose it make sense to use load balancing when using unix sockets on a single machine? Wouldn't the load balancing in this case unnecessarily add additional overhead.

If my assumption is correct, what is the best way to use a single unix socket?

  1. Is it to replace all instances of "fastcgi_pass phpcgi" in drupal.conf with "server unix:/var/run/php-fpm.sock"?
  2. Or it's enough to remove the second socket defined in the upstream in upstream_phpcgi_unix.conf?

haggag avatar Aug 10 '14 13:08 haggag

What I do is to remove the line with the zwei one

On Sun, Aug 10, 2014 at 3:20 PM, haggag [email protected] wrote:

The upstream_phpcgi_unix.conf file is using 2 unix sockets (php-fpm.sock and php-fpm-zwei.sock) in the upstream block. Dose it make sense to use load balancing when using unix sockets on a single machine? Wouldn't the load balancing in this case unnecessarily add additional overhead.

If my assumption is correct, what is the best way to use a single unix socket?

  1. Is it to replace all instances of "fastcgi_pass phpcgi" in drupal.conf with "server unix:/var/run/php-fpm.sock"?
  2. Or it's enough to remove the second socket defined in the upstream in upstream_phpcgi_unix.conf?

— Reply to this email directly or view it on GitHub https://github.com/perusio/drupal-with-nginx/issues/177.

rodrigoaguilera avatar Aug 10 '14 15:08 rodrigoaguilera