/* global options */
struct global global = {
.hard_stop_after = TICK_ETERNITY,
- .nbproc = 1,
.numa_cpu_mapping = 1,
.nbthread = 0,
.req_count = 0,
exit(1);
}
- /* recompute the amount of per-process memory depending on nbproc and
- * the shared SSL cache size (allowed to exist in all processes).
+ /* recompute the amount of per-process memory depending on
+ * the shared SSL cache size
*/
if (global.rlimit_memmax_all) {
#if defined (USE_OPENSSL) && !defined(USE_PRIVATE_CACHE)
int64_t ssl_cache_bytes = global.tune.sslcachesize * 200LL;
global.rlimit_memmax =
- ((((int64_t)global.rlimit_memmax_all * 1048576LL) -
- ssl_cache_bytes) / global.nbproc +
+ ((((int64_t)global.rlimit_memmax_all * 1048576LL) - ssl_cache_bytes) +
ssl_cache_bytes + 1048575LL) / 1048576LL;
#else
- global.rlimit_memmax = global.rlimit_memmax_all / global.nbproc;
+ global.rlimit_memmax = global.rlimit_memmax_all;
#endif
}
global.mode &= ~(MODE_DAEMON | MODE_QUIET);
}
- if ((global.nbproc > 1) && !(global.mode & (MODE_DAEMON | MODE_MWORKER))) {
- if (!(global.mode & (MODE_FOREGROUND | MODE_DEBUG)))
- ha_warning("<nbproc> is only meaningful in daemon mode or master-worker mode. Setting limit to 1 process.\n");
- global.nbproc = 1;
- }
-
- if (global.nbproc < 1)
- global.nbproc = 1;
-
if (global.nbthread < 1)
global.nbthread = 1;
} else {
/* wait mode */
- global.nbproc = 1;
in_parent = 1;
}
if (!ssl_shctx && global.tune.sslcachesize) {
alloc_ctx = shctx_init(&ssl_shctx, global.tune.sslcachesize,
sizeof(struct sh_ssl_sess_hdr) + SHSESS_BLOCK_MIN_SIZE, -1,
- sizeof(*sh_ssl_sess_tree),
- ((global.nbthread > 1) || (!global_ssl.private_cache && (global.nbproc > 1))) ? 1 : 0);
+ sizeof(*sh_ssl_sess_tree), (global.nbthread > 1));
if (alloc_ctx <= 0) {
if (alloc_ctx == SHCTX_E_INIT_LOCK)
ha_alert("Unable to initialize the lock for the shared SSL session cache. You can retry using the global statement 'tune.ssl.force-private-cache' but it could increase CPU usage due to renegotiations if nbproc > 1.\n");
[INF_VERSION] = { .name = "Version", .desc = "Product version" },
[INF_RELEASE_DATE] = { .name = "Release_date", .desc = "Date of latest source code update" },
[INF_NBTHREAD] = { .name = "Nbthread", .desc = "Number of started threads (global.nbthread)" },
- [INF_NBPROC] = { .name = "Nbproc", .desc = "Number of started worker processes (global.nbproc)" },
+ [INF_NBPROC] = { .name = "Nbproc", .desc = "Number of started worker processes (historical, always 1)" },
[INF_PROCESS_NUM] = { .name = "Process_num", .desc = "Relative worker process number (1..Nbproc)" },
[INF_PID] = { .name = "Pid", .desc = "This worker process identifier for the system" },
[INF_UPTIME] = { .name = "Uptime", .desc = "How long ago this worker process was started (days+hours+minutes+seconds)" },
(appctx->ctx.stats.flags & STAT_SHNODE) ? (uri->node ? uri->node : global.node) : "",
(appctx->ctx.stats.flags & STAT_SHDESC) ? ": " : "",
(appctx->ctx.stats.flags & STAT_SHDESC) ? (uri->desc ? uri->desc : global.desc) : "",
- pid, relative_pid, global.nbproc, global.nbthread,
+ pid, relative_pid, 1, global.nbthread,
up / 86400, (up % 86400) / 3600,
(up % 3600) / 60, (up % 60),
global.rlimit_memmax ? ultoa(global.rlimit_memmax) : "unlimited",
info[INF_RELEASE_DATE] = mkf_str(FO_PRODUCT|FN_OUTPUT|FS_SERVICE, haproxy_date);
info[INF_NBTHREAD] = mkf_u32(FO_CONFIG|FS_SERVICE, global.nbthread);
- info[INF_NBPROC] = mkf_u32(FO_CONFIG|FS_SERVICE, global.nbproc);
+ info[INF_NBPROC] = mkf_u32(FO_CONFIG|FS_SERVICE, 1);
info[INF_PROCESS_NUM] = mkf_u32(FO_KEY, relative_pid);
info[INF_PID] = mkf_u32(FO_STATUS, pid);