mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
Tune some other DB cache sizes.
This commit is contained in:
@@ -184,6 +184,10 @@ void Application::setup()
|
||||
|
||||
theApp->getHashNodeDB()->getDB()->executeSQL(boost::str(boost::format("PRAGMA cache_size=-%d;") %
|
||||
(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.
|
||||
|
||||
@@ -498,7 +498,9 @@ int Config::getSize(SizedItemName item)
|
||||
{ siLineCacheSize, { 8192, 32768, 131072, 1048576, 0 } },
|
||||
{ siLineCacheAge, { 500, 600, 1800, 3600, 7200 } },
|
||||
{ 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)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,9 @@ enum SizedItemName
|
||||
siLedgerFetch,
|
||||
siLineCacheSize,
|
||||
siLineCacheAge,
|
||||
siHashNodeDBCache
|
||||
siHashNodeDBCache,
|
||||
siTxnDBCache,
|
||||
siLgrDBCache
|
||||
};
|
||||
|
||||
struct SizedItem
|
||||
|
||||
Reference in New Issue
Block a user