Bump up default BDB cache- and allowed mmap size considerably
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 3 Jan 2011 13:49:50 +0000 (15:49 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 3 Jan 2011 13:57:41 +0000 (15:57 +0200)
- 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.
(cherry picked from commit 6b6310b152475793a1272d8829a9df89a6edaee6)

lib/backend/dbconfig.c
macros.in

index d4d87c5..9e81476 100644 (file)
@@ -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 */
index afa98f8..a279995 100644 (file)
--- 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}