mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +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;") %
|
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.
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,9 @@ enum SizedItemName
|
|||||||
siLedgerFetch,
|
siLedgerFetch,
|
||||||
siLineCacheSize,
|
siLineCacheSize,
|
||||||
siLineCacheAge,
|
siLineCacheAge,
|
||||||
siHashNodeDBCache
|
siHashNodeDBCache,
|
||||||
|
siTxnDBCache,
|
||||||
|
siLgrDBCache
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SizedItem
|
struct SizedItem
|
||||||
|
|||||||
Reference in New Issue
Block a user