Tune some other DB cache sizes.

This commit is contained in:
JoelKatz
2013-03-22 08:09:37 -07:00
parent 64d8f106db
commit 2c128d2ae0
3 changed files with 10 additions and 2 deletions

View File

@@ -184,6 +184,10 @@ void Application::setup()
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(siHashNodeDBCache) * 1024))); (theConfig.getSize(siHashNodeDBCache) * 1024)));
theApp->getLedgerDB()->getDB()->executeSQL(boost::str(boost::format("PRAGMA cache_size=-%d;") %
(theConfig.getSize(siTxnDBCache) * 1024)));
theApp->getTxnDB()->getDB()->executeSQL(boost::str(boost::format("PRAGMA cache_size=-%d;") %
(theConfig.getSize(siLgrDBCache) * 1024)));
// //
// Allow peer connections. // Allow peer connections.

View File

@@ -498,7 +498,9 @@ int Config::getSize(SizedItemName item)
{ siLineCacheSize, { 8192, 32768, 131072, 1048576, 0 } }, { siLineCacheSize, { 8192, 32768, 131072, 1048576, 0 } },
{ siLineCacheAge, { 500, 600, 1800, 3600, 7200 } }, { siLineCacheAge, { 500, 600, 1800, 3600, 7200 } },
{ siHashNodeDBCache, { 24, 48, 64, 128, 256 } }, { siHashNodeDBCache, { 24, 48, 64, 128, 256 } },
}; { siTxnDBCache, { 4, 8, 32, 64, 128 } },
{ siLgrDBCache, { 4, 8, 32, 64, 128 } }
};
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,9 @@ enum SizedItemName
siLedgerFetch, siLedgerFetch,
siLineCacheSize, siLineCacheSize,
siLineCacheAge, siLineCacheAge,
siHashNodeDBCache siHashNodeDBCache,
siTxnDBCache,
siLgrDBCache
}; };
struct SizedItem struct SizedItem