Welcome! Log In Create A New Profile

Advanced

Re: Auto detect the number of CPU's and set worker_processes

September 17, 2012 09:00AM
On Sep 17, 2012, at 16:46 , Gena Makhomed wrote:

> On 17.09.2012 15:19, Валентин Бартенев wrote:
>
>>> - предлагаю для директивы worker_processes
>>> сделать дополнительный вариант значения: auto
>
>> Уже много раз обсуждали. Простого и единого способа получить количество
>> физических ядер в любой системе - не существует.
>
> на 99.9% используемых систем это можно получить.
> (Linux, FreeBSD, MacOS X, NetBSD, OpenBSD, Solaris, AIX)
>
> а там где нельзя получить - auto может быть равно 1, как и на виндовсе.
>
> по крайней мере, чтобы получить размер L2 cache line
> - тоже не существует простого и единого способа,
> но тем не менее, nginx это всеравно делает, чтобы настроиться
> на максимальную производительность в зависимости от процессора.
>
> nginx-1.3.6\src\core\ngx_cpuinfo.c
> /* auto detect the L2 cache line size of modern and widespread CPUs */
>
> с количеством ядер процессора - ведь полностью аналогичная ситуация.
>
> P.S.
>
> http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine

Проблема не столько в интерфейсе, сколько в том, что эти интерфейсы считают
процессором - отдельное ядро или hyper-thread ?


--
Igor Sysoev
http://nginx.com/support.html

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Auto detect the number of CPU's and set worker_processes

Gena Makhomed September 17, 2012 07:20AM

Re: Auto detect the number of CPU's and set worker_processes

VBart September 17, 2012 08:20AM

Re: Auto detect the number of CPU's and set worker_processes

Gena Makhomed September 17, 2012 08:48AM

Re: Auto detect the number of CPU's and set worker_processes

Igor Sysoev September 17, 2012 09:00AM

Re: Auto detect the number of CPU's and set worker_processes

Gena Makhomed September 17, 2012 12:38PM

Re: Auto detect the number of CPU's and set worker_processes

Igor Sysoev September 17, 2012 01:14PM

Re: Auto detect the number of CPU's and set worker_processes

VBart September 17, 2012 01:28PM

Re: Auto detect the number of CPU's and set worker_processes

Gena Makhomed September 17, 2012 03:00PM

Re: Auto detect the number of CPU's and set worker_processes

VBart September 17, 2012 09:14AM

Re: Auto detect the number of CPU's and set worker_processes

Gena Makhomed September 17, 2012 12:40PM

Re: Auto detect the number of CPU's and set worker_processes

Михаил Монашёв September 17, 2012 03:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready