Seastar
High performance C++ framework for concurrent servers
|
Identifies function calls that are accounted as a group.
A scheduling_group
is a tag that can be used to mark a function call. Executions of such tagged calls are accounted as a group.
#include <seastar/core/scheduling.hh>
Public Member Functions | |
constexpr | scheduling_group () noexcept |
Creates a scheduling_group object denoting the default group. | |
bool | active () const noexcept |
const sstring & | name () const noexcept |
bool | operator== (scheduling_group x) const noexcept |
bool | operator!= (scheduling_group x) const noexcept |
bool | is_main () const noexcept |
template<typename T > | |
T & | get_specific (scheduling_group_key key) noexcept |
void | set_shares (float shares) noexcept |
|
inlinenoexcept |
Returnes a reference to this scheduling group specific value
T | - the type of the scheduling specific type (cannot be deduced) |
key | - the key of the value to retrieve. |
|
noexcept |
Adjusts the number of shares allotted to the group.
Dynamically adjust the number of shares allotted to the group, increasing or decreasing the amount of CPU bandwidth it gets. The adjustment is local to the shard.
This can be used to reduce a background job's interference with a foreground load: the shares can be started at a low value, increased when the background job's backlog increases, and reduced again when the backlog decreases.
shares | number of shares allotted to the group. Use numbers in the 1-1000 range. |