number of nginx worker processes
Nginx unlike Apache and other process per connection webservers. It uses one master process to start and monitor a small number of worker processes that actually handle the connections. My recommendation is to start with the default number of workers, which is 1.
worker_processes 1;
You will only need to increase this if you find that the nginx worker is spending too much time blocked on IO. This will not by until it is serving many hundreds of requests per second.
You may also find these settings useful.
worker_rlimit_nofile 8192;
events {
worker_connections 2048;
use epoll;
}
On SMP systems, at least nCPU worker processes should be started: on quad-core - four etc. That's enougth for proxying.
If you are going to serve some sites with alot of static content, it would be better to add more workers - one per disk.
If your disk subsystem is to poor or load too high, nginx worker processes may become locked on I/O operations and could not serve other requests. In this case you should increase number of worker processes to some suitable value (may be tens), or add some memory for disk cache.
Look into "ps ax" printout: workers that are in "D" state are locked. Increase until get at least nCPU worker processes not blocked.