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
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
 cache block size, default 128 kB
bool m_cgi_blocksize_allowed = false
 allow cgi setting of blocksize
long long m_cgi_max_bufferSize = 0
 max buffer size allowed in pfc.blocksize
int m_cgi_max_prefetch_max_blocks = 0
 max prefetch block count allowed in pfc.prefetch
long long m_cgi_min_bufferSize = 0
 min buffer size allowed in pfc.blocksize
int m_cgi_min_prefetch_max_blocks = 0
 min prefetch block count allowed in pfc.prefetch
bool m_cgi_prefetch_allowed = false
 allow cgi setting of prefetch
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_dirStatsInterval
 time between resource monitor statistics dump in seconds
int m_dirStatsStoreDepth
 maximum depth for statistics write out
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
bool m_httpcc
 enable http cache control
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
 default 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
bool m_qfsredir
 redirect file system query to the origin
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
bool m_write_through
 flag indicating write-through mode is enabled

Static Public Attributes

static constexpr long long s_max_bufferSize = 512 * 1024 * 1024
static constexpr int s_max_prefetch_max_blocks = 4096
static constexpr long long s_min_bufferSize = 4 * 1024

Detailed Description

Contains parameters configurable from the xrootd config file.

Definition at line 65 of file XrdPfc.hh.

Constructor & Destructor Documentation

◆ Configuration()

Configuration::Configuration ( )

Definition at line 33 of file XrdPfcConfiguration.cc.

33 :
34 m_write_through(false),
35 m_hdfsmode(false),
37 m_data_space("public"),
38 m_meta_space("public"),
45 m_purgeInterval(300),
51 m_bufferSize(128*1024),
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 m_httpcc(false),
65 m_qfsredir(true)
66{}
long long m_hdfsbsize
used with m_hdfsmode, default 128MB
Definition XrdPfc.hh:124
long long m_RamAbsAvailable
available from configuration
Definition XrdPfc.hh:111
long long m_flushCnt
nuber of unsynced blcoks on disk before flush is called
Definition XrdPfc.hh:125
int m_accHistorySize
max number of entries in access history part of cinfo file
Definition XrdPfc.hh:103
bool m_httpcc
enable http cache control
Definition XrdPfc.hh:139
int m_wqueue_threads
number of threads writing blocks to disk
Definition XrdPfc.hh:114
bool m_write_through
flag indicating write-through mode is enabled
Definition XrdPfc.hh:86
long long m_diskTotalSpace
total disk space on configured partition or oss space
Definition XrdPfc.hh:94
long long m_fileUsageMax
cache purge - files usage maximum
Definition XrdPfc.hh:99
long long m_fileUsageBaseline
cache purge - files usage baseline
Definition XrdPfc.hh:97
int m_dirStatsStoreDepth
maximum depth for statistics write out
Definition XrdPfc.hh:108
bool m_allow_xrdpfc_command
flag for enabling access to /xrdpfc-command/ functionality.
Definition XrdPfc.hh:88
long long m_diskUsageHWM
cache purge - disk usage high water mark
Definition XrdPfc.hh:96
int m_prefetch_max_blocks
default maximum number of blocks to prefetch per file
Definition XrdPfc.hh:115
bool m_cs_ChkTLS
Allow TLS.
Definition XrdPfc.hh:129
long long m_fileUsageNominal
cache purge - files usage nominal
Definition XrdPfc.hh:98
int m_cs_Chk
Checksum check.
Definition XrdPfc.hh:128
int m_purgeAgeBasedPeriod
peform cold file / uvkeep purge every this many purge cycles
Definition XrdPfc.hh:102
bool m_qfsredir
redirect file system query to the origin
Definition XrdPfc.hh:140
bool m_hdfsmode
flag for enabling block-level operation
Definition XrdPfc.hh:87
int m_purgeColdFilesAge
purge files older than this age
Definition XrdPfc.hh:101
std::string m_data_space
oss space for data files
Definition XrdPfc.hh:91
long long m_diskUsageLWM
cache purge - disk usage low water mark
Definition XrdPfc.hh:95
int m_RamKeepStdBlocks
number of standard-sized blocks kept after release
Definition XrdPfc.hh:112
long long m_bufferSize
cache block size, default 128 kB
Definition XrdPfc.hh:110
int m_dirStatsInterval
time between resource monitor statistics dump in seconds
Definition XrdPfc.hh:107
std::string m_meta_space
oss space for metadata files (cinfo)
Definition XrdPfc.hh:92
int m_wqueue_blocks
maximum number of blocks written per write-queue loop
Definition XrdPfc.hh:113
double m_onlyIfCachedMinFrac
minimum fraction of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:132
time_t m_cs_UVKeep
unverified checksum cache keep
Definition XrdPfc.hh:127
int m_purgeInterval
sleep interval between cache purges
Definition XrdPfc.hh:100
long long m_onlyIfCachedMinSize
minumum size of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:131

References XrdPfc::CSChk_Net, m_accHistorySize, m_allow_xrdpfc_command, m_bufferSize, m_cs_Chk, m_cs_ChkTLS, m_cs_UVKeep, m_data_space, m_dirStatsInterval, m_dirStatsStoreDepth, m_diskTotalSpace, m_diskUsageHWM, m_diskUsageLWM, m_fileUsageBaseline, m_fileUsageMax, m_fileUsageNominal, m_flushCnt, m_hdfsbsize, m_hdfsmode, m_httpcc, m_meta_space, m_onlyIfCachedMinFrac, m_onlyIfCachedMinSize, m_prefetch_max_blocks, m_purgeAgeBasedPeriod, m_purgeColdFilesAge, m_purgeInterval, m_qfsredir, m_RamAbsAvailable, m_RamKeepStdBlocks, m_wqueue_blocks, m_wqueue_threads, and m_write_through.

Member Function Documentation

◆ are_file_usage_limits_set()

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

Definition at line 69 of file XrdPfc.hh.

69{ 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 82 of file XrdPfc.hh.

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

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

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

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

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

77{ return m_cs_Chk & CSChk_Cache; }
@ CSChk_Cache

References XrdPfc::CSChk_Cache, and m_cs_Chk.

◆ is_cschk_net()

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

Definition at line 78 of file XrdPfc.hh.

78{ return m_cs_Chk & CSChk_Net; }

References XrdPfc::CSChk_Net, and m_cs_Chk.

◆ is_dir_stat_reporting_on()

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

Definition at line 72 of file XrdPfc.hh.

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

References m_dirStatsDirGlobs, m_dirStatsDirs, and m_dirStatsStoreDepth.

Referenced by 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 73 of file XrdPfc.hh.

73{ return false; }

◆ is_uvkeep_purge_in_effect()

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

Definition at line 71 of file XrdPfc.hh.

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

84{ 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 103 of file XrdPfc.hh.

Referenced by Configuration(), and 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 88 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_bufferSize

long long XrdPfc::Configuration::m_bufferSize

cache block size, default 128 kB

Definition at line 110 of file XrdPfc.hh.

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

◆ m_cgi_blocksize_allowed

bool XrdPfc::Configuration::m_cgi_blocksize_allowed = false

allow cgi setting of blocksize

Definition at line 121 of file XrdPfc.hh.

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

◆ m_cgi_max_bufferSize

long long XrdPfc::Configuration::m_cgi_max_bufferSize = 0

max buffer size allowed in pfc.blocksize

Definition at line 118 of file XrdPfc.hh.

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

◆ m_cgi_max_prefetch_max_blocks

int XrdPfc::Configuration::m_cgi_max_prefetch_max_blocks = 0

max prefetch block count allowed in pfc.prefetch

Definition at line 120 of file XrdPfc.hh.

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

◆ m_cgi_min_bufferSize

long long XrdPfc::Configuration::m_cgi_min_bufferSize = 0

min buffer size allowed in pfc.blocksize

Definition at line 117 of file XrdPfc.hh.

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

◆ m_cgi_min_prefetch_max_blocks

int XrdPfc::Configuration::m_cgi_min_prefetch_max_blocks = 0

min prefetch block count allowed in pfc.prefetch

Definition at line 119 of file XrdPfc.hh.

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

◆ m_cgi_prefetch_allowed

bool XrdPfc::Configuration::m_cgi_prefetch_allowed = false

allow cgi setting of prefetch

Definition at line 122 of file XrdPfc.hh.

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

◆ m_cs_Chk

int XrdPfc::Configuration::m_cs_Chk

◆ m_cs_ChkTLS

bool XrdPfc::Configuration::m_cs_ChkTLS

Allow TLS.

Definition at line 129 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_cs_UVKeep

time_t XrdPfc::Configuration::m_cs_UVKeep

unverified checksum cache keep

Definition at line 127 of file XrdPfc.hh.

Referenced by Configuration(), 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 91 of file XrdPfc.hh.

Referenced by Configuration(), 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 106 of file XrdPfc.hh.

Referenced by 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 105 of file XrdPfc.hh.

Referenced by is_dir_stat_reporting_on().

◆ m_dirStatsInterval

int XrdPfc::Configuration::m_dirStatsInterval

time between resource monitor statistics dump in seconds

Definition at line 107 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_dirStatsStoreDepth

int XrdPfc::Configuration::m_dirStatsStoreDepth

maximum depth for statistics write out

Definition at line 108 of file XrdPfc.hh.

Referenced by Configuration(), XrdPfc::ResourceMonitor::heart_beat(), and is_dir_stat_reporting_on().

◆ m_diskTotalSpace

long long XrdPfc::Configuration::m_diskTotalSpace

total disk space on configured partition or oss space

Definition at line 94 of file XrdPfc.hh.

Referenced by Configuration(), and Proto_ResourceMonitorHeartBeat().

◆ m_diskUsageHWM

long long XrdPfc::Configuration::m_diskUsageHWM

cache purge - disk usage high water mark

Definition at line 96 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::ResourceMonitor::perform_purge_check().

◆ m_diskUsageLWM

long long XrdPfc::Configuration::m_diskUsageLWM

cache purge - disk usage low water mark

Definition at line 95 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::ResourceMonitor::perform_purge_check().

◆ m_fileUsageBaseline

long long XrdPfc::Configuration::m_fileUsageBaseline

cache purge - files usage baseline

Definition at line 97 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_fileUsageMax

long long XrdPfc::Configuration::m_fileUsageMax

cache purge - files usage maximum

Definition at line 99 of file XrdPfc.hh.

Referenced by Configuration(), and are_file_usage_limits_set().

◆ m_fileUsageNominal

long long XrdPfc::Configuration::m_fileUsageNominal

cache purge - files usage nominal

Definition at line 98 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_flushCnt

long long XrdPfc::Configuration::m_flushCnt

nuber of unsynced blcoks on disk before flush is called

Definition at line 125 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_hdfsbsize

long long XrdPfc::Configuration::m_hdfsbsize

used with m_hdfsmode, default 128MB

Definition at line 124 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::IOFileBlock::IOFileBlock().

◆ m_hdfsmode

bool XrdPfc::Configuration::m_hdfsmode

flag for enabling block-level operation

Definition at line 87 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_httpcc

bool XrdPfc::Configuration::m_httpcc

enable http cache control

Definition at line 139 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_meta_space

std::string XrdPfc::Configuration::m_meta_space

oss space for metadata files (cinfo)

Definition at line 92 of file XrdPfc.hh.

Referenced by Configuration(), 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 132 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_onlyIfCachedMinSize

long long XrdPfc::Configuration::m_onlyIfCachedMinSize

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

Definition at line 131 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_prefetch_max_blocks

int XrdPfc::Configuration::m_prefetch_max_blocks

default maximum number of blocks to prefetch per file

Definition at line 115 of file XrdPfc.hh.

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

◆ m_purgeAgeBasedPeriod

int XrdPfc::Configuration::m_purgeAgeBasedPeriod

peform cold file / uvkeep purge every this many purge cycles

Definition at line 102 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_purgeColdFilesAge

int XrdPfc::Configuration::m_purgeColdFilesAge

purge files older than this age

Definition at line 101 of file XrdPfc.hh.

Referenced by Configuration(), and is_age_based_purge_in_effect().

◆ m_purgeInterval

int XrdPfc::Configuration::m_purgeInterval

sleep interval between cache purges

Definition at line 100 of file XrdPfc.hh.

Referenced by Configuration(), and XrdPfc::ResourceMonitor::heart_beat().

◆ m_qfsredir

bool XrdPfc::Configuration::m_qfsredir

redirect file system query to the origin

Definition at line 140 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_RamAbsAvailable

long long XrdPfc::Configuration::m_RamAbsAvailable

available from configuration

Definition at line 111 of file XrdPfc.hh.

Referenced by Configuration(), and Proto_ResourceMonitorHeartBeat().

◆ m_RamKeepStdBlocks

int XrdPfc::Configuration::m_RamKeepStdBlocks

number of standard-sized blocks kept after release

Definition at line 112 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_username

std::string XrdPfc::Configuration::m_username

username passed to oss plugin

Definition at line 90 of file XrdPfc.hh.

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

◆ m_wqueue_blocks

int XrdPfc::Configuration::m_wqueue_blocks

maximum number of blocks written per write-queue loop

Definition at line 113 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_wqueue_threads

int XrdPfc::Configuration::m_wqueue_threads

number of threads writing blocks to disk

Definition at line 114 of file XrdPfc.hh.

Referenced by Configuration().

◆ m_write_through

bool XrdPfc::Configuration::m_write_through

flag indicating write-through mode is enabled

Definition at line 86 of file XrdPfc.hh.

Referenced by Configuration().

◆ s_max_bufferSize

long long XrdPfc::Configuration::s_max_bufferSize = 512 * 1024 * 1024
staticconstexpr

Definition at line 135 of file XrdPfc.hh.

◆ s_max_prefetch_max_blocks

int XrdPfc::Configuration::s_max_prefetch_max_blocks = 4096
staticconstexpr

Definition at line 137 of file XrdPfc.hh.

◆ s_min_bufferSize

long long XrdPfc::Configuration::s_min_bufferSize = 4 * 1024
staticconstexpr

Definition at line 134 of file XrdPfc.hh.


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