a problem in CPU affinity
chen cw
crk_world at yahoo.com.cn
Wed Sep 19 01:57:31 UTC 2012
Yes, I believe it is much better.
Thank you
On Tue, Sep 18, 2012 at 4:07 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> 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
> the
> > 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
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
--
--
Charles Chen
Software Engineer
Server Platforms Team at Taobao.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120919/7f36db90/attachment.html>
More information about the nginx-devel
mailing list