workers
workers
Multi-processing mode (MPM). Optional; allowed values are none, fork, prefork, and threads. Default is threads. Introduced in version 1.10-beta.
Lets you choose how searchd processes multiple
concurrent requests. The possible values are:
none : All requests will be handled serially, one-by-one. Prior to 1.x, this was the only mode available on Windows.
fork : A new child process will be forked to handle every incoming request.
prefork
: On startup, searchd will pre-fork
a number of worker processes, and pass the incoming requests
to one of those children.
threads : A new thread will be created to handle every incoming request. This is the only mode compatible with RT indexing backend. This is a default value.
Historically, searchd used fork-based model,
which generally performs OK but spends a noticeable amount of CPU
in fork() system call when there's a high amount of (tiny) requests
per second. Prefork mode was implemented to alleviate that; with
prefork, worker processes are basically only created on startup
and re-created on index rotation, somewhat reducing fork() call
pressure.
Threads mode was implemented along with RT backend and is required to use RT indexes. (Regular disk-based indexes work in all the available modes.)
Example:
workers = threads
