Github   Telegram
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
components::ManagerControllerComponent Class Referencefinal

Component that prepares the engine internals and starts all the other components. More...

#include <userver/components/manager_controller_component.hpp>

+ Inheritance diagram for components::ManagerControllerComponent:
+ Collaboration diagram for components::ManagerControllerComponent:

Public Member Functions

 ManagerControllerComponent (const components::ComponentConfig &config, const components::ComponentContext &context)
 

Static Public Attributes

static constexpr std::string_view kName = "manager-controller"
 

Detailed Description

Component that prepares the engine internals and starts all the other components.

Dynamic config

Static options:

Name Description Default value
coro_pool.initial_size amount of coroutines to preallocate on startup -
coro_pool.max_size max amount of coroutines to keep preallocated -
coro_pool.stack_size size of a single coroutine 256 * 1024
event_thread_pool.threads number of threads to process low level IO system calls (number of ev loops to start in libev) -
components dictionary of "component name": "options" -
default_task_processor name of the default task processor to use in components -
task_processors.*NAME*.*OPTIONS* dictionary of task processors to create and their options. See description below -

Static task_processor options:

Name Description Default value
guess-cpu-limit guess optimal threads count false
thread_name set OS thread name to this value -
worker_threads threads count for the task processor -
os-scheduling OS scheduling mode for the task processor threads. 'idle' sets the lowest pririty. 'low-priority' sets the priority below 'normal' but higher than 'idle'. normal
task-trace optional dictionary of tracing options empty (disabled)
task-trace.every set N to trace each Nth task 1000
task-trace.max-context-switch-count set upper limit of context switches to trace for a single task 1000
task-trace.logger required name of logger to write traces to, should not be the 'default' logger -

Tips and tricks on task-trace usage are described in Profiling context switches.

Static configuration example:

# yaml
components_manager:
coro_pool:
initial_size: 5000
max_size: 50000
default_task_processor: main-task-processor
event_thread_pool:
threads: 2
task_processors:
bg-task-processor:
thread_name: bg-worker
worker_threads: 2
os-scheduling: idle
task-trace:
every: 1000
max-context-switch-count: 1000
logger: tracer
fs-task-processor:
thread_name: fs-worker
worker_threads: 2
main-task-processor:
thread_name: main-worker
worker_threads: 16
monitor-task-processor:
thread_name: monitor
worker_threads: 2
manager-controller: # Nothing

Definition at line 61 of file manager_controller_component.hpp.

Member Data Documentation

◆ kName

constexpr std::string_view components::ManagerControllerComponent::kName = "manager-controller"
staticconstexpr

Definition at line 68 of file manager_controller_component.hpp.


The documentation for this class was generated from the following file: