# HG changeset patch # User Egor Nikitin # Date 1370710552 -14400 # Node ID 6d9d4bb571a9cda828d1ba297765a527688ca977 # Parent 488a3f738db02186de377b782bc2bd0eb39954e4 Text review of the ngx_core_module. diff --git a/xml/en/docs/ngx_core_module.xml b/xml/en/docs/ngx_core_module.xml --- a/xml/en/docs/ngx_core_module.xml +++ b/xml/en/docs/ngx_core_module.xml @@ -41,8 +41,8 @@ events { events -If enabled, -accepts of new connections by multiple worker processes will be serialized. +If accept_mutex is enabled, +worker processes will accept new connections by turn. Otherwise, all worker processes will be notified about new connections, and if volume of new connections is low, some of the worker processes may just waste system resources. @@ -64,8 +64,8 @@ requires accept_mutex If is enabled, specifies the maximum time during which a worker process will try to restart accepting new -connections if another worker process is already doing this -currently. +connections if another worker process is currently accepting +new connections. @@ -135,7 +135,7 @@ This directive is used for debugging. When internal error is detected, e.g. the leak of sockets on restart of working processes, enabling debug_points leads to a core file creation (abort) -or stopping a process (stop) for further +or to stopping of a process (stop) for further analysis using a system debugger. @@ -263,8 +263,8 @@ Logging to syslog is available as part o By default, nginx removes all environment variables inherited from its parent process except the TZ variable. -This directive allows to preserve some of the inherited variables, -change their values, or create new environment variables. +This directive allows preserving some of the inherited variables, +changing their values, or creating new environment variables. These variables are then: @@ -274,14 +274,14 @@ of an executable file; -used by the module -ngx_http_perl_module; +used by the +ngx_http_perl_module module; used by worker processes. -Please bear in mind that controlling system libraries in this way -is not always possible as it is not uncommon for libraries to check +One should bear in mind that controlling system libraries in this way +is not always possible as it is common for libraries to check variables only during initialization, well before they can be set using this directive. An exception from this is an above mentioned @@ -293,9 +293,9 @@ of an executable file. -The TZ variable is always inherited and made available to the module -ngx_http_perl_module, -unless configured explicitly. +The TZ variable is always inherited and available to the +ngx_http_perl_module +module, unless it is configured explicitly. @@ -323,7 +323,7 @@ and should not be set directly by the us main -Provides a configuration file context in which the directives that +Provides the configuration file context in which the directives that affect connection processing are specified. @@ -360,7 +360,7 @@ include vhosts/*.conf; nginx uses the locking mechanism to implement -and serialize accesses to shared memory. +and serialize access to shared memory. On most systems the locks are implemented using atomic operations, and this directive is ignored. On other systems the “lock file” mechanism is used. @@ -389,13 +389,13 @@ This directive is intended for nginx dev events -If disabled, a worker process +If multi_accept is disabled, a worker process will accept one new connection at a time. Otherwise, a worker process will accept all new connections at a time. The directive is ignored if -connection processing method is used because it can report +connection processing method is used, because it reports the number of new connections waiting to be accepted. @@ -416,7 +416,7 @@ automatically enables multi_acc Enables or disables the use of “just-in-time compilation” (PCRE JIT) -for regular expressions known at configuration parse time. +for the regular expressions known by the time of configuration parsing. @@ -424,8 +424,8 @@ PCRE JIT can speed up processing of regu The JIT is available in PCRE libraries starting from version 8.20 built with the --enable-jit configuration parameter. -When building the PCRE library with nginx (--with-pcre=), -the JIT support should be enabled with the +When the PCRE library is built with nginx (--with-pcre=), +the JIT support is enabled via the --with-pcre-jit configuration parameter. @@ -466,7 +466,7 @@ Defines the name of the hardware SSL acc Reduces timer resolution in worker processes, thus reducing the number of gettimeofday system calls made. By default, gettimeofday is called each time -on receiving a kernel event. +a kernel event is received. With reduced resolution, gettimeofday is only called once per specified interval. @@ -479,11 +479,11 @@ timer_resolution 100ms; -An internal implementation of interval depends on the method used: +Internal implementation of the interval depends on the method used: -an EVFILT_TIMER filter if kqueue is used; +the EVFILT_TIMER filter if kqueue is used; @@ -508,7 +508,7 @@ an EVFILT_TIMER filter if Specifies the connection processing method to use. -There is normally no need to specify it explicitly because nginx will +There is normally no need to specify it explicitly, because nginx will by default use the most efficient method. @@ -560,11 +560,11 @@ can be opened by a worker process. It should be kept in mind that this number includes all connections -(e.g. connections with proxied servers, among other things), +(e.g. connections with proxied servers, among others), not only connections with clients. Another consideration is that the actual number of simultaneous -connections may not exceed the current limit on -the maximum number of open files that can be changed by +connections can not exceed the current limit on +the maximum number of open files, which can be changed by . @@ -578,7 +578,7 @@ the maximum number of open files that ca Binds worker processes to the sets of CPUs. -Each CPU set is represented by a bitmask of allowed to use CPUs. +Each CPU set is represented by a bitmask of allowed CPUs. There should be a separate set defined for each of the worker processes. By default, worker processes are not bound to any specific CPUs. @@ -614,7 +614,7 @@ The directive is only available on FreeB main -Defines a scheduling priority for worker processes like is +Defines the scheduling priority for worker processes like it is done by the nice command: a negative number means higher priority. @@ -644,7 +644,7 @@ Defines the number of worker processes. The optimal value depends on many factors including (but not limited to) the number of CPU cores, the number of hard disk drives that store data, and load pattern. -When in doubt, setting it to the number of available CPU cores +When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it). @@ -706,7 +706,7 @@ Used to increase the limit without resta main -Defines a current working directory for a worker process. +Defines the current working directory for a worker process. It is primarily used when writing a core-file, in which case a worker process should have write permission for the specified directory. diff --git a/xml/ru/docs/ngx_core_module.xml b/xml/ru/docs/ngx_core_module.xml --- a/xml/ru/docs/ngx_core_module.xml +++ b/xml/ru/docs/ngx_core_module.xml @@ -64,8 +64,8 @@ events { При включённом задаёт максимальное время, в течение которого рабочий процесс вновь попытается начать принимать -новые соединения, если в настоящий момент этим уже занимается другой -рабочий процесс. +новые соединения, если в настоящий момент новые соединения принимает +другой рабочий процесс. @@ -174,9 +174,9 @@ events { Второй параметр определяет уровень лога. -Уровни лога, указанные выше, перечислены в порядке возрастания их серьёзности. +Уровни лога, указанные выше, перечислены в порядке возрастания важности. При установке определённого уровня в лог попадают все сообщения -указанного и более серьёзных уровней. +указанного уровня и уровней большей важности. Например, при стандартном уровне error в лог попадают сообщения уровней error, crit, alert и emerg. @@ -220,7 +220,7 @@ nginx с --with-debug, подобным образом возможно не всегда, поскольку зачастую библиотеки используют переменные только во время инициализации, то есть ещё до того, как их можно задать с помощью данной директивы. -Исключением из этого является вышеописанное +Исключением из этого является упомянутое выше обновление исполняемого файла на лету. @@ -402,7 +402,7 @@ include vhosts/*.conf; чего уменьшается число системных вызовов gettimeofday. По умолчанию gettimeofday вызывается после каждой операции получения событий из ядра. -C уменьшенным разрешением gettimeofday вызывается только +При уменьшении разрешения gettimeofday вызывается только один раз за указанный интервал. @@ -489,7 +489,7 @@ nginx сам выбирает наиболее эффективный метод. events -Задаёт максимальное число соединений, которое одновременно +Задаёт максимальное число соединений, которые одновременно может открыть рабочий процесс.