Skip to content

Commit

Permalink
Merge pull request #2422 from sipa/nowalcache
Browse files Browse the repository at this point in the history
Don't use -dbcache for BDB anymore
  • Loading branch information
sipa committed Mar 31, 2013
2 parents e3c063b + 2e3c76b commit 767fe14
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ bool CDBEnv::Open(const boost::filesystem::path& path)
if (GetBoolArg("-privdb", true))
nEnvFlags |= DB_PRIVATE;

unsigned int nDbCache = GetArg("-dbcache", 25);
dbenv.set_lg_dir(pathLogDir.string().c_str());
dbenv.set_cachesize(nDbCache / 1024, (nDbCache % 1024)*1048576, 1);
dbenv.set_lg_bsize(1048576);
dbenv.set_lg_max(10485760);
dbenv.set_cachesize(0, 0x100000, 1); // 1 MiB should be enough for just the wallet
dbenv.set_lg_bsize(0x10000);
dbenv.set_lg_max(1048576);
dbenv.set_lk_max_locks(40000);
dbenv.set_lk_max_objects(40000);
dbenv.set_errfile(fopen(pathErrorFile.string().c_str(), "a")); /// debug
Expand Down

0 comments on commit 767fe14

Please sign in to comment.