High performance C++ framework for concurrent servers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
seastar::fair_group Class Reference

Detailed Description

Group of queues class.

This is a fair group. It's attached by one or mode fair queues. On machines having the big* amount of shards, queues use the group to borrow/lend the needed capacity for requests dispatching.

#include <seastar/core/fair_queue.hh>


struct  config

Public Types

using capacity_t = uint64_t
using clock_type = std::chrono::steady_clock
using rate_resolution = std::milli
using token_bucket_t = internal::shared_token_bucket< capacity_t, rate_resolution, internal::capped_release::yes >

Public Member Functions

auto capacity_duration (capacity_t cap) const noexcept
 fair_group (config cfg, unsigned nr_queues)
 fair_group (fair_group &&)=delete
fair_queue_ticket cost_capacity () const noexcept
capacity_t maximum_capacity () const noexcept
capacity_t per_tick_grab_threshold () const noexcept
capacity_t grab_capacity (capacity_t cap) noexcept
clock_type::time_point replenished_ts () const noexcept
void release_capacity (capacity_t cap) noexcept
void replenish_capacity (clock_type::time_point now) noexcept
void maybe_replenish_capacity (clock_type::time_point &local_ts) noexcept
capacity_t capacity_deficiency (capacity_t from) const noexcept
capacity_t ticket_capacity (fair_queue_ticket ticket) const noexcept
std::chrono::duration< double > rate_limit_duration () const noexcept

Static Public Member Functions

static double capacity_tokens (capacity_t cap) noexcept

Static Public Attributes

static constexpr float fixed_point_factor = float(1 << 24)

Class Documentation

◆ seastar::fair_group::config

struct seastar::fair_group::config
Class Members
sstring label
unsigned limit_min_size
unsigned limit_min_weight
unsigned min_size
unsigned min_weight
float rate_factor
duration< double > rate_limit_duration
unsigned long size_rate
unsigned long weight_rate

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