blog.phusion.nl
12 Mar '13, 10pm
Tuning Phusion Passenger’s concurrency settings
Memory. More processes implies a higher memory usage. If too much memory is used then the machine will hit swap, which slows everything down. You should only have as many processes as memory limits comfortably allow. Threads use less memory, so prefer threads when possible. You can create tens of threads in place of one process. Number of CPUs. True (hardware) concurrency cannot be higher than the number of CPUs. In theory, if all processes/threads on your system use the CPUs constantly , then: You can increase throughput up to NUMBER_OF_CPUS processes/threads. Increasing the number of processes/threads after that point will increase virtual (software) concurrency, but will not increase true (hardware) concurrency and will not increase maximum throughput. Having more processes than CPUs may decrease total throughput a little thanks to context switching overhead, but the di...
Full article:
http://blog.phusion.nl/2013/03/12/tuning-phusion-passenge...