How to manually set the number of router threads
Hello,
I am running an application using Nginx Unit in Kubernetes environment.
The unit: router process automatically runs in the number of threads, which equals the number of CPU cores on the physical server.
src/nxt_router.c
if (rtcf->threads == 0) {
rtcf->threads = nxt_ncpu;
}
in the code I also found
src/nxt_router.c
static nxt_conf_map_t nxt_router_conf[] = {
{
nxt_string("listeners_threads"),
NXT_CONF_MAP_INT32,
offsetof(nxt_router_conf_t, threads),
},
};
but I was not able to set this from the configuration file
Is it possible to set this value ?
On Sat, 30 Dec 2023 06:46:06 -0800 Paweł B @.***> wrote:
Hello, I am running an application using Nginx Unit in Kubernetes environment. The
unit: routerprocess automatically runs in the number of threads, which equals the number of CPU cores on the physical server.src/nxt_router.c
if (rtcf->threads == 0) { rtcf->threads = nxt_ncpu; }in the code I also found
src/nxt_router.c
static nxt_conf_map_t nxt_router_conf[] = { { nxt_string("listeners_threads"), NXT_CONF_MAP_INT32, offsetof(nxt_router_conf_t, threads), }, };but I was not able to set this from the configuration file
Is it possible to set this value ?
Looks like it isn't currently hooked up to the configuration system...