EF_SLEEP_SPIN_USEC

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
Name
sleep_spin_usec
Default
0
Scope
per-process

Sets the duration in microseconds of sleep after each spin iteration. Currently applies to EPOLL3 epoll_wait only. Enabling the option trades some of the benefits of spinning - latency - for reduction in CPU utilization and power consumption.

Spinning typically reduces latency and jitter substantially, and can also improve throughput. However, in some applications spinning can harm performance; particularly application that have many threads. When spinning is enabled you should normally dedicate a CPU core to each thread that spins.

You can use the EF_*_SPIN options to selectively enable or disable spinning for each API and transport. You can also use the onload_thread_set_spin() extension API to control spinning on a per-thread and per-API basis.