Worker cpu affinity for 8 cores/cpus

Igor Sysoev is at rambler-co.ru
Fri Sep 5 10:58:53 MSD 2008


On Fri, Sep 05, 2008 at 08:49:49AM +0200, Robert Gabriel wrote:

> Hey, as everyone knows, if you have 1-2-4 cpus/cores, you can set the
> worker_cpu_affinity.
> 
> For 2 cores/cpus is like this: worker_cpu_affinity 0101 1010;
> For 4 cores/cpus is like this: worker_cpu_affinity 1000 0100 0010 0001;
> 
> But how about 8 cores/cpus?

worker_cpu_affinity 1st_worker_mask 2nd_worker_mask ... ;

therefore

worker_cpu_affinity  00001111  11110000;

will run first worker on 0-3 CPUS and second worker on 4-7 CPUS.

However, please note that worker_cpu_affinity is currently broken and
it may not work correctly. Recently CPU affinity had appeared in
FreeBSD 7, so I will probably fix it to see how it may affect on perfomance.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list