perusio / drupal-with-nginx

Running Drupal using nginx: an idiosyncratically crafted bleeding edge configuration.
855 stars 246 forks source link

Improving performance when using unix sockets on a single machine #177

Open haggag opened 10 years ago

haggag commented 10 years ago

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?
rodrigoaguilera commented 10 years ago

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

On Sun, Aug 10, 2014 at 3:20 PM, haggag notifications@github.com 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.