#include <CacheParams.h>
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 |
Definition at line 36 of file CacheParams.h.
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.
00052 { 00053 nMemPagesMax = defaultMemPagesMax; 00054 cbPage = defaultPageSize; 00055 nMemPagesInit = defaultMemPagesInit; 00056 idleFlushInterval = defaultIdleFlushInterval; 00057 freshmenQueuePercentage = defaultFreshmenQueuePercentage; 00058 pageHistoryQueuePercentage = defaultPageHistoryQueuePercentage; 00059 prefetchPagesMax = defaultPrefetchPagesMax; 00060 prefetchThrottleRate = defaultPrefetchThrottleRate; 00061 }
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 }
ParamName CacheParams::paramMaxPages [static] |
ParamName CacheParams::paramPagesInit [static] |
ParamName CacheParams::paramPageSize [static] |
Definition at line 45 of file CacheParams.h.
Referenced by readConfig(), and SegPageEntryIterTest::testIter().
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 52 of file CacheParams.h.
Referenced by CacheParams(), and TwoQVictimPolicy< PageT >::TwoQVictimPolicy().
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().
Parameters for instantiating DeviceAccessScheduler.
Definition at line 60 of file CacheParams.h.
Referenced by CacheImpl< PageT, VictimPolicyT >::CacheImpl(), and readConfig().
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().
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().
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().
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().
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().
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().
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().
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().