xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XrdThrottleManager Class Reference

#include <XrdThrottleManager.hh>

Collaboration diagram for XrdThrottleManager:
Collaboration graph
[legend]

Public Member Functions

void Init ()
 
void Apply (int reqsize, int reqops, int uid)
 
bool IsThrottling ()
 
void SetThrottles (float reqbyterate, float reqoprate, int concurrency, float interval_length)
 
void SetLoadShed (std::string &hostname, unsigned port, unsigned frequency)
 
XrdThrottleTimer StartIOTimer ()
 
void PrepLoadShed (const char *opaque, std::string &lsOpaque)
 
bool CheckLoadShed (const std::string &opaque)
 
void PerformLoadShed (const std::string &opaque, std::string &host, unsigned &port)
 
 XrdThrottleManager (XrdSysError *lP, XrdOucTrace *tP)
 
 ~XrdThrottleManager ()
 

Static Public Member Functions

static int GetUid (const char *username)
 

Protected Member Functions

void StopIOTimer (struct timespec)
 

Private Member Functions

void Recompute ()
 
void RecomputeInternal ()
 
int WaitForShares ()
 
void GetShares (int &shares, int &request)
 
void StealShares (int uid, int &reqsize, int &reqops)
 

Static Private Member Functions

static void * RecomputeBootstrap (void *pp)
 

Private Attributes

XrdOucTracem_trace
 
XrdSysErrorm_log
 
XrdSysCondVar m_compute_var
 
float m_interval_length_seconds
 
float m_bytes_per_second
 
float m_ops_per_second
 
int m_concurrency_limit
 
std::vector< int > m_primary_bytes_shares
 
std::vector< int > m_secondary_bytes_shares
 
std::vector< int > m_primary_ops_shares
 
std::vector< int > m_secondary_ops_shares
 
int m_last_round_allocation
 
int m_io_counter
 
struct timespec m_io_wait
 
int m_stable_io_counter
 
struct timespec m_stable_io_wait
 
std::string m_loadshed_host
 
unsigned m_loadshed_port
 
unsigned m_loadshed_frequency
 
int m_loadshed_limit_hit
 

Static Private Attributes

static const int m_max_users
 
static const char * TraceID
 

Friends

class XrdThrottleTimer
 

Constructor & Destructor Documentation

XrdThrottleManager::XrdThrottleManager ( XrdSysError lP,
XrdOucTrace tP 
)
XrdThrottleManager::~XrdThrottleManager ( )
inline

Member Function Documentation

void XrdThrottleManager::Apply ( int  reqsize,
int  reqops,
int  uid 
)
bool XrdThrottleManager::CheckLoadShed ( const std::string &  opaque)
void XrdThrottleManager::GetShares ( int &  shares,
int &  request 
)
private
static int XrdThrottleManager::GetUid ( const char *  username)
static
void XrdThrottleManager::Init ( )
bool XrdThrottleManager::IsThrottling ( )
inline
void XrdThrottleManager::PerformLoadShed ( const std::string &  opaque,
std::string &  host,
unsigned &  port 
)
void XrdThrottleManager::PrepLoadShed ( const char *  opaque,
std::string &  lsOpaque 
)
void XrdThrottleManager::Recompute ( )
private
static void* XrdThrottleManager::RecomputeBootstrap ( void *  pp)
staticprivate
void XrdThrottleManager::RecomputeInternal ( )
private
void XrdThrottleManager::SetLoadShed ( std::string &  hostname,
unsigned  port,
unsigned  frequency 
)
inline
void XrdThrottleManager::SetThrottles ( float  reqbyterate,
float  reqoprate,
int  concurrency,
float  interval_length 
)
inline
XrdThrottleTimer XrdThrottleManager::StartIOTimer ( )
void XrdThrottleManager::StealShares ( int  uid,
int &  reqsize,
int &  reqops 
)
private
void XrdThrottleManager::StopIOTimer ( struct timespec  )
protected
int XrdThrottleManager::WaitForShares ( )
private

Friends And Related Function Documentation

friend class XrdThrottleTimer
friend

Member Data Documentation

float XrdThrottleManager::m_bytes_per_second
private

Referenced by IsThrottling(), and SetThrottles().

XrdSysCondVar XrdThrottleManager::m_compute_var
private
int XrdThrottleManager::m_concurrency_limit
private

Referenced by SetThrottles().

float XrdThrottleManager::m_interval_length_seconds
private

Referenced by SetThrottles().

int XrdThrottleManager::m_io_counter
private
struct timespec XrdThrottleManager::m_io_wait
private
int XrdThrottleManager::m_last_round_allocation
private
unsigned XrdThrottleManager::m_loadshed_frequency
private

Referenced by SetLoadShed().

std::string XrdThrottleManager::m_loadshed_host
private

Referenced by SetLoadShed().

int XrdThrottleManager::m_loadshed_limit_hit
private
unsigned XrdThrottleManager::m_loadshed_port
private

Referenced by SetLoadShed().

XrdSysError* XrdThrottleManager::m_log
private
const int XrdThrottleManager::m_max_users
staticprivate
float XrdThrottleManager::m_ops_per_second
private

Referenced by IsThrottling(), and SetThrottles().

std::vector<int> XrdThrottleManager::m_primary_bytes_shares
private
std::vector<int> XrdThrottleManager::m_primary_ops_shares
private
std::vector<int> XrdThrottleManager::m_secondary_bytes_shares
private
std::vector<int> XrdThrottleManager::m_secondary_ops_shares
private
int XrdThrottleManager::m_stable_io_counter
private
struct timespec XrdThrottleManager::m_stable_io_wait
private
XrdOucTrace* XrdThrottleManager::m_trace
private
const char* XrdThrottleManager::TraceID
staticprivate

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