From 879b39075868edd8073d08f75eb91ee0bc07c450 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 16 Feb 2014 15:53:42 +0100 Subject: [PATCH] Increase default dbcache to 100 MiB --- src/init.cpp | 4 ++-- src/qt/optionsmodel.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 9ba77105b..787c72e15 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -196,7 +196,7 @@ std::string HelpMessage(HelpMessageMode hmm) strUsage += " -testnet " + _("Use the test network") + "\n"; strUsage += " -pid= " + _("Specify pid file (default: bitcoind.pid)") + "\n"; strUsage += " -gen " + _("Generate coins (default: 0)") + "\n"; - strUsage += " -dbcache= " + _("Set database cache size in megabytes (default: 25)") + "\n"; + strUsage += " -dbcache= " + _("Set database cache size in megabytes (default: 100)") + "\n"; strUsage += " -timeout= " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n"; strUsage += " -proxy= " + _("Connect through SOCKS proxy") + "\n"; strUsage += " -socks= " + _("Select SOCKS version for -proxy (4 or 5, default: 5)") + "\n"; @@ -776,7 +776,7 @@ bool AppInit2(boost::thread_group& threadGroup) } // cache size calculations - size_t nTotalCache = GetArg("-dbcache", 25) << 20; + size_t nTotalCache = GetArg("-dbcache", 100) << 20; if (nTotalCache < (1 << 22)) nTotalCache = (1 << 22); // total cache cannot be less than 4 MiB size_t nBlockTreeDBCache = nTotalCache / 8; diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index eff73b770..e0c478872 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -84,7 +84,7 @@ void OptionsModel::Init() #endif if (!settings.contains("nDatabaseCache")) - settings.setValue("nDatabaseCache", 25); + settings.setValue("nDatabaseCache", 100); if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString())) strOverriddenByCommandLine += "-dbcache ";