diff --git a/src/cpp/ripple/Application.cpp b/src/cpp/ripple/Application.cpp index 7b5dd2191..f62cb0632 100644 --- a/src/cpp/ripple/Application.cpp +++ b/src/cpp/ripple/Application.cpp @@ -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. diff --git a/src/cpp/ripple/Config.cpp b/src/cpp/ripple/Config.cpp index 8afef2873..096683d3f 100644 --- a/src/cpp/ripple/Config.cpp +++ b/src/cpp/ripple/Config.cpp @@ -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) { diff --git a/src/cpp/ripple/Config.h b/src/cpp/ripple/Config.h index 0ceceba59..f6e65856f 100644 --- a/src/cpp/ripple/Config.h +++ b/src/cpp/ripple/Config.h @@ -65,7 +65,9 @@ enum SizedItemName siLedgerFetch, siLineCacheSize, siLineCacheAge, - siHashNodeDBCache + siHashNodeDBCache, + siTxnDBCache, + siLgrDBCache }; struct SizedItem