Tweak the sqlite cache sizing.

This commit is contained in:
JoelKatz
2013-03-20 01:13:07 -07:00
parent ce1e1a5bca
commit 9fbbee318d
3 changed files with 3 additions and 3 deletions

View File

@@ -176,7 +176,7 @@ void Application::setup()
mLedgerMaster.setMinValidations(theConfig.VALIDATION_QUORUM); mLedgerMaster.setMinValidations(theConfig.VALIDATION_QUORUM);
theApp->getHashNodeDB()->getDB()->executeSQL(boost::str(boost::format("PRAGMA cache_size=-%d;") % theApp->getHashNodeDB()->getDB()->executeSQL(boost::str(boost::format("PRAGMA cache_size=-%d;") %
(theConfig.getSize(siDBCache) * 1024))); (theConfig.getSize(siHashNodeDBCache) * 1024)));
// //
// Allow peer connections. // Allow peer connections.

View File

@@ -497,7 +497,7 @@ int Config::getSize(SizedItemName item)
{ siLedgerAge, { 30, 60, 120, 300, 600 } }, { siLedgerAge, { 30, 60, 120, 300, 600 } },
{ siLineCacheSize, { 8192, 32768, 131072, 1048576, 0 } }, { siLineCacheSize, { 8192, 32768, 131072, 1048576, 0 } },
{ siLineCacheAge, { 500, 600, 1800, 3600, 7200 } }, { siLineCacheAge, { 500, 600, 1800, 3600, 7200 } },
{ siDBCache, { 8, 12, 24, 64, 96 } }, { siHashNodeDBCache, { 24, 48, 64, 128, 256 } },
}; };
for (int i = 0; i < (sizeof(sizeTable) / sizeof(SizedItem)); ++i) for (int i = 0; i < (sizeof(sizeTable) / sizeof(SizedItem)); ++i)

View File

@@ -65,7 +65,7 @@ enum SizedItemName
siLedgerFetch, siLedgerFetch,
siLineCacheSize, siLineCacheSize,
siLineCacheAge, siLineCacheAge,
siDBCache siHashNodeDBCache
}; };
struct SizedItem struct SizedItem