a problem in CPU affinity
crk_world at yahoo.com.cn
Wed Sep 19 01:57:31 UTC 2012
Yes, I believe it is much better.
On Tue, Sep 18, 2012 at 4:07 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Mon, Sep 17, 2012 at 03:11:33PM +0800, chen cw wrote:
> > Hi,
> > When a worker is down, the master will spawn a new one. However, in case
> > that we enable CPU affinity, the newly created workers will be bound to
> > same CPU, as the CPU which was bound to by the latest worker spawn at the
> > startup or during the reload. This problem still exists in the latest
> > version 1.3.6.
> Yes, thank you for report. Quick and dirty fix would be:
> --- a/src/os/unix/ngx_process_cycle.c
> +++ b/src/os/unix/ngx_process_cycle.c
> @@ -371,6 +371,8 @@ ngx_start_worker_processes(ngx_cycle_t *
> ngx_pass_open_channel(cycle, &ch);
> + cpu_affinity = 0;
> With this patch workers respawn after crashes won't have cpu
> affinity set, which is probably better. It's still not ideal, but
> after all real problem is a worker crash, respawn is just an
> emergency mechanism.
> Maxim Dounin
> nginx-devel mailing list
> nginx-devel at nginx.org
Server Platforms Team at Taobao.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx-devel