Loading...
Searching...
No Matches
XrdPfc.hh
Go to the documentation of this file.
#ifndef __XRDPFC_CACHE_HH__
#define __XRDPFC_CACHE_HH__
//----------------------------------------------------------------------------------
// Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
// Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
//----------------------------------------------------------------------------------
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY emacs WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------------------
#include <string>
#include <list>
#include <map>
#include <set>
#include "Xrd/XrdScheduler.hh"
#include "XrdVersion.hh"
#include "XrdSys/XrdSysPthread.hh"
#include "XrdOuc/XrdOucCache.hh"
#include "XrdOuc/XrdOucCallBack.hh"
#include "XrdPfcFile.hh"
#include "XrdPfcDecision.hh"
class XrdOss;
class XrdOucStream;
class XrdSysError;
class XrdSysTrace;
class XrdXrootdGStream;
namespace XrdPfc
{
class File;
class IO;
class PurgePin;
class ResourceMonitor;
template<class MOO>
struct MutexHolder {
MOO &mutex;
MutexHolder(MOO &m) : mutex(m) { mutex.Lock(); }
~MutexHolder() { mutex.UnLock(); }
};
}
namespace XrdPfc
{
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
struct Configuration
{
Configuration();
bool are_file_usage_limits_set() const { return m_fileUsageMax > 0; }
bool is_age_based_purge_in_effect() const { return m_purgeColdFilesAge > 0 ; }
bool is_uvkeep_purge_in_effect() const { return m_cs_UVKeep >= 0; }
bool is_dir_stat_reporting_on() const { return m_dirStatsStoreDepth >= 0 || ! m_dirStatsDirs.empty() || ! m_dirStatsDirGlobs.empty(); }
bool is_purge_plugin_set_up() const { return false; }
CkSumCheck_e get_cs_Chk() const { return (CkSumCheck_e) m_cs_Chk; }
bool is_cschk_cache() const { return m_cs_Chk & CSChk_Cache; }
bool is_cschk_net() const { return m_cs_Chk & CSChk_Net; }
bool is_cschk_any() const { return m_cs_Chk & CSChk_Both; }
bool is_cschk_both() const { return (m_cs_Chk & CSChk_Both) == CSChk_Both; }
bool does_cschk_have_missing_bits(CkSumCheck_e cks_on_file) const { return m_cs_Chk & ~cks_on_file; }
bool should_uvkeep_purge(time_t delta) const { return m_cs_UVKeep >= 0 && delta > m_cs_UVKeep; }
bool m_hdfsmode;
bool m_allow_xrdpfc_command;
std::string m_username;
std::string m_data_space;
std::string m_meta_space;
long long m_diskTotalSpace;
long long m_diskUsageLWM;
long long m_diskUsageHWM;
long long m_fileUsageBaseline;
long long m_fileUsageNominal;
long long m_fileUsageMax;
int m_purgeInterval;
int m_purgeColdFilesAge;
int m_purgeAgeBasedPeriod;
int m_accHistorySize;
std::set<std::string> m_dirStatsDirs;
std::set<std::string> m_dirStatsDirGlobs;
int m_dirStatsInterval;
int m_dirStatsStoreDepth;
long long m_bufferSize;
long long m_RamAbsAvailable;
int m_RamKeepStdBlocks;
int m_wqueue_blocks;
int m_wqueue_threads;
int m_prefetch_max_blocks;
long long m_cgi_min_bufferSize = 0;
long long m_cgi_max_bufferSize = 0;
int m_cgi_min_prefetch_max_blocks = 0;
int m_cgi_max_prefetch_max_blocks = 0;
bool m_cgi_blocksize_allowed = false;
bool m_cgi_prefetch_allowed = false;
long long m_hdfsbsize;
long long m_flushCnt;
time_t m_cs_UVKeep;
int m_cs_Chk;
bool m_cs_ChkTLS;
long long m_onlyIfCachedMinSize;
double m_onlyIfCachedMinFrac;
static constexpr long long s_min_bufferSize = 4 * 1024;
static constexpr long long s_max_bufferSize = 512 * 1024 * 1024;
static constexpr int s_max_prefetch_max_blocks = 4096;
};
//------------------------------------------------------------------------------
struct TmpConfiguration
{
std::string m_diskUsageLWM;
std::string m_diskUsageHWM;
std::string m_fileUsageBaseline;
std::string m_fileUsageNominal;
std::string m_fileUsageMax;
std::string m_flushRaw;
TmpConfiguration() :
m_diskUsageLWM("0.90"), m_diskUsageHWM("0.95"),
m_flushRaw("")
{}
};
//==============================================================================
// Cache
//==============================================================================
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class Cache : public XrdOucCache
{
public:
//---------------------------------------------------------------------
//---------------------------------------------------------------------
Cache(XrdSysLogger *logger, XrdOucEnv *env);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
using XrdOucCache::Attach;
virtual XrdOucCacheIO *Attach(XrdOucCacheIO *, int Options = 0);
//---------------------------------------------------------------------
// Virtual function of XrdOucCache. Used for redirection to a local
// file on a distributed FS.
virtual int LocalFilePath(const char *url, char *buff=0, int blen=0,
LFP_Reason why=ForAccess, bool forall=false);
//---------------------------------------------------------------------
// Virtual function of XrdOucCache. Used for deferred open.
virtual int Prepare(const char *url, int oflags, mode_t mode);
// virtual function of XrdOucCache.
virtual int Stat(const char *url, struct stat &sbuff);
// virtual function of XrdOucCache.
virtual int Unlink(const char *url);
//---------------------------------------------------------------------
// Used by PfcFstcl::Fsctl function.
// Test if file is cached taking in onlyifcached configuration parameters.
//---------------------------------------------------------------------
virtual int ConsiderCached(const char *url);
bool DecideIfConsideredCached(long long file_size, long long bytes_on_disk);
void WriteFileSizeXAttr(int cinfo_fd, long long file_size);
long long DetermineFullFileSize(const std::string &cinfo_fname);
//--------------------------------------------------------------------
//--------------------------------------------------------------------
bool Decide(XrdOucCacheIO*);
//------------------------------------------------------------------------
//------------------------------------------------------------------------
const Configuration& RefConfiguration() const { return m_configuration; }
//---------------------------------------------------------------------
//---------------------------------------------------------------------
bool Config(const char *config_filename, const char *parameters, XrdOucEnv *env);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
static Cache &CreateInstance(XrdSysLogger *logger, XrdOucEnv *env);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
static Cache &GetInstance();
static const Cache &TheOne();
static const Configuration &Conf();
static ResourceMonitor &ResMon();
//---------------------------------------------------------------------
//---------------------------------------------------------------------
static bool VCheck(XrdVersionInfo &urVersion) { return true; }
//---------------------------------------------------------------------
//---------------------------------------------------------------------
int UnlinkFile(const std::string& f_name, bool fail_if_open);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
void AddWriteTask(Block* b, bool from_read);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
void RemoveWriteQEntriesFor(File *f);
//---------------------------------------------------------------------
//---------------------------------------------------------------------
void ProcessWriteTasks();
long long WritesSinceLastCall();
char* RequestRAM(long long size);
void ReleaseRAM(char* buf, long long size);
void RegisterPrefetchFile(File*);
void DeRegisterPrefetchFile(File*);
File* GetNextFileToPrefetch();
void Prefetch();
XrdOss* GetOss() const { return m_oss; }
bool IsFileActiveOrPurgeProtected(const std::string&) const;
void ClearPurgeProtectedSet();
PurgePin* GetPurgePin() const { return m_purge_pin; }
File* GetFile(const std::string&, IO*, long long off = 0, long long filesize = 0);
void ReleaseFile(File*, IO*);
void ScheduleFileSync(File* f) { schedule_file_sync(f, false, false); }
void FileSyncDone(File*, bool high_debug);
XrdSysError* GetLog() const { return &m_log; }
XrdSysTrace* GetTrace() const { return m_trace; }
ResourceMonitor& RefResMon() { return *m_res_mon; }
XrdXrootdGStream* GetGStream() { return m_gstream; }
void ExecuteCommandUrl(const std::string& command_url);
static XrdScheduler *schedP;
bool blocksize_str2value(const char *from, const char *str, long long &val, long long min, long long max) const;
bool prefetch_str2value(const char *from, const char *str, int &val, int min, int max) const;
bool is_prefetch_enabled() const { return m_prefetch_enabled; }
private:
bool ConfigParameters(std::string, XrdOucStream&, TmpConfiguration &tmpc);
bool ConfigXeq(char *, XrdOucStream &);
bool xcschk(XrdOucStream &);
bool xdlib(XrdOucStream &);
bool xplib(XrdOucStream &);
bool xtrace(XrdOucStream &);
bool test_oss_basics_and_features();
bool cfg2bytes(const std::string &str, long long &store, long long totalSpace, const char *name) const;
static Cache *m_instance;
XrdOucEnv *m_env;
mutable XrdSysError m_log;
XrdSysTrace *m_trace;
const char *m_traceID;
XrdOss *m_oss;
XrdXrootdGStream *m_gstream;
ResourceMonitor *m_res_mon;
std::vector<Decision*> m_decisionpoints;
PurgePin* m_purge_pin;
Configuration m_configuration;
XrdSysCondVar m_prefetch_condVar;
bool m_prefetch_enabled;
XrdSysMutex m_RAM_mutex;
long long m_RAM_used;
long long m_RAM_write_queue;
std::list<char*> m_RAM_std_blocks;
int m_RAM_std_size;
bool m_isClient;
bool m_dataXattr = false;
bool m_metaXattr = false;
struct WriteQ
{
WriteQ() : condVar(0), writes_between_purges(0), size(0) {}
XrdSysCondVar condVar;
std::list<Block*> queue;
long long writes_between_purges;
int size;
};
WriteQ m_writeQ;
// active map, purge delay set
typedef std::map<std::string, File*> ActiveMap_t;
typedef ActiveMap_t::iterator ActiveMap_i;
typedef std::set<std::string> FNameSet_t;
ActiveMap_t m_active;
FNameSet_t m_purge_delay_set;
mutable XrdSysCondVar m_active_cond;
void inc_ref_cnt(File*, bool lock, bool high_debug);
void dec_ref_cnt(File*, bool high_debug);
void schedule_file_sync(File*, bool ref_cnt_already_set, bool high_debug);
// prefetching
typedef std::vector<File*> PrefetchList;
PrefetchList m_prefetchList;
};
}
#endif
Stat
struct stat Stat
Definition XrdCks.cc:49
XrdOucCache.hh
XrdOucCallBack.hh
XrdPfcDecision.hh
XrdPfcFile.hh
stat
#define stat(a, b)
Definition XrdPosix.hh:101
XrdScheduler.hh
File
XrdOucString File
Definition XrdSecpwdSrvAdmin.cc:159
XrdSysPthread.hh
XrdOss
Definition XrdOss.hh:499
XrdOucCacheIO
Definition XrdOucCache.hh:105
XrdOucCache::Attach
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *ioP, int opts=0)=0
XrdOucCache::LFP_Reason
LFP_Reason
Definition XrdOucCache.hh:570
XrdOucCache::ForAccess
@ ForAccess
Definition XrdOucCache.hh:570
XrdOucCache::XrdOucCache
XrdOucCache(const char *ctype)
Definition XrdOucCache.hh:700
XrdOucEnv
Definition XrdOucEnv.hh:42
XrdOucStream
Definition XrdOucStream.hh:47
XrdPfc::Block
Definition XrdPfcFile.hh:107
XrdPfc::Cache
Attaches/creates and detaches/deletes cache-io objects for disk based cache.
Definition XrdPfc.hh:163
XrdPfc::Cache::GetLog
XrdSysError * GetLog() const
Definition XrdPfc.hh:294
XrdPfc::Cache::DetermineFullFileSize
long long DetermineFullFileSize(const std::string &cinfo_fname)
Definition XrdPfc.cc:926
XrdPfc::Cache::FileSyncDone
void FileSyncDone(File *, bool high_debug)
Definition XrdPfc.cc:542
XrdPfc::Cache::GetFile
File * GetFile(const std::string &, IO *, long long off=0, long long filesize=0)
Definition XrdPfc.cc:389
XrdPfc::Cache::Conf
static const Configuration & Conf()
Definition XrdPfc.cc:134
XrdPfc::Cache::blocksize_str2value
bool blocksize_str2value(const char *from, const char *str, long long &val, long long min, long long max) const
Definition XrdPfcConfiguration.cc:103
XrdPfc::Cache::LocalFilePath
virtual int LocalFilePath(const char *url, char *buff=0, int blen=0, LFP_Reason why=ForAccess, bool forall=false)
Definition XrdPfc.cc:794
XrdPfc::Cache::RefConfiguration
const Configuration & RefConfiguration() const
Reference XrdPfc configuration.
Definition XrdPfc.hh:215
XrdPfc::Cache::ResMon
static ResourceMonitor & ResMon()
Definition XrdPfc.cc:135
XrdPfc::Cache::IsFileActiveOrPurgeProtected
bool IsFileActiveOrPurgeProtected(const std::string &) const
Definition XrdPfc.cc:677
XrdPfc::Cache::ClearPurgeProtectedSet
void ClearPurgeProtectedSet()
Definition XrdPfc.cc:685
XrdPfc::Cache::ReleaseRAM
void ReleaseRAM(char *buf, long long size)
Definition XrdPfc.cc:371
XrdPfc::Cache::ConsiderCached
virtual int ConsiderCached(const char *url)
Definition XrdPfc.cc:1000
XrdPfc::Cache::GetInstance
static Cache & GetInstance()
Singleton access.
Definition XrdPfc.cc:132
XrdPfc::Cache::Config
bool Config(const char *config_filename, const char *parameters, XrdOucEnv *env)
Parse configuration file.
Definition XrdPfcConfiguration.cc:431
XrdPfc::Cache::DeRegisterPrefetchFile
void DeRegisterPrefetchFile(File *)
Definition XrdPfc.cc:711
XrdPfc::Cache::ExecuteCommandUrl
void ExecuteCommandUrl(const std::string &command_url)
Definition XrdPfcCommand.cc:51
XrdPfc::Cache::RegisterPrefetchFile
void RegisterPrefetchFile(File *)
Definition XrdPfc.cc:695
XrdPfc::Cache::WriteFileSizeXAttr
void WriteFileSizeXAttr(int cinfo_fd, long long file_size)
Definition XrdPfc.cc:911
XrdPfc::Cache::Prefetch
void Prefetch()
Definition XrdPfc.cc:752
XrdPfc::Cache::ReleaseFile
void ReleaseFile(File *, IO *)
Definition XrdPfc.cc:471
XrdPfc::Cache::AddWriteTask
void AddWriteTask(Block *b, bool from_read)
Add downloaded block in write queue.
Definition XrdPfc.cc:221
XrdPfc::Cache::GetTrace
XrdSysTrace * GetTrace() const
Definition XrdPfc.hh:295
XrdPfc::Cache::Cache
Cache(XrdSysLogger *logger, XrdOucEnv *env)
Constructor.
Definition XrdPfc.cc:158
XrdPfc::Cache::GetGStream
XrdXrootdGStream * GetGStream()
Definition XrdPfc.hh:298
XrdPfc::Cache::Decide
bool Decide(XrdOucCacheIO *)
Makes decision if the original XrdOucCacheIO should be cached.
Definition XrdPfc.cc:137
XrdPfc::Cache::UnlinkFile
int UnlinkFile(const std::string &f_name, bool fail_if_open)
Remove cinfo and data files from cache.
Definition XrdPfc.cc:1188
XrdPfc::Cache::schedP
static XrdScheduler * schedP
Definition XrdPfc.hh:302
XrdPfc::Cache::RefResMon
ResourceMonitor & RefResMon()
Definition XrdPfc.hh:297
XrdPfc::Cache::GetNextFileToPrefetch
File * GetNextFileToPrefetch()
Definition XrdPfc.cc:733
XrdPfc::Cache::WritesSinceLastCall
long long WritesSinceLastCall()
Definition XrdPfc.cc:320
XrdPfc::Cache::ProcessWriteTasks
void ProcessWriteTasks()
Separate task which writes blocks from ram to disk.
Definition XrdPfc.cc:273
XrdPfc::Cache::Unlink
virtual int Unlink(const char *url)
Definition XrdPfc.cc:1178
XrdPfc::Cache::RemoveWriteQEntriesFor
void RemoveWriteQEntriesFor(File *f)
Remove blocks from write queue which belong to given prefetch. This method is used at the time of Fil...
Definition XrdPfc.cc:240
XrdPfc::Cache::Attach
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *, int Options=0)
Definition XrdPfc.cc:179
XrdPfc::Cache::TheOne
static const Cache & TheOne()
Definition XrdPfc.cc:133
XrdPfc::Cache::GetPurgePin
PurgePin * GetPurgePin() const
Definition XrdPfc.hh:284
XrdPfc::Cache::prefetch_str2value
bool prefetch_str2value(const char *from, const char *str, int &val, int min, int max) const
Definition XrdPfcConfiguration.cc:118
XrdPfc::Cache::GetOss
XrdOss * GetOss() const
Definition XrdPfc.hh:280
XrdPfc::Cache::VCheck
static bool VCheck(XrdVersionInfo &urVersion)
Version check.
Definition XrdPfc.hh:245
XrdPfc::Cache::RequestRAM
char * RequestRAM(long long size)
Definition XrdPfc.cc:331
XrdPfc::Cache::Prepare
virtual int Prepare(const char *url, int oflags, mode_t mode)
Definition XrdPfc.cc:1066
XrdPfc::Cache::DecideIfConsideredCached
bool DecideIfConsideredCached(long long file_size, long long bytes_on_disk)
Definition XrdPfc.cc:967
XrdPfc::Cache::CreateInstance
static Cache & CreateInstance(XrdSysLogger *logger, XrdOucEnv *env)
Singleton creation.
Definition XrdPfc.cc:125
XrdPfc::Cache::is_prefetch_enabled
bool is_prefetch_enabled() const
Definition XrdPfc.hh:307
XrdPfc::Cache::ScheduleFileSync
void ScheduleFileSync(File *f)
Definition XrdPfc.hh:290
XrdPfc::File
Definition XrdPfcFile.hh:203
XrdPfc::IO
Base cache-io class that implements some XrdOucCacheIO abstract methods.
Definition XrdPfcIO.hh:16
XrdPfc::PurgePin
Base class for reguesting directory space to obtain.
Definition XrdPfcPurgePin.hh:16
XrdPfc::ResourceMonitor
Definition XrdPfcResourceMonitor.hh:38
XrdScheduler
Definition XrdScheduler.hh:47
XrdSysCondVar
Definition XrdSysPthread.hh:79
XrdSysError
Definition XrdSysError.hh:90
XrdSysLogger
Definition XrdSysLogger.hh:53
XrdSysMutex
Definition XrdSysPthread.hh:165
XrdSysTrace
Definition XrdSysTrace.hh:49
XrdXrootdGStream
Definition XrdXrootdGStream.hh:44
XrdPfc
Definition XrdPfc.hh:41
XrdPfc::CkSumCheck_e
CkSumCheck_e
Definition XrdPfcTypes.hh:27
XrdPfc::CSChk_Both
@ CSChk_Both
Definition XrdPfcTypes.hh:27
XrdPfc::CSChk_Net
@ CSChk_Net
Definition XrdPfcTypes.hh:27
XrdPfc::CSChk_Cache
@ CSChk_Cache
Definition XrdPfcTypes.hh:27
XrdPfc::Configuration
Contains parameters configurable from the xrootd config file.
Definition XrdPfc.hh:64
XrdPfc::Configuration::m_hdfsbsize
long long m_hdfsbsize
used with m_hdfsmode, default 128MB
Definition XrdPfc.hh:121
XrdPfc::Configuration::m_RamAbsAvailable
long long m_RamAbsAvailable
available from configuration
Definition XrdPfc.hh:108
XrdPfc::Configuration::m_flushCnt
long long m_flushCnt
nuber of unsynced blcoks on disk before flush is called
Definition XrdPfc.hh:122
XrdPfc::Configuration::m_cgi_max_bufferSize
long long m_cgi_max_bufferSize
max buffer size allowed in pfc.blocksize
Definition XrdPfc.hh:115
XrdPfc::Configuration::m_accHistorySize
int m_accHistorySize
max number of entries in access history part of cinfo file
Definition XrdPfc.hh:100
XrdPfc::Configuration::m_cgi_min_prefetch_max_blocks
int m_cgi_min_prefetch_max_blocks
min prefetch block count allowed in pfc.prefetch
Definition XrdPfc.hh:116
XrdPfc::Configuration::does_cschk_have_missing_bits
bool does_cschk_have_missing_bits(CkSumCheck_e cks_on_file) const
Definition XrdPfc.hh:80
XrdPfc::Configuration::m_cgi_prefetch_allowed
bool m_cgi_prefetch_allowed
allow cgi setting of prefetch
Definition XrdPfc.hh:119
XrdPfc::Configuration::m_wqueue_threads
int m_wqueue_threads
number of threads writing blocks to disk
Definition XrdPfc.hh:111
XrdPfc::Configuration::m_diskTotalSpace
long long m_diskTotalSpace
total disk space on configured partition or oss space
Definition XrdPfc.hh:91
XrdPfc::Configuration::m_fileUsageMax
long long m_fileUsageMax
cache purge - files usage maximum
Definition XrdPfc.hh:96
XrdPfc::Configuration::m_fileUsageBaseline
long long m_fileUsageBaseline
cache purge - files usage baseline
Definition XrdPfc.hh:94
XrdPfc::Configuration::m_dirStatsStoreDepth
int m_dirStatsStoreDepth
maximum depth for statistics write out
Definition XrdPfc.hh:105
XrdPfc::Configuration::m_allow_xrdpfc_command
bool m_allow_xrdpfc_command
flag for enabling access to /xrdpfc-command/ functionality.
Definition XrdPfc.hh:85
XrdPfc::Configuration::is_purge_plugin_set_up
bool is_purge_plugin_set_up() const
Definition XrdPfc.hh:71
XrdPfc::Configuration::m_diskUsageHWM
long long m_diskUsageHWM
cache purge - disk usage high water mark
Definition XrdPfc.hh:93
XrdPfc::Configuration::is_cschk_cache
bool is_cschk_cache() const
Definition XrdPfc.hh:75
XrdPfc::Configuration::m_dirStatsDirGlobs
std::set< std::string > m_dirStatsDirGlobs
directory globs for which stat reporting was requested
Definition XrdPfc.hh:103
XrdPfc::Configuration::s_min_bufferSize
static constexpr long long s_min_bufferSize
Definition XrdPfc.hh:131
XrdPfc::Configuration::get_cs_Chk
CkSumCheck_e get_cs_Chk() const
Definition XrdPfc.hh:73
XrdPfc::Configuration::s_max_bufferSize
static constexpr long long s_max_bufferSize
Definition XrdPfc.hh:132
XrdPfc::Configuration::is_uvkeep_purge_in_effect
bool is_uvkeep_purge_in_effect() const
Definition XrdPfc.hh:69
XrdPfc::Configuration::m_prefetch_max_blocks
int m_prefetch_max_blocks
default maximum number of blocks to prefetch per file
Definition XrdPfc.hh:112
XrdPfc::Configuration::are_file_usage_limits_set
bool are_file_usage_limits_set() const
Definition XrdPfc.hh:67
XrdPfc::Configuration::is_cschk_any
bool is_cschk_any() const
Definition XrdPfc.hh:77
XrdPfc::Configuration::m_cs_ChkTLS
bool m_cs_ChkTLS
Allow TLS.
Definition XrdPfc.hh:126
XrdPfc::Configuration::Configuration
Configuration()
Definition XrdPfcConfiguration.cc:33
XrdPfc::Configuration::m_fileUsageNominal
long long m_fileUsageNominal
cache purge - files usage nominal
Definition XrdPfc.hh:95
XrdPfc::Configuration::m_cs_Chk
int m_cs_Chk
Checksum check.
Definition XrdPfc.hh:125
XrdPfc::Configuration::should_uvkeep_purge
bool should_uvkeep_purge(time_t delta) const
Definition XrdPfc.hh:82
XrdPfc::Configuration::m_purgeAgeBasedPeriod
int m_purgeAgeBasedPeriod
peform cold file / uvkeep purge every this many purge cycles
Definition XrdPfc.hh:99
XrdPfc::Configuration::m_hdfsmode
bool m_hdfsmode
flag for enabling block-level operation
Definition XrdPfc.hh:84
XrdPfc::Configuration::m_purgeColdFilesAge
int m_purgeColdFilesAge
purge files older than this age
Definition XrdPfc.hh:98
XrdPfc::Configuration::m_data_space
std::string m_data_space
oss space for data files
Definition XrdPfc.hh:88
XrdPfc::Configuration::is_cschk_both
bool is_cschk_both() const
Definition XrdPfc.hh:78
XrdPfc::Configuration::m_dirStatsDirs
std::set< std::string > m_dirStatsDirs
directories for which stat reporting was requested
Definition XrdPfc.hh:102
XrdPfc::Configuration::m_diskUsageLWM
long long m_diskUsageLWM
cache purge - disk usage low water mark
Definition XrdPfc.hh:92
XrdPfc::Configuration::m_RamKeepStdBlocks
int m_RamKeepStdBlocks
number of standard-sized blocks kept after release
Definition XrdPfc.hh:109
XrdPfc::Configuration::m_bufferSize
long long m_bufferSize
cache block size, default 128 kB
Definition XrdPfc.hh:107
XrdPfc::Configuration::m_cgi_min_bufferSize
long long m_cgi_min_bufferSize
min buffer size allowed in pfc.blocksize
Definition XrdPfc.hh:114
XrdPfc::Configuration::m_dirStatsInterval
int m_dirStatsInterval
time between resource monitor statistics dump in seconds
Definition XrdPfc.hh:104
XrdPfc::Configuration::m_meta_space
std::string m_meta_space
oss space for metadata files (cinfo)
Definition XrdPfc.hh:89
XrdPfc::Configuration::m_wqueue_blocks
int m_wqueue_blocks
maximum number of blocks written per write-queue loop
Definition XrdPfc.hh:110
XrdPfc::Configuration::is_age_based_purge_in_effect
bool is_age_based_purge_in_effect() const
Definition XrdPfc.hh:68
XrdPfc::Configuration::m_cgi_max_prefetch_max_blocks
int m_cgi_max_prefetch_max_blocks
max prefetch block count allowed in pfc.prefetch
Definition XrdPfc.hh:117
XrdPfc::Configuration::m_username
std::string m_username
username passed to oss plugin
Definition XrdPfc.hh:87
XrdPfc::Configuration::s_max_prefetch_max_blocks
static constexpr int s_max_prefetch_max_blocks
Definition XrdPfc.hh:134
XrdPfc::Configuration::m_cgi_blocksize_allowed
bool m_cgi_blocksize_allowed
allow cgi setting of blocksize
Definition XrdPfc.hh:118
XrdPfc::Configuration::is_cschk_net
bool is_cschk_net() const
Definition XrdPfc.hh:76
XrdPfc::Configuration::m_onlyIfCachedMinFrac
double m_onlyIfCachedMinFrac
minimum fraction of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:129
XrdPfc::Configuration::m_cs_UVKeep
time_t m_cs_UVKeep
unverified checksum cache keep
Definition XrdPfc.hh:124
XrdPfc::Configuration::m_purgeInterval
int m_purgeInterval
sleep interval between cache purges
Definition XrdPfc.hh:97
XrdPfc::Configuration::m_onlyIfCachedMinSize
long long m_onlyIfCachedMinSize
minumum size of downloaded file, used by only-if-cached CGI option
Definition XrdPfc.hh:128
XrdPfc::Configuration::is_dir_stat_reporting_on
bool is_dir_stat_reporting_on() const
Definition XrdPfc.hh:70
XrdPfc::MutexHolder::MutexHolder
MutexHolder(MOO &m)
Definition XrdPfc.hh:51
XrdPfc::MutexHolder::~MutexHolder
~MutexHolder()
Definition XrdPfc.hh:52
XrdPfc::MutexHolder::mutex
MOO & mutex
Definition XrdPfc.hh:50
XrdPfc::TmpConfiguration
Definition XrdPfc.hh:140
XrdPfc::TmpConfiguration::m_diskUsageLWM
std::string m_diskUsageLWM
Definition XrdPfc.hh:141
XrdPfc::TmpConfiguration::m_diskUsageHWM
std::string m_diskUsageHWM
Definition XrdPfc.hh:142
XrdPfc::TmpConfiguration::m_fileUsageBaseline
std::string m_fileUsageBaseline
Definition XrdPfc.hh:143
XrdPfc::TmpConfiguration::TmpConfiguration
TmpConfiguration()
Definition XrdPfc.hh:148
XrdPfc::TmpConfiguration::m_fileUsageNominal
std::string m_fileUsageNominal
Definition XrdPfc.hh:144
XrdPfc::TmpConfiguration::m_flushRaw
std::string m_flushRaw
Definition XrdPfc.hh:146
XrdPfc::TmpConfiguration::m_fileUsageMax
std::string m_fileUsageMax
Definition XrdPfc.hh:145