CacheParams Class Reference

CacheParams defines parameters used to instantiate a Cache. More...

#include <CacheParams.h>

List of all members.

Public Member Functions

 CacheParams ()
 Define a default set of cache parameters.
void readConfig (ConfigMap const &configMap)
 Read parameter settings from a ConfigMap.

Public Attributes

DeviceAccessSchedulerParams schedParams
 Parameters for instantiating DeviceAccessScheduler.
uint nMemPagesMax
 Maximum number of buffer pages the cache can manage.
uint cbPage
 Number of bytes per page.
uint nMemPagesInit
 Initial number of page buffers to allocate (up to nMemPagesMax).
uint idleFlushInterval
 Number of milliseconds between idle flushes, or 0 to disable.
uint freshmenQueuePercentage
 Percentage of the total cache set aside for the freshmen queue when using the 2Q page victimization policy.
uint pageHistoryQueuePercentage
 The percentage of the total number of cache pages that dictates the number of pages in the history queue.
uint prefetchPagesMax
 Maximum number of outstanding pre-fetch page requests.
uint prefetchThrottleRate
 Number of successful pre-fetches that must occur before the pre-fetch rate is throttled back up, in the event that it has been throttled down because of rejected requests.

Static Public Attributes

static ParamName paramMaxPages
static ParamName paramPagesInit
static ParamName paramPageSize
static ParamName paramIdleFlushInterval
static ParamName paramFreshmenQueuePercentage
static ParamName paramPageHistoryQueuePercentage
static ParamName paramPrefetchPagesMax
static ParamName paramPrefetchThrottleRate
static uint defaultMemPagesMax
static uint defaultMemPagesInit
static uint defaultPageSize
static uint defaultIdleFlushInterval
static uint defaultFreshmenQueuePercentage
static uint defaultPageHistoryQueuePercentage
static uint defaultPrefetchPagesMax
static uint defaultPrefetchThrottleRate


Detailed Description

CacheParams defines parameters used to instantiate a Cache.

Definition at line 36 of file CacheParams.h.


Constructor & Destructor Documentation

CacheParams::CacheParams (  )  [explicit]

Define a default set of cache parameters.

Definition at line 51 of file CacheParams.cpp.

References cbPage, defaultFreshmenQueuePercentage, defaultIdleFlushInterval, defaultMemPagesInit, defaultMemPagesMax, defaultPageHistoryQueuePercentage, defaultPageSize, defaultPrefetchPagesMax, defaultPrefetchThrottleRate, freshmenQueuePercentage, idleFlushInterval, nMemPagesInit, nMemPagesMax, pageHistoryQueuePercentage, prefetchPagesMax, and prefetchThrottleRate.


Member Function Documentation

void CacheParams::readConfig ( ConfigMap const &  configMap  ) 

Read parameter settings from a ConfigMap.

Definition at line 63 of file CacheParams.cpp.

References cbPage, freshmenQueuePercentage, ConfigMap::getIntParam(), idleFlushInterval, isMAXU(), nMemPagesInit, nMemPagesMax, pageHistoryQueuePercentage, paramFreshmenQueuePercentage, paramIdleFlushInterval, paramMaxPages, paramPageHistoryQueuePercentage, paramPagesInit, paramPageSize, paramPrefetchPagesMax, paramPrefetchThrottleRate, prefetchPagesMax, prefetchThrottleRate, DeviceAccessSchedulerParams::readConfig(), and schedParams.

Referenced by CacheTestBase::CacheTestBase(), DatabaseTest::DatabaseTest(), SparseBitmapTest::openStorage(), BackupRestoreTest::testBackupCleanup(), BTreeTxnTest::testCaseSetUp(), BackupRestoreTest::testHeaderBackupRestore(), SegPageEntryIterTest::testIter(), and CmdInterpreter::visit().

00064 {
00065     schedParams.readConfig(configMap);
00066     nMemPagesMax = configMap.getIntParam(
00067         paramMaxPages,nMemPagesMax);
00068     cbPage = configMap.getIntParam(
00069         paramPageSize,cbPage);
00070     nMemPagesInit = configMap.getIntParam(
00071         paramPagesInit,nMemPagesInit);
00072     if (!isMAXU(nMemPagesInit)) {
00073         if (nMemPagesMax < nMemPagesInit) {
00074             nMemPagesMax = nMemPagesInit;
00075         }
00076     }
00077     idleFlushInterval = configMap.getIntParam(
00078         paramIdleFlushInterval,idleFlushInterval);
00079     freshmenQueuePercentage = configMap.getIntParam(
00080         paramFreshmenQueuePercentage,freshmenQueuePercentage);
00081     pageHistoryQueuePercentage = configMap.getIntParam(
00082         paramPageHistoryQueuePercentage,pageHistoryQueuePercentage);
00083     prefetchPagesMax = configMap.getIntParam(
00084         paramPrefetchPagesMax,prefetchPagesMax);
00085     prefetchThrottleRate = configMap.getIntParam(
00086         paramPrefetchThrottleRate,prefetchThrottleRate);
00087 }


Member Data Documentation

ParamName CacheParams::paramMaxPages [static]

Definition at line 39 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramPagesInit [static]

Definition at line 40 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramPageSize [static]

Definition at line 41 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramIdleFlushInterval [static]

Definition at line 42 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramFreshmenQueuePercentage [static]

Definition at line 43 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramPageHistoryQueuePercentage [static]

Definition at line 44 of file CacheParams.h.

Referenced by readConfig().

ParamName CacheParams::paramPrefetchPagesMax [static]

Definition at line 45 of file CacheParams.h.

Referenced by readConfig(), and SegPageEntryIterTest::testIter().

ParamName CacheParams::paramPrefetchThrottleRate [static]

Definition at line 46 of file CacheParams.h.

Referenced by readConfig().

uint CacheParams::defaultMemPagesMax [static]

Definition at line 48 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), CacheParams(), and CacheTest::testLargeCacheInit().

uint CacheParams::defaultMemPagesInit [static]

Definition at line 49 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), and CacheParams().

uint CacheParams::defaultPageSize [static]

Definition at line 50 of file CacheParams.h.

Referenced by CacheParams().

uint CacheParams::defaultIdleFlushInterval [static]

Definition at line 51 of file CacheParams.h.

Referenced by CacheParams().

uint CacheParams::defaultFreshmenQueuePercentage [static]

Definition at line 52 of file CacheParams.h.

Referenced by CacheParams(), and TwoQVictimPolicy< PageT >::TwoQVictimPolicy().

uint CacheParams::defaultPageHistoryQueuePercentage [static]

Definition at line 53 of file CacheParams.h.

Referenced by CacheParams(), and TwoQVictimPolicy< PageT >::TwoQVictimPolicy().

uint CacheParams::defaultPrefetchPagesMax [static]

Definition at line 54 of file CacheParams.h.

Referenced by CacheParams(), and SegPageEntryIterTest::testIter().

uint CacheParams::defaultPrefetchThrottleRate [static]

Definition at line 55 of file CacheParams.h.

Referenced by CacheParams().

DeviceAccessSchedulerParams CacheParams::schedParams

Parameters for instantiating DeviceAccessScheduler.

Definition at line 60 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), and readConfig().

uint CacheParams::nMemPagesMax

Maximum number of buffer pages the cache can manage.

Definition at line 66 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), CacheParams(), CacheTestBase::CacheTestBase(), readConfig(), CacheTest::testLargeCacheInit(), CacheTest::testLargeCacheRequest(), and CmdInterpreter::visit().

uint CacheParams::cbPage

Number of bytes per page.

Definition at line 71 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), CacheParams(), CacheTestBase::CacheTestBase(), readConfig(), and CacheTest::testLargeCacheRequest().

uint CacheParams::nMemPagesInit

Initial number of page buffers to allocate (up to nMemPagesMax).

Definition at line 76 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), CacheParams(), readConfig(), CacheTest::testLargeCacheInit(), CacheTest::testLargeCacheRequest(), and CmdInterpreter::visit().

uint CacheParams::idleFlushInterval

Number of milliseconds between idle flushes, or 0 to disable.

Definition at line 81 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), CacheParams(), and readConfig().

uint CacheParams::freshmenQueuePercentage

Percentage of the total cache set aside for the freshmen queue when using the 2Q page victimization policy.

Definition at line 87 of file CacheParams.h.

Referenced by CacheParams(), readConfig(), and TwoQVictimPolicy< PageT >::TwoQVictimPolicy().

uint CacheParams::pageHistoryQueuePercentage

The percentage of the total number of cache pages that dictates the number of pages in the history queue.

This is used as part of the 2Q page victimization policy.

Definition at line 94 of file CacheParams.h.

Referenced by CacheParams(), readConfig(), and TwoQVictimPolicy< PageT >::TwoQVictimPolicy().

uint CacheParams::prefetchPagesMax

Maximum number of outstanding pre-fetch page requests.

Definition at line 99 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), CacheParams(), and readConfig().

uint CacheParams::prefetchThrottleRate

Number of successful pre-fetches that must occur before the pre-fetch rate is throttled back up, in the event that it has been throttled down because of rejected requests.

Definition at line 106 of file CacheParams.h.

Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), CacheParams(), and readConfig().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:27 2009 for Fennel by  doxygen 1.5.1