From 6b6310b152475793a1272d8829a9df89a6edaee6 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 3 Jan 2011 15:49:50 +0200 Subject: [PATCH] Bump up default BDB cache- and allowed mmap size considerably - The former defaults come from nearly a decade ago, things have changed a bit since then... Even BDB's own default cache size is much larger (8MB) now than what we've been setting. - Using 64MB cache improves cache hit rate (and performance) massively. Last-gasp default to roughly BDB's own current defaults, higher settings in the default macro setup. --- lib/backend/dbconfig.c | 2 +- macros.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c index d4d87c5..9e81476 100644 --- a/lib/backend/dbconfig.c +++ b/lib/backend/dbconfig.c @@ -227,7 +227,7 @@ dbiIndex dbiNew(rpmdb rdb, rpmDbiTagVal rpmtag) *cfg = staticcfg; /* structure assignment */ /* Throw in some defaults if configuration didn't set any */ if (!cfg->db_mmapsize) cfg->db_mmapsize = 16 * 1024 * 1024; - if (!cfg->db_cachesize) cfg->db_cachesize = 1 * 1024 * 1024; + if (!cfg->db_cachesize) cfg->db_cachesize = 8 * 1024 * 1024; } /* FIX: *(rdbOptions->arg) reachable */ diff --git a/macros.in b/macros.in index afa98f8..a279995 100644 --- a/macros.in +++ b/macros.in @@ -533,7 +533,7 @@ print (t)\ # # Misc BDB tuning options -%__dbi_other mp_mmapsize=16Mb mp_size=1Mb +%__dbi_other mp_mmapsize=128Mb mp_size=64Mb %_dbi_config %{?__dbi_other} -- 2.7.4