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

Detailed Description

Contains parameters configurable from the xrootd config file.

Definition at line 63 of file XrdPfc.hh.

Constructor & Destructor Documentation

◆ Configuration()

Configuration::Configuration ( )

Definition at line 33 of file XrdPfcConfiguration.cc.

33  :
34  m_hdfsmode(false),
36  m_data_space("public"),
37  m_meta_space("public"),
38  m_diskTotalSpace(-1),
39  m_diskUsageLWM(-1),
40  m_diskUsageHWM(-1),
43  m_fileUsageMax(-1),
44  m_purgeInterval(300),
47  m_accHistorySize(20),
48  m_dirStatsInterval(1500),
51  m_bufferSize(128*1024),
54  m_wqueue_blocks(16),
57  m_hdfsbsize(128*1024*1024),
58  m_flushCnt(2000),
59  m_cs_UVKeep(-1),
61  m_cs_ChkTLS(false),
62  m_onlyIfCachedMinSize(1024*1024),
64 {}
@ CSChk_Net
Definition: XrdPfcTypes.hh:27
long long m_hdfsbsize
used with m_hdfsmode, default 128MB
Definition: XrdPfc.hh:115
long long m_RamAbsAvailable
available from configuration
Definition: XrdPfc.hh:109
long long m_flushCnt
nuber of unsynced blcoks on disk before flush is called
Definition: XrdPfc.hh:116
int m_accHistorySize
max number of entries in access history part of cinfo file
Definition: XrdPfc.hh:100
int m_wqueue_threads
number of threads writing blocks to disk
Definition: XrdPfc.hh:112
long long m_diskTotalSpace
total disk space on configured partition or oss space
Definition: XrdPfc.hh:91
long long m_fileUsageMax
cache purge - files usage maximum
Definition: XrdPfc.hh:96
long long m_fileUsageBaseline
cache purge - files usage baseline
Definition: XrdPfc.hh:94
int m_dirStatsStoreDepth
depth to which statistics should be collected
Definition: XrdPfc.hh:106
bool m_allow_xrdpfc_command
flag for enabling access to /xrdpfc-command/ functionality.
Definition: XrdPfc.hh:85
long long m_diskUsageHWM
cache purge - disk usage high water mark
Definition: XrdPfc.hh:93
int m_prefetch_max_blocks
maximum number of blocks to prefetch per file
Definition: XrdPfc.hh:113
bool m_cs_ChkTLS
Allow TLS.
Definition: XrdPfc.hh:120
long long m_fileUsageNominal
cache purge - files usage nominal
Definition: XrdPfc.hh:95
int m_cs_Chk
Checksum check.
Definition: XrdPfc.hh:119
int m_purgeAgeBasedPeriod
peform cold file / uvkeep purge every this many purge cycles
Definition: XrdPfc.hh:99
bool m_hdfsmode
flag for enabling block-level operation
Definition: XrdPfc.hh:84
int m_purgeColdFilesAge
purge files older than this age
Definition: XrdPfc.hh:98
std::string m_data_space
oss space for data files
Definition: XrdPfc.hh:88
long long m_diskUsageLWM
cache purge - disk usage low water mark
Definition: XrdPfc.hh:92
int m_RamKeepStdBlocks
number of standard-sized blocks kept after release
Definition: XrdPfc.hh:110
long long m_bufferSize
prefetch buffer size, default 1MB
Definition: XrdPfc.hh:108
int m_dirStatsInterval
time between resource monitor statistics dump in seconds
Definition: XrdPfc.hh:104
std::string m_meta_space
oss space for metadata files (cinfo)
Definition: XrdPfc.hh:89
int m_wqueue_blocks
maximum number of blocks written per write-queue loop
Definition: XrdPfc.hh:111
double m_onlyIfCachedMinFrac
minimum fraction of downloaded file, used by only-if-cached CGI option
Definition: XrdPfc.hh:123
time_t m_cs_UVKeep
unverified checksum cache keep
Definition: XrdPfc.hh:118
int m_dirStatsMaxDepth
maximum depth for statistics write out
Definition: XrdPfc.hh:105
int m_purgeInterval
sleep interval between cache purges
Definition: XrdPfc.hh:97
long long m_onlyIfCachedMinSize
minumum size of downloaded file, used by only-if-cached CGI option
Definition: XrdPfc.hh:122

Member Function Documentation

◆ are_file_usage_limits_set()

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

Definition at line 67 of file XrdPfc.hh.

67 { return m_fileUsageMax > 0; }

References m_fileUsageMax.

Referenced by XrdPfc::ResourceMonitor::perform_purge_check().

+ 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 80 of file XrdPfc.hh.

80 { 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 73 of file XrdPfc.hh.

73 { 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 68 of file XrdPfc.hh.

68 { return m_purgeColdFilesAge > 0 ; }

References m_purgeColdFilesAge.

Referenced by XrdPfc::ResourceMonitor::perform_purge_check().

+ Here is the caller graph for this function:

◆ is_cschk_any()

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

Definition at line 77 of file XrdPfc.hh.

77 { return m_cs_Chk & CSChk_Both; }
@ CSChk_Both
Definition: XrdPfcTypes.hh:27

References XrdPfc::CSChk_Both, and m_cs_Chk.

◆ is_cschk_both()

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

Definition at line 78 of file XrdPfc.hh.

78 { 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 75 of file XrdPfc.hh.

75 { return m_cs_Chk & CSChk_Cache; }
@ CSChk_Cache
Definition: XrdPfcTypes.hh:27

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 76 of file XrdPfc.hh.

76 { 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 70 of file XrdPfc.hh.

70 { 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:103
std::set< std::string > m_dirStatsDirs
directories for which stat reporting was requested
Definition: XrdPfc.hh:102

References m_dirStatsDirGlobs, m_dirStatsDirs, and m_dirStatsMaxDepth.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::heart_beat().

+ 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 71 of file XrdPfc.hh.

71 { return false; }

◆ is_uvkeep_purge_in_effect()

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

Definition at line 69 of file XrdPfc.hh.

69 { return m_cs_UVKeep >= 0; }

References m_cs_UVKeep.

◆ should_uvkeep_purge()

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

Definition at line 82 of file XrdPfc.hh.

82 { 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 100 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 85 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 108 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 120 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 118 of file XrdPfc.hh.

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

◆ m_data_space

std::string XrdPfc::Configuration::m_data_space

oss space for data files

Definition at line 88 of file XrdPfc.hh.

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

◆ m_dirStatsDirGlobs

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

directory globs for which stat reporting was requested

Definition at line 103 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 102 of file XrdPfc.hh.

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

◆ m_dirStatsInterval

int XrdPfc::Configuration::m_dirStatsInterval

time between resource monitor statistics dump in seconds

Definition at line 104 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_dirStatsMaxDepth

int XrdPfc::Configuration::m_dirStatsMaxDepth

maximum depth for statistics write out

Definition at line 105 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 106 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_diskTotalSpace

long long XrdPfc::Configuration::m_diskTotalSpace

total disk space on configured partition or oss space

Definition at line 91 of file XrdPfc.hh.

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

◆ m_diskUsageHWM

long long XrdPfc::Configuration::m_diskUsageHWM

cache purge - disk usage high water mark

Definition at line 93 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::perform_purge_check().

◆ m_diskUsageLWM

long long XrdPfc::Configuration::m_diskUsageLWM

cache purge - disk usage low water mark

Definition at line 92 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::perform_purge_check().

◆ m_fileUsageBaseline

long long XrdPfc::Configuration::m_fileUsageBaseline

cache purge - files usage baseline

Definition at line 94 of file XrdPfc.hh.

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

◆ m_fileUsageMax

long long XrdPfc::Configuration::m_fileUsageMax

cache purge - files usage maximum

Definition at line 96 of file XrdPfc.hh.

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

◆ m_fileUsageNominal

long long XrdPfc::Configuration::m_fileUsageNominal

cache purge - files usage nominal

Definition at line 95 of file XrdPfc.hh.

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

◆ m_flushCnt

long long XrdPfc::Configuration::m_flushCnt

nuber of unsynced blcoks on disk before flush is called

Definition at line 116 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 115 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 84 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 89 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 123 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 122 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 113 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 99 of file XrdPfc.hh.

Referenced by XrdPfc::ResourceMonitor::heart_beat().

◆ m_purgeColdFilesAge

int XrdPfc::Configuration::m_purgeColdFilesAge

purge files older than this age

Definition at line 98 of file XrdPfc.hh.

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

◆ m_purgeInterval

int XrdPfc::Configuration::m_purgeInterval

sleep interval between cache purges

Definition at line 97 of file XrdPfc.hh.

Referenced by XrdPfc::Cache::Config(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_RamAbsAvailable

long long XrdPfc::Configuration::m_RamAbsAvailable

available from configuration

Definition at line 109 of file XrdPfc.hh.

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

◆ m_RamKeepStdBlocks

int XrdPfc::Configuration::m_RamKeepStdBlocks

number of standard-sized blocks kept after release

Definition at line 110 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 111 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 112 of file XrdPfc.hh.

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


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