Runtime
cpu id list str
A string the represent a list of CPU IDs.
It could be:
A single CPU ID
CPU ID range in the form <start>-<end>, where start should be less than end.
A list of CPU ID / CPU ID range delimited by ‘,’
cpu set
yaml value seq | str | usize
A CPU_SET(3) for use with sched_setaffinity(2).
The value should be one or a sequence of CPU IDs.
The CPU ID valid can be:
usize: a single CPU ID
string: cpu id list str
unaided runtime config
yaml value: map
This is the config for unaided runtime.
The keys are:
thread_number
optional, type: non-zero usize
Set the total thread number.
default: the number of logic CPU cores alias: threads_total, thread_number_total
thread_number_per_runtime
optional, type: non-zero usize
Set the thread number that each tokio runtime should use.
default: 1, alias: threads_per_runtime
thread_stack_size
optional, type: humanize usize
Set the stack size for worker threads. For <int> value, the unit is bytes.
default: system default
sched_affinity
optional, type: map | bool
Set the sched affinity for each threads.
For map value, the key should be the thread id starting from 0, and the value should be cpu set.
For bool value:
if true
if found any WORKER_<N>_CPU_LIST environment variables
it will set the CPU affinity for that corresponding runtime <N>, the value should be cpu id list str.
otherwise if thread_number_per_runtime is set to 1
a default CPU SET will be set for each thread, the CPU ID in the set will match the thread ID.
if false, no sched affinity will be set, just as if this config option is not present.
default: no sched affinity set
max_io_events_per_tick
optional, type: usize
Configures the max number of events to be processed per tick.
default: 1024, tokio default value