xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XrdPfc.hh
Go to the documentation of this file.
1 #ifndef __XRDPFC_CACHE_HH__
2 #define __XRDPFC_CACHE_HH__
3 //----------------------------------------------------------------------------------
4 // Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
5 // Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
6 //----------------------------------------------------------------------------------
7 // XRootD is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // XRootD is distributed in the hope that it will be useful,
13 // but WITHOUT ANY emacs WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19 //----------------------------------------------------------------------------------
20 #include <string>
21 #include <list>
22 #include <map>
23 #include <set>
24 
25 #include "Xrd/XrdScheduler.hh"
26 #include "XrdVersion.hh"
27 #include "XrdSys/XrdSysPthread.hh"
28 #include "XrdOuc/XrdOucCache.hh"
29 #include "XrdOuc/XrdOucCallBack.hh"
30 #include "XrdCl/XrdClDefaultEnv.hh"
31 
32 #include "XrdPfcFile.hh"
33 #include "XrdPfcDecision.hh"
34 
35 class XrdOucStream;
36 class XrdSysError;
37 class XrdSysTrace;
38 class XrdXrootdGStream;
39 
40 namespace XrdPfc
41 {
42 class File;
43 class IO;
44 
45 class DataFsState;
46 }
47 
48 
49 namespace XrdPfc
50 {
51 
52 //----------------------------------------------------------------------------
54 //----------------------------------------------------------------------------
56 {
57  Configuration();
58 
59  bool are_file_usage_limits_set() const { return m_fileUsageMax > 0; }
60  bool is_age_based_purge_in_effect() const { return m_purgeColdFilesAge > 0 ; }
61  bool is_uvkeep_purge_in_effect() const { return m_cs_UVKeep >= 0; }
62  bool is_dir_stat_reporting_on() const { return m_dirStatsMaxDepth >= 0 || ! m_dirStatsDirs.empty() || ! m_dirStatsDirGlobs.empty(); }
63  bool is_purge_plugin_set_up() const { return false; }
64 
65  void calculate_fractional_usages(long long du, long long fu, double &frac_du, double &frac_fu);
66 
68 
69  bool is_cschk_cache() const { return m_cs_Chk & CSChk_Cache; }
70  bool is_cschk_net() const { return m_cs_Chk & CSChk_Net; }
71  bool is_cschk_any() const { return m_cs_Chk & CSChk_Both; }
72  bool is_cschk_both() const { return (m_cs_Chk & CSChk_Both) == CSChk_Both; }
73 
74  bool does_cschk_have_missing_bits(CkSumCheck_e cks_on_file) const { return m_cs_Chk & ~cks_on_file; }
75 
76  bool should_uvkeep_purge(time_t delta) const { return m_cs_UVKeep >= 0 && delta > m_cs_UVKeep; }
77 
78  bool m_hdfsmode;
80 
81  std::string m_username;
82  std::string m_data_space;
83  std::string m_meta_space;
84 
85  long long m_diskTotalSpace;
86  long long m_diskUsageLWM;
87  long long m_diskUsageHWM;
88  long long m_fileUsageBaseline;
89  long long m_fileUsageNominal;
90  long long m_fileUsageMax;
95 
96  std::set<std::string> m_dirStatsDirs;
97  std::set<std::string> m_dirStatsDirGlobs;
100 
101  long long m_bufferSize;
102  long long m_RamAbsAvailable;
107 
108  long long m_hdfsbsize;
109  long long m_flushCnt;
110 
111  time_t m_cs_UVKeep;
112  int m_cs_Chk;
113  bool m_cs_ChkTLS;
114 };
115 
116 //------------------------------------------------------------------------------
117 
119 {
120  std::string m_diskUsageLWM;
121  std::string m_diskUsageHWM;
122  std::string m_fileUsageBaseline;
123  std::string m_fileUsageNominal;
124  std::string m_fileUsageMax;
125  std::string m_flushRaw;
126 
128  m_diskUsageLWM("0.90"), m_diskUsageHWM("0.95"),
129  m_flushRaw("")
130  {}
131 };
132 
133 //==============================================================================
134 
136 {
137  char *f_str;
138  const char *f_delim;
139  char *f_state;
140  bool f_first;
141 
142  SplitParser(const std::string &s, const char *d) :
143  f_str(strdup(s.c_str())), f_delim(d), f_state(0), f_first(true)
144  {}
145  ~SplitParser() { free(f_str); }
146 
147  char* get_token()
148  {
149  if (f_first) { f_first = false; return strtok_r(f_str, f_delim, &f_state); }
150  else { return strtok_r(0, f_delim, &f_state); }
151  }
152 
154  {
155  if (f_first) { return f_str; }
156  else { *(f_state - 1) = f_delim[0]; return f_state - 1; }
157  }
158 
159  char *get_reminder()
160  {
161  return f_first ? f_str : f_state;
162  }
163 
164  int fill_argv(std::vector<char*> &argv)
165  {
166  if (!f_first) return 0;
167  int dcnt = 0; { char *p = f_str; while (*p) { if (*(p++) == f_delim[0]) ++dcnt; } }
168  argv.reserve(dcnt + 1);
169  int argc = 0;
170  char *i = strtok_r(f_str, f_delim, &f_state);
171  while (i)
172  {
173  ++argc;
174  argv.push_back(i);
175  // printf(" arg %d : '%s'\n", argc, i);
176  i = strtok_r(0, f_delim, &f_state);
177  }
178  return argc;
179  }
180 };
181 
182 struct PathTokenizer : private SplitParser
183 {
184  std::vector<const char*> m_dirs;
185  const char *m_reminder;
186  int m_n_dirs;
187 
188  PathTokenizer(const std::string &path, int max_depth, bool parse_as_lfn) :
189  SplitParser(path, "/"),
190  m_reminder (0),
191  m_n_dirs (0)
192  {
193  // If parse_as_lfn is true store final token into m_reminder, regardless of maxdepth.
194  // This assumes the last token is a file name (and full path is lfn, including the file name).
195 
196  m_dirs.reserve(max_depth);
197 
198  char *t = 0;
199  for (int i = 0; i < max_depth; ++i)
200  {
201  t = get_token();
202  if (t == 0) break;
203  m_dirs.emplace_back(t);
204  }
205  if (parse_as_lfn && *get_reminder() == 0 && ! m_dirs.empty())
206  {
207  m_reminder = m_dirs.back();
208  m_dirs.pop_back();
209  }
210  else
211  {
213  }
214  m_n_dirs = (int) m_dirs.size();
215  }
216 
218  {
219  return m_n_dirs;
220  }
221 
222  const char *get_dir(int pos)
223  {
224  if (pos >= m_n_dirs) return 0;
225  return m_dirs[pos];
226  }
227 
228  std::string make_path()
229  {
230  std::string res;
231  for (std::vector<const char*>::iterator i = m_dirs.begin(); i != m_dirs.end(); ++i)
232  {
233  res += "/";
234  res += *i;
235  }
236  if (m_reminder != 0)
237  {
238  res += "/";
239  res += m_reminder;
240  }
241  return res;
242  }
243 
244  void deboog()
245  {
246  printf("PathTokenizer::deboog size=%d\n", m_n_dirs);
247  for (int i = 0; i < m_n_dirs; ++i)
248  {
249  printf(" %2d: %s\n", i, m_dirs[i]);
250  }
251  printf(" rem: %s\n", m_reminder);
252  }
253 };
254 
255 
256 //==============================================================================
257 // Cache
258 //==============================================================================
259 
260 //----------------------------------------------------------------------------
262 //----------------------------------------------------------------------------
263 class Cache : public XrdOucCache
264 {
265 public:
266  //---------------------------------------------------------------------
268  //---------------------------------------------------------------------
269  Cache(XrdSysLogger *logger, XrdOucEnv *env);
270 
271  //---------------------------------------------------------------------
273  //---------------------------------------------------------------------
274  using XrdOucCache::Attach;
275 
276  virtual XrdOucCacheIO *Attach(XrdOucCacheIO *, int Options = 0);
277 
278  //---------------------------------------------------------------------
279  // Virtual function of XrdOucCache. Used for redirection to a local
280  // file on a distributed FS.
281  virtual int LocalFilePath(const char *url, char *buff=0, int blen=0,
282  LFP_Reason why=ForAccess, bool forall=false);
283 
284  //---------------------------------------------------------------------
285  // Virtual function of XrdOucCache. Used for deferred open.
286  virtual int Prepare(const char *url, int oflags, mode_t mode);
287 
288  // virtual function of XrdOucCache.
289  virtual int Stat(const char *url, struct stat &sbuff);
290 
291  // virtual function of XrdOucCache.
292  virtual int Unlink(const char *url);
293 
294  //--------------------------------------------------------------------
300  //--------------------------------------------------------------------
301  bool Decide(XrdOucCacheIO*);
302 
303  //------------------------------------------------------------------------
305  //------------------------------------------------------------------------
306  const Configuration& RefConfiguration() const { return m_configuration; }
307 
308  //---------------------------------------------------------------------
315  //---------------------------------------------------------------------
316  bool Config(const char *config_filename, const char *parameters);
317 
318  //---------------------------------------------------------------------
320  //---------------------------------------------------------------------
321  static Cache &CreateInstance(XrdSysLogger *logger, XrdOucEnv *env);
322 
323  //---------------------------------------------------------------------
325  //---------------------------------------------------------------------
326  static Cache &GetInstance();
327  static const Cache &TheOne();
328  static const Configuration &Conf();
329 
330  //---------------------------------------------------------------------
332  //---------------------------------------------------------------------
333  static bool VCheck(XrdVersionInfo &urVersion) { return true; }
334 
335  //---------------------------------------------------------------------
337  //---------------------------------------------------------------------
339 
340  //---------------------------------------------------------------------
342  //---------------------------------------------------------------------
343  void Purge();
344 
345  //---------------------------------------------------------------------
347  //---------------------------------------------------------------------
348  int UnlinkFile(const std::string& f_name, bool fail_if_open);
349 
350  //---------------------------------------------------------------------
352  //---------------------------------------------------------------------
353  void AddWriteTask(Block* b, bool from_read);
354 
355  //---------------------------------------------------------------------
358  //---------------------------------------------------------------------
359  void RemoveWriteQEntriesFor(File *f);
360 
361  //---------------------------------------------------------------------
363  //---------------------------------------------------------------------
364  void ProcessWriteTasks();
365 
366  char* RequestRAM(long long size);
367  void ReleaseRAM(char* buf, long long size);
368 
369  void RegisterPrefetchFile(File*);
371 
373 
374  void Prefetch();
375 
376  XrdOss* GetOss() const { return m_oss; }
377 
378  bool IsFileActiveOrPurgeProtected(const std::string&);
379 
380  File* GetFile(const std::string&, IO*, long long off = 0, long long filesize = 0);
381 
382  void ReleaseFile(File*, IO*);
383 
384  void ScheduleFileSync(File* f) { schedule_file_sync(f, false, false); }
385 
386  void FileSyncDone(File*, bool high_debug);
387 
388  XrdSysError* GetLog() { return &m_log; }
389  XrdSysTrace* GetTrace() { return m_trace; }
390 
392 
393  void ExecuteCommandUrl(const std::string& command_url);
394 
396 
397 private:
398  bool ConfigParameters(std::string, XrdOucStream&, TmpConfiguration &tmpc);
399  bool ConfigXeq(char *, XrdOucStream &);
400  bool xcschk(XrdOucStream &);
401  bool xdlib(XrdOucStream &);
402  bool xtrace(XrdOucStream &);
403 
404  bool cfg2bytes(const std::string &str, long long &store, long long totalSpace, const char *name);
405 
406  static Cache *m_instance;
407 
411  const char *m_traceID;
412 
414 
416 
417  std::vector<XrdPfc::Decision*> m_decisionpoints;
418 
420 
423 
425  long long m_RAM_used;
426  long long m_RAM_write_queue;
427  std::list<char*> m_RAM_std_blocks;
429 
430  bool m_isClient;
431 
432  struct WriteQ
433  {
435 
437  std::list<Block*> queue;
439  int size;
440  };
441 
443 
444  // active map, purge delay set
445  typedef std::map<std::string, File*> ActiveMap_t;
446  typedef ActiveMap_t::iterator ActiveMap_i;
447  typedef std::multimap<std::string, XrdPfc::Stats> StatsMMap_t;
448  typedef StatsMMap_t::iterator StatsMMap_i;
449  typedef std::set<std::string> FNameSet_t;
450 
456 
457  void inc_ref_cnt(File*, bool lock, bool high_debug);
458  void dec_ref_cnt(File*, bool high_debug);
459 
460  void schedule_file_sync(File*, bool ref_cnt_already_set, bool high_debug);
461 
462  // prefetching
463  typedef std::vector<File*> PrefetchList;
465 
466  //---------------------------------------------------------------------------
467  // Statistics, heart-beat, scan-and-purge
468 
470 
472 
473  DataFsState *m_fs_state;
474 
478 
480 };
481 
482 }
483 
484 #endif
bool is_uvkeep_purge_in_effect() const
Definition: XrdPfc.hh:61
XrdSysCondVar m_active_cond
Cond-var protecting active file data structures.
Definition: XrdPfc.hh:455
~SplitParser()
Definition: XrdPfc.hh:145
static Cache * m_instance
this object
Definition: XrdPfc.hh:406
StatsMMap_t::iterator StatsMMap_i
Definition: XrdPfc.hh:448
bool is_cschk_cache() const
Definition: XrdPfc.hh:69
long long m_diskTotalSpace
total disk space on configured partition or oss space
Definition: XrdPfc.hh:85
int get_n_dirs()
Definition: XrdPfc.hh:217
void RemoveWriteQEntriesFor(File *f)
Remove blocks from write queue which belong to given prefetch. This method is used at the time of Fil...
Definition: XrdPfcFile.hh:60
virtual int LocalFilePath(const char *url, char *buff=0, int blen=0, LFP_Reason why=ForAccess, bool forall=false)
char * get_token()
Definition: XrdPfc.hh:147
std::map< std::string, File * > ActiveMap_t
Definition: XrdPfc.hh:445
Definition: XrdPfc.hh:469
long long m_diskUsageHWM
cache purge - disk usage high water mark
Definition: XrdPfc.hh:87
long long m_RAM_used
Definition: XrdPfc.hh:425
char * f_state
Definition: XrdPfc.hh:139
Definition: XrdOucCache.hh:573
char * get_reminder_with_delim()
Definition: XrdPfc.hh:153
static Cache & GetInstance()
Singleton access.
long long m_RamAbsAvailable
available from configuration
Definition: XrdPfc.hh:102
bool are_file_usage_limits_set() const
Definition: XrdPfc.hh:59
bool Config(const char *config_filename, const char *parameters)
Parse configuration file.
bool is_cschk_net() const
Definition: XrdPfc.hh:70
std::vector< XrdPfc::Decision * > m_decisionpoints
decision plugins
Definition: XrdPfc.hh:417
int size
current size of write queue
Definition: XrdPfc.hh:439
Definition: XrdPfc.hh:432
WriteQ()
Definition: XrdPfc.hh:434
Definition: XrdPfc.hh:469
void ProcessWriteTasks()
Separate task which writes blocks from ram to disk.
std::string m_meta_space
oss space for metadata files (cinfo)
Definition: XrdPfc.hh:83
std::string m_username
username passed to oss plugin
Definition: XrdPfc.hh:81
std::set< std::string > m_dirStatsDirGlobs
directory globs for which stat reporting was requested
Definition: XrdPfc.hh:97
Base cache-io class that implements XrdOucCacheIO abstract methods.
Definition: XrdPfcIO.hh:18
bool xdlib(XrdOucStream &)
File * GetFile(const std::string &, IO *, long long off=0, long long filesize=0)
Definition: XrdOucCache.hh:104
Attaches/creates and detaches/deletes cache-io objects for disk based cache.
Definition: XrdPfc.hh:263
XrdSysError * GetLog()
Definition: XrdPfc.hh:388
Definition: XrdOucStream.hh:46
bool f_first
Definition: XrdPfc.hh:140
int m_prefetch_max_blocks
maximum number of blocks to prefetch per file
Definition: XrdPfc.hh:106
FNameSet_t m_purge_delay_set
Definition: XrdPfc.hh:453
WriteQ m_writeQ
Definition: XrdPfc.hh:442
bool is_cschk_both() const
Definition: XrdPfc.hh:72
int UnlinkFile(const std::string &f_name, bool fail_if_open)
Remove cinfo and data files from cache.
long long m_hdfsbsize
used with m_hdfsmode, default 128MB
Definition: XrdPfc.hh:108
virtual int Stat(const char *url, struct stat &sbuff)
int fill_argv(std::vector< char * > &argv)
Definition: XrdPfc.hh:164
long long m_bufferSize
prefetch buffer size, default 1MB
Definition: XrdPfc.hh:101
virtual int Unlink(const char *url)
PathTokenizer(const std::string &path, int max_depth, bool parse_as_lfn)
Definition: XrdPfc.hh:188
std::list< Block * > queue
container
Definition: XrdPfc.hh:437
ActiveMap_t m_active
Map of currently active / open files.
Definition: XrdPfc.hh:451
void ResourceMonitorHeartBeat()
Thread function checking resource usage periodically.
bool xtrace(XrdOucStream &)
XrdSysMutex m_RAM_mutex
lock for allcoation of RAM blocks
Definition: XrdPfc.hh:424
bool cfg2bytes(const std::string &str, long long &store, long long totalSpace, const char *name)
Definition: XrdPfc.hh:469
std::string m_flushRaw
Definition: XrdPfc.hh:125
long long m_diskUsageLWM
cache purge - disk usage low water mark
Definition: XrdPfc.hh:86
const char * m_traceID
Definition: XrdPfc.hh:411
Definition: XrdSysError.hh:89
int m_last_scan_duration
Definition: XrdPfc.hh:475
const char * m_reminder
Definition: XrdPfc.hh:185
int m_cs_Chk
Checksum check.
Definition: XrdPfc.hh:112
Definition: XrdPfc.hh:182
Definition: XrdSysTrace.hh:48
ActiveMap_t::iterator ActiveMap_i
Definition: XrdPfc.hh:446
int m_last_purge_duration
Definition: XrdPfc.hh:476
Definition: XrdScheduler.hh:45
void ExecuteCommandUrl(const std::string &command_url)
Definition: XrdSysPthread.hh:164
int m_RAM_std_size
Definition: XrdPfc.hh:428
XrdOucEnv * m_env
environment passed in at creation
Definition: XrdPfc.hh:408
TmpConfiguration()
Definition: XrdPfc.hh:127
std::string m_fileUsageBaseline
Definition: XrdPfc.hh:122
bool m_prefetch_enabled
set to true when prefetching is enabled
Definition: XrdPfc.hh:422
LFP_Reason
Definition: XrdOucCache.hh:573
XrdSysCondVar m_stats_n_purge_cond
communication between heart-beat and scan-purge threads
Definition: XrdPfc.hh:471
Definition: XrdOucCache.hh:497
char * get_reminder()
Definition: XrdPfc.hh:159
void deboog()
Definition: XrdPfc.hh:244
void dec_ref_cnt(File *, bool high_debug)
int m_dirStatsStoreDepth
depth to which statistics should be collected
Definition: XrdPfc.hh:99
std::string m_diskUsageLWM
Definition: XrdPfc.hh:120
XrdOss * GetOss() const
Definition: XrdPfc.hh:376
void copy_out_active_stats_and_update_data_fs_state()
Definition: XrdSysPthread.hh:78
void DeRegisterPrefetchFile(File *)
long long m_fileUsageBaseline
cache purge - files usage baseline
Definition: XrdPfc.hh:88
char * RequestRAM(long long size)
void ReleaseFile(File *, IO *)
std::vector< File * > PrefetchList
Definition: XrdPfc.hh:463
long long writes_between_purges
upper bound on amount of bytes written between two purge passes
Definition: XrdPfc.hh:438
std::vector< const char * > m_dirs
Definition: XrdPfc.hh:184
std::set< std::string > FNameSet_t
Definition: XrdPfc.hh:449
void ScheduleFileSync(File *f)
Definition: XrdPfc.hh:384
bool is_cschk_any() const
Definition: XrdPfc.hh:71
Definition: XrdOucEnv.hh:41
CkSumCheck_e
Definition: XrdPfcTypes.hh:23
const char * f_delim
Definition: XrdPfc.hh:138
bool m_in_purge
Definition: XrdPfc.hh:454
long long m_RAM_write_queue
Definition: XrdPfc.hh:426
int m_purgeAgeBasedPeriod
peform cold file / uvkeep purge every this many purge cycles
Definition: XrdPfc.hh:93
SplitParser(const std::string &s, const char *d)
Definition: XrdPfc.hh:142
int m_wqueue_blocks
maximum number of blocks written per write-queue loop
Definition: XrdPfc.hh:104
std::string m_fileUsageMax
Definition: XrdPfc.hh:124
int m_accHistorySize
max number of entries in access history part of cinfo file
Definition: XrdPfc.hh:94
File * GetNextFileToPrefetch()
Definition: XrdXrootdGStream.hh:43
Definition: XrdPfc.hh:118
int m_wqueue_threads
number of threads writing blocks to disk
Definition: XrdPfc.hh:105
XrdXrootdGStream * m_gstream
Definition: XrdPfc.hh:415
int m_RamKeepStdBlocks
number of standard-sized blocks kept after release
Definition: XrdPfc.hh:103
Configuration m_configuration
configurable parameters
Definition: XrdPfc.hh:419
Cache(XrdSysLogger *logger, XrdOucEnv *env)
Constructor.
Definition: XrdPfc.hh:135
bool IsFileActiveOrPurgeProtected(const std::string &)
const Configuration & RefConfiguration() const
Reference XrdPfc configuration.
Definition: XrdPfc.hh:306
CkSumCheck_e get_cs_Chk() const
Definition: XrdPfc.hh:67
XrdSysTrace * GetTrace()
Definition: XrdPfc.hh:389
void RegisterPrefetchFile(File *)
std::set< std::string > m_dirStatsDirs
directories for which stat reporting was requested
Definition: XrdPfc.hh:96
static bool VCheck(XrdVersionInfo &urVersion)
Version check.
Definition: XrdPfc.hh:333
XrdSysError m_log
XrdPfc namespace logger.
Definition: XrdPfc.hh:409
void inc_ref_cnt(File *, bool lock, bool high_debug)
Definition: XrdSysLogger.hh:52
char * f_str
Definition: XrdPfc.hh:137
int m_purgeColdFilesAge
purge files older than this age
Definition: XrdPfc.hh:92
#define stat(a, b)
Definition: XrdPosix.hh:96
bool should_uvkeep_purge(time_t delta) const
Definition: XrdPfc.hh:76
static Cache & CreateInstance(XrdSysLogger *logger, XrdOucEnv *env)
Singleton creation.
bool is_dir_stat_reporting_on() const
Definition: XrdPfc.hh:62
void FileSyncDone(File *, bool high_debug)
bool m_allow_xrdpfc_command
flag for enabling access to /xrdpfc-command/ functionality.
Definition: XrdPfc.hh:79
bool m_hdfsmode
flag for enabling block-level operation
Definition: XrdPfc.hh:78
std::string m_diskUsageHWM
Definition: XrdPfc.hh:121
Definition: XrdPfcFile.hh:144
const char * get_dir(int pos)
Definition: XrdPfc.hh:222
void AddWriteTask(Block *b, bool from_read)
Add downloaded block in write queue.
bool xcschk(XrdOucStream &)
virtual int Prepare(const char *url, int oflags, mode_t mode)
Definition: XrdPfcTypes.hh:23
Definition: XrdOss.hh:497
std::string make_path()
Definition: XrdPfc.hh:228
bool Decide(XrdOucCacheIO *)
Makes decision if the original XrdOucCacheIO should be cached.
ScanAndPurgeThreadState_e
Definition: XrdPfc.hh:469
void Purge()
Thread function invoked to scan and purge files from disk when needed.
XrdSysTrace * m_trace
Definition: XrdPfc.hh:410
bool m_isClient
True if running as client.
Definition: XrdPfc.hh:430
void calculate_fractional_usages(long long du, long long fu, double &frac_du, double &frac_fu)
Contains parameters configurable from the xrootd config file.
Definition: XrdPfc.hh:55
bool ConfigXeq(char *, XrdOucStream &)
static const Cache & TheOne()
StatsMMap_t m_closed_files_stats
Definition: XrdPfc.hh:452
Definition: XrdPfcTypes.hh:23
long long m_fileUsageNominal
cache purge - files usage nominal
Definition: XrdPfc.hh:89
Definition: XrdPfcTypes.hh:23
long long m_fileUsageMax
cache purge - files usage maximum
Definition: XrdPfc.hh:90
bool does_cschk_have_missing_bits(CkSumCheck_e cks_on_file) const
Definition: XrdPfc.hh:74
bool is_age_based_purge_in_effect() const
Definition: XrdPfc.hh:60
XrdSysCondVar m_prefetch_condVar
lock for vector of prefetching files
Definition: XrdPfc.hh:421
void schedule_file_sync(File *, bool ref_cnt_already_set, bool high_debug)
std::multimap< std::string, XrdPfc::Stats > StatsMMap_t
Definition: XrdPfc.hh:447
ScanAndPurgeThreadState_e m_spt_state
Definition: XrdPfc.hh:477
std::string m_data_space
oss space for data files
Definition: XrdPfc.hh:82
int m_dirStatsMaxDepth
maximum depth for statistics write out
Definition: XrdPfc.hh:98
static const Configuration & Conf()
bool m_cs_ChkTLS
Allow TLS.
Definition: XrdPfc.hh:113
XrdSysCondVar condVar
write list condVar
Definition: XrdPfc.hh:436
XrdOss * m_oss
disk cache file system
Definition: XrdPfc.hh:413
long long m_flushCnt
nuber of unsynced blcoks on disk before flush is called
Definition: XrdPfc.hh:109
int m_n_dirs
Definition: XrdPfc.hh:186
static XrdScheduler * schedP
Definition: XrdPfc.hh:395
std::string m_fileUsageNominal
Definition: XrdPfc.hh:123
int m_purgeInterval
sleep interval between cache purges
Definition: XrdPfc.hh:91
bool is_purge_plugin_set_up() const
Definition: XrdPfc.hh:63
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *, int Options=0)
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *ioP, int opts=0)=0
time_t m_cs_UVKeep
unverified checksum cache keep
Definition: XrdPfc.hh:111
Definition: XrdPfc.hh:469
XrdXrootdGStream * GetGStream()
Definition: XrdPfc.hh:391
DataFsState * m_fs_state
directory state for access / usage info and quotas
Definition: XrdPfc.hh:473
std::list< char * > m_RAM_std_blocks
A list of blocks of standard size, to be reused.
Definition: XrdPfc.hh:427
bool ConfigParameters(std::string, XrdOucStream &, TmpConfiguration &tmpc)
void ReleaseRAM(char *buf, long long size)
PrefetchList m_prefetchList
Definition: XrdPfc.hh:464