XRootD
Loading...
Searching...
No Matches
XrdPfc::Configuration Struct Reference

Contains parameters configurable from the xrootd config file. More...

#include <XrdPfc.hh>

+ Collaboration diagram for XrdPfc::Configuration:

Public Member Functions

 Configuration ()
 
bool are_file_usage_limits_set () const
 
void calculate_fractional_usages (long long du, long long fu, double &frac_du, double &frac_fu)
 
bool does_cschk_have_missing_bits (CkSumCheck_e cks_on_file) const
 
CkSumCheck_e get_cs_Chk () const
 
bool is_age_based_purge_in_effect () const
 
bool is_cschk_any () const
 
bool is_cschk_both () const
 
bool is_cschk_cache () const
 
bool is_cschk_net () const
 
bool is_dir_stat_reporting_on () const
 
bool is_purge_plugin_set_up () const
 
bool is_uvkeep_purge_in_effect () const
 
bool should_uvkeep_purge (time_t delta) const
 

Public Attributes

int m_accHistorySize
 max number of entries in access history part of cinfo file
 
bool m_allow_xrdpfc_command
 flag for enabling access to /xrdpfc-command/ functionality.
 
long long m_bufferSize
 prefetch buffer size, default 1MB
 
int m_cs_Chk
 Checksum check.
 
bool m_cs_ChkTLS
 Allow TLS.
 
time_t m_cs_UVKeep
 unverified checksum cache keep
 
std::string m_data_space
 oss space for data files
 
std::set< std::string > m_dirStatsDirGlobs
 directory globs for which stat reporting was requested
 
std::set< std::string > m_dirStatsDirs
 directories for which stat reporting was requested
 
int m_dirStatsMaxDepth
 maximum depth for statistics write out
 
int m_dirStatsStoreDepth
 depth to which statistics should be collected
 
long long m_diskTotalSpace
 total disk space on configured partition or oss space
 
long long m_diskUsageHWM
 cache purge - disk usage high water mark
 
long long m_diskUsageLWM
 cache purge - disk usage low water mark
 
long long m_fileUsageBaseline
 cache purge - files usage baseline
 
long long m_fileUsageMax
 cache purge - files usage maximum
 
long long m_fileUsageNominal
 cache purge - files usage nominal
 
long long m_flushCnt
 nuber of unsynced blcoks on disk before flush is called
 
long long m_hdfsbsize
 used with m_hdfsmode, default 128MB
 
bool m_hdfsmode
 flag for enabling block-level operation
 
std::string m_meta_space
 oss space for metadata files (cinfo)
 
double m_onlyIfCachedMinFrac
 minimum fraction of downloaded file, used by only-if-cached CGI option
 
long long m_onlyIfCachedMinSize
 minumum size of downloaded file, used by only-if-cached CGI option
 
int m_prefetch_max_blocks
 maximum number of blocks to prefetch per file
 
int m_purgeAgeBasedPeriod
 peform cold file / uvkeep purge every this many purge cycles
 
int m_purgeColdFilesAge
 purge files older than this age
 
int m_purgeInterval
 sleep interval between cache purges
 
long long m_RamAbsAvailable
 available from configuration
 
int m_RamKeepStdBlocks
 number of standard-sized blocks kept after release
 
std::string m_username
 username passed to oss plugin
 
int m_wqueue_blocks
 maximum number of blocks written per write-queue loop
 
int m_wqueue_threads
 number of threads writing blocks to disk
 

Detailed Description

Contains parameters configurable from the xrootd config file.

Definition at line 55 of file XrdPfc.hh.

Constructor & Destructor Documentation

◆ Configuration()

Configuration::Configuration ( )

Definition at line 30 of file XrdPfcConfiguration.cc.

30 :
31 m_hdfsmode(false),
33 m_data_space("public"),
34 m_meta_space("public"),
41 m_purgeInterval(300),
47 m_bufferSize(128*1024),
53 m_hdfsbsize(128*1024*1024),
54 m_flushCnt(2000),
55 m_cs_UVKeep(-1),
57 m_cs_ChkTLS(false),
58 m_onlyIfCachedMinSize(1024*1024),
60{}
long long m_hdfsbsize
used with m_hdfsmode, default 128MB
Definition XrdPfc.hh:108
long long m_RamAbsAvailable
available from configuration
Definition XrdPfc.hh:102
long long m_flushCnt
nuber of unsynced blcoks on disk before flush is called
Definition XrdPfc.hh:109
int m_accHistorySize
max number of entries in access history part of cinfo file
Definition XrdPfc.hh:94
int m_wqueue_threads
number of threads writing blocks to disk
Definition XrdPfc.hh:105
long long m_diskTotalSpace
total disk space on configured partition or oss space
Definition XrdPfc.hh:85
long long m_fileUsageMax
cache purge - files usage maximum
Definition XrdPfc.hh:90
long long m_fileUsageBaseline
cache purge - files usage baseline
Definition XrdPfc.hh:88
int m_dirStatsStoreDepth
depth to which statistics should be collected
Definition XrdPfc.hh:99
bool m_allow_xrdpfc_command
flag for enabling access to /xrdpfc-command/ functionality.
Definition XrdPfc.hh:79
long long m_diskUsageHWM
cache purge - disk usage high water mark
Definition XrdPfc.hh:87
int m_prefetch_max_blocks
maximum number of blocks to prefetch per file
Definition XrdPfc.hh:106
bool m_cs_ChkTLS
Allow TLS.
Definition XrdPfc.hh:113
long long m_fileUsageNominal
cache purge - files usage nominal
Definition XrdPfc.hh:89
int m_cs_Chk
Checksum check.
Definition XrdPfc.hh:112
int m_purgeAgeBasedPeriod
peform cold file / uvkeep purge every this many purge cycles
Definition XrdPfc.hh:93
bool m_hdfsmode
flag for enabling block-level operation
Definition XrdPfc.hh:78
int m_purgeColdFilesAge
purge files older than this age
Definition XrdPfc.hh:92
std::string m_data_space
oss space for data files
Definition XrdPfc.hh:82
long long m_diskUsageLWM
cache purge - disk usage low water mark
Definition XrdPfc.hh:86
int m_RamKeepStdBlocks
number of standard-sized blocks kept after release
Definition XrdPfc.hh:103
long long m_bufferSize
prefetch buffer size, default 1MB
Definition XrdPfc.hh:101
std::string m_meta_space
oss space for metadata files (cinfo)
Definition XrdPfc.hh:83
int m_wqueue_blocks
maximum number of blocks written per write-queue loop
Definition XrdPfc.hh:104
double m_onlyIfCachedMinFrac
minimum fraction of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:116
time_t m_cs_UVKeep
unverified checksum cache keep
Definition XrdPfc.hh:111
int m_dirStatsMaxDepth
maximum depth for statistics write out
Definition XrdPfc.hh:98
int m_purgeInterval
sleep interval between cache purges
Definition XrdPfc.hh:91
long long m_onlyIfCachedMinSize
minumum size of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:115

Member Function Documentation

◆ are_file_usage_limits_set()

bool XrdPfc::Configuration::are_file_usage_limits_set ( ) const
inline

Definition at line 59 of file XrdPfc.hh.

59{ return m_fileUsageMax > 0; }

References m_fileUsageMax.

Referenced by XrdPfc::Cache::Purge().

+ Here is the caller graph for this function:

◆ calculate_fractional_usages()

void Configuration::calculate_fractional_usages ( long long  du,
long long  fu,
double &  frac_du,
double &  frac_fu 
)

Definition at line 135 of file XrdPfc.cc.

137{
138 // Calculate fractional disk / file usage and clamp them to [0, 1].
139
140 // Fractional total usage above LWM:
141 // - can be > 1 if usage is above HWM;
142 // - can be < 0 if triggered via age-based-purging.
143 frac_du = (double) (du - m_diskUsageLWM) / (m_diskUsageHWM - m_diskUsageLWM);
144
145 // Fractional file usage above baseline.
146 // - can be > 1 if file usage is above max;
147 // - can be < 0 if file usage is below baseline.
148 frac_fu = (double) (fu - m_fileUsageBaseline) / (m_fileUsageMax - m_fileUsageBaseline);
149
150 frac_du = std::min( std::max( frac_du, 0.0), 1.0 );
151 frac_fu = std::min( std::max( frac_fu, 0.0), 1.0 );
152}

References m_diskUsageHWM, m_diskUsageLWM, m_fileUsageBaseline, and m_fileUsageMax.

Referenced by XrdPfc::Cache::Purge().

+ Here is the caller graph for this function:

◆ does_cschk_have_missing_bits()

bool XrdPfc::Configuration::does_cschk_have_missing_bits ( CkSumCheck_e  cks_on_file) const
inline

Definition at line 74 of file XrdPfc.hh.

74{ return m_cs_Chk & ~cks_on_file; }

References m_cs_Chk.

◆ get_cs_Chk()

CkSumCheck_e XrdPfc::Configuration::get_cs_Chk ( ) const
inline

Definition at line 67 of file XrdPfc.hh.

67{ return (CkSumCheck_e) m_cs_Chk; }

References m_cs_Chk.

◆ is_age_based_purge_in_effect()

bool XrdPfc::Configuration::is_age_based_purge_in_effect ( ) const
inline

Definition at line 60 of file XrdPfc.hh.

60{ return m_purgeColdFilesAge > 0 ; }

References m_purgeColdFilesAge.

Referenced by XrdPfc::Cache::Purge().

+ Here is the caller graph for this function:

◆ is_cschk_any()

bool XrdPfc::Configuration::is_cschk_any ( ) const
inline

Definition at line 71 of file XrdPfc.hh.

71{ return m_cs_Chk & CSChk_Both; }

References XrdPfc::CSChk_Both, and m_cs_Chk.

◆ is_cschk_both()

bool XrdPfc::Configuration::is_cschk_both ( ) const
inline

Definition at line 72 of file XrdPfc.hh.

72{ return (m_cs_Chk & CSChk_Both) == CSChk_Both; }

References XrdPfc::CSChk_Both, and m_cs_Chk.

◆ is_cschk_cache()

bool XrdPfc::Configuration::is_cschk_cache ( ) const
inline

Definition at line 69 of file XrdPfc.hh.

69{ return m_cs_Chk & CSChk_Cache; }
@ CSChk_Cache

References XrdPfc::CSChk_Cache, and m_cs_Chk.

Referenced by XrdPfc::Cache::Config().

+ Here is the caller graph for this function:

◆ is_cschk_net()

bool XrdPfc::Configuration::is_cschk_net ( ) const
inline

Definition at line 70 of file XrdPfc.hh.

70{ return m_cs_Chk & CSChk_Net; }

References XrdPfc::CSChk_Net, and m_cs_Chk.

Referenced by XrdPfc::Cache::Config().

+ Here is the caller graph for this function:

◆ is_dir_stat_reporting_on()

bool XrdPfc::Configuration::is_dir_stat_reporting_on ( ) const
inline

Definition at line 62 of file XrdPfc.hh.

62{ return m_dirStatsMaxDepth >= 0 || ! m_dirStatsDirs.empty() || ! m_dirStatsDirGlobs.empty(); }
std::set< std::string > m_dirStatsDirGlobs
directory globs for which stat reporting was requested
Definition XrdPfc.hh:97
std::set< std::string > m_dirStatsDirs
directories for which stat reporting was requested
Definition XrdPfc.hh:96

References m_dirStatsDirGlobs, m_dirStatsDirs, and m_dirStatsMaxDepth.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

+ Here is the caller graph for this function:

◆ is_purge_plugin_set_up()

bool XrdPfc::Configuration::is_purge_plugin_set_up ( ) const
inline

Definition at line 63 of file XrdPfc.hh.

63{ return false; }

◆ is_uvkeep_purge_in_effect()

bool XrdPfc::Configuration::is_uvkeep_purge_in_effect ( ) const
inline

Definition at line 61 of file XrdPfc.hh.

61{ return m_cs_UVKeep >= 0; }

References m_cs_UVKeep.

Referenced by XrdPfc::Cache::Purge().

+ Here is the caller graph for this function:

◆ should_uvkeep_purge()

bool XrdPfc::Configuration::should_uvkeep_purge ( time_t  delta) const
inline

Definition at line 76 of file XrdPfc.hh.

76{ return m_cs_UVKeep >= 0 && delta > m_cs_UVKeep; }

References m_cs_UVKeep.

Member Data Documentation

◆ m_accHistorySize

int XrdPfc::Configuration::m_accHistorySize

max number of entries in access history part of cinfo file

Definition at line 94 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config().

◆ m_allow_xrdpfc_command

bool XrdPfc::Configuration::m_allow_xrdpfc_command

flag for enabling access to /xrdpfc-command/ functionality.

Definition at line 79 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::Prepare().

◆ m_bufferSize

long long XrdPfc::Configuration::m_bufferSize

prefetch buffer size, default 1MB

Definition at line 101 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), XrdPfc::Cache::ExecuteCommandUrl(), XrdPfc::Cache::ReleaseRAM(), and XrdPfc::Cache::RequestRAM().

◆ m_cs_Chk

int XrdPfc::Configuration::m_cs_Chk

◆ m_cs_ChkTLS

bool XrdPfc::Configuration::m_cs_ChkTLS

Allow TLS.

Definition at line 113 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config().

◆ m_cs_UVKeep

time_t XrdPfc::Configuration::m_cs_UVKeep

unverified checksum cache keep

Definition at line 111 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), is_uvkeep_purge_in_effect(), XrdPfc::Cache::Purge(), and should_uvkeep_purge().

◆ m_data_space

std::string XrdPfc::Configuration::m_data_space

oss space for data files

Definition at line 82 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), XrdPfc::Cache::ExecuteCommandUrl(), and XrdPfc::Cache::Purge().

◆ m_dirStatsDirGlobs

std::set<std::string> XrdPfc::Configuration::m_dirStatsDirGlobs

directory globs for which stat reporting was requested

Definition at line 97 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and is_dir_stat_reporting_on().

◆ m_dirStatsDirs

std::set<std::string> XrdPfc::Configuration::m_dirStatsDirs

directories for which stat reporting was requested

Definition at line 96 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and is_dir_stat_reporting_on().

◆ m_dirStatsMaxDepth

int XrdPfc::Configuration::m_dirStatsMaxDepth

maximum depth for statistics write out

Definition at line 98 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and is_dir_stat_reporting_on().

◆ m_dirStatsStoreDepth

int XrdPfc::Configuration::m_dirStatsStoreDepth

depth to which statistics should be collected

Definition at line 99 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config().

◆ m_diskTotalSpace

long long XrdPfc::Configuration::m_diskTotalSpace

total disk space on configured partition or oss space

Definition at line 85 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::ResourceMonitorHeartBeat().

◆ m_diskUsageHWM

long long XrdPfc::Configuration::m_diskUsageHWM

cache purge - disk usage high water mark

Definition at line 87 of file XrdPfc.hh.

Referenced by calculate_fractional_usages(), XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

◆ m_diskUsageLWM

long long XrdPfc::Configuration::m_diskUsageLWM

cache purge - disk usage low water mark

Definition at line 86 of file XrdPfc.hh.

Referenced by calculate_fractional_usages(), XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

◆ m_fileUsageBaseline

long long XrdPfc::Configuration::m_fileUsageBaseline

cache purge - files usage baseline

Definition at line 88 of file XrdPfc.hh.

Referenced by calculate_fractional_usages(), XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

◆ m_fileUsageMax

long long XrdPfc::Configuration::m_fileUsageMax

cache purge - files usage maximum

Definition at line 90 of file XrdPfc.hh.

Referenced by are_file_usage_limits_set(), calculate_fractional_usages(), and XrdPfc::Cache::Config().

◆ m_fileUsageNominal

long long XrdPfc::Configuration::m_fileUsageNominal

cache purge - files usage nominal

Definition at line 89 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

◆ m_flushCnt

long long XrdPfc::Configuration::m_flushCnt

nuber of unsynced blcoks on disk before flush is called

Definition at line 109 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::File::WriteBlockToDisk().

◆ m_hdfsbsize

long long XrdPfc::Configuration::m_hdfsbsize

used with m_hdfsmode, default 128MB

Definition at line 108 of file XrdPfc.hh.

Referenced by XrdPfc::IOFileBlock::IOFileBlock(), and XrdPfc::Cache::Config().

◆ m_hdfsmode

bool XrdPfc::Configuration::m_hdfsmode

flag for enabling block-level operation

Definition at line 78 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config().

◆ m_meta_space

std::string XrdPfc::Configuration::m_meta_space

oss space for metadata files (cinfo)

Definition at line 83 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::ExecuteCommandUrl().

◆ m_onlyIfCachedMinFrac

double XrdPfc::Configuration::m_onlyIfCachedMinFrac

minimum fraction of downloaded file, used by only-if-cached CGI option

Definition at line 116 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::DecideIfConsideredCached().

◆ m_onlyIfCachedMinSize

long long XrdPfc::Configuration::m_onlyIfCachedMinSize

minumum size of downloaded file, used by only-if-cached CGI option

Definition at line 115 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::DecideIfConsideredCached().

◆ m_prefetch_max_blocks

int XrdPfc::Configuration::m_prefetch_max_blocks

maximum number of blocks to prefetch per file

Definition at line 106 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdOucGetCache().

◆ m_purgeAgeBasedPeriod

int XrdPfc::Configuration::m_purgeAgeBasedPeriod

peform cold file / uvkeep purge every this many purge cycles

Definition at line 93 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Purge().

◆ m_purgeColdFilesAge

int XrdPfc::Configuration::m_purgeColdFilesAge

purge files older than this age

Definition at line 92 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), is_age_based_purge_in_effect(), and XrdPfc::Cache::Purge().

◆ m_purgeInterval

int XrdPfc::Configuration::m_purgeInterval

sleep interval between cache purges

Definition at line 91 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::Purge().

◆ m_RamAbsAvailable

long long XrdPfc::Configuration::m_RamAbsAvailable

available from configuration

Definition at line 102 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), XrdPfc::Cache::Prefetch(), XrdPfc::Cache::RequestRAM(), and XrdPfc::Cache::ResourceMonitorHeartBeat().

◆ m_RamKeepStdBlocks

int XrdPfc::Configuration::m_RamKeepStdBlocks

number of standard-sized blocks kept after release

Definition at line 103 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::ReleaseRAM().

◆ m_username

std::string XrdPfc::Configuration::m_username

◆ m_wqueue_blocks

int XrdPfc::Configuration::m_wqueue_blocks

maximum number of blocks written per write-queue loop

Definition at line 104 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::Cache::ProcessWriteTasks().

◆ m_wqueue_threads

int XrdPfc::Configuration::m_wqueue_threads

number of threads writing blocks to disk

Definition at line 105 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config().


The documentation for this struct was generated from the following files: