Versions Compared


    • This line was added.
    • This line was removed.
    • Formatting was changed.
    Comment: Published by Scroll Versions from this space and version 7.0-0

    Parameters Affecting the Supervisor Thread Pool Size

    The supervisor thread count is meant to increase to match transient bursts in demand, then decrease again. The 3 parameters which directly influence the number of supervisor threads are:

    Supervisor Thread Pool Size Behavior

    The supervisor_max_threads and supervisor_idle_threads set the upper and lower bounds on the size of the supervisor process pool, while supervisor_max_clients affects the lifespan length of a single supervisor process, which indirectly affects how quickly the process pool shrinks after the burst in demand.


    Setting the supervisor_max_clients to a low value causes the thread count to decrease a bit quicker after a transient demand burst, but at the expense of possibly excessive thread creation - it's a balance between available memory and process creation overhead.

    Spawning a new Supervisor Thread

    When all supervisor processes are tied up doing something (which may be as simple as being blocked behind MySQL the DB performing a long operation) and another request comes in, the main supervisor thread will spawn another thread up to the supervisor_max_threads value.


    When the Thread Pool Remains at the Upper Limit

    When the process count hits the upper bound and stays there for some time is indicative of a performance issue in the supervisor host configuration.