[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
correctly setting DB_CONFIG
Hello,
I have gotten myself a bit confused. I have gone over the the
FAQ-O-Matic entries on setting DB_CONFIG:
http://www.openldap.org/faq/data/cache/1072.html
http://www.openldap.org/faq/data/cache/1073.html
http://www.openldap.org/faq/data/cache/1075.html
I am working with a rather small ldap database (roughtly 3000 entries).
When I look at top I see slapd grabbing 525 MB of memeory:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
653 ldap 13 44 0 525M 27604K ucond 1 0:00 0.00% slapd
Is slapd really using that or is that just reserved memory?
When I db_stat my cache directory I think I am seeing that it is using
62 MB of cache (this is Delta-Sync Master, does that matter?):
<snip>
db_stat-4.6 -h /var/db/openldap-data -m
62MB 513KB 900B Total cache size
1 Number of caches
1 Maximum number of caches
62MB 520KB Pool individual cache size
0 Maximum memory-mapped file size
0 Maximum open file descriptors
0 Maximum sequential buffer writes
0 Sleep after writing maximum sequential buffers
0 Requested pages mapped into the process' address space
592172 Requested pages found in the cache (99%)
1204 Requested pages not found in the cache
109 Pages created in the cache
1204 Pages read into the cache
8640 Pages written from the cache to the backing file
0 Clean pages forced from the cache
0 Dirty pages forced from the cache
0 Dirty pages written by trickle-sync thread
1313 Current total page count
1313 Current clean page count
0 Current dirty page count
8191 Number of hash buckets used for page location
594689 Total number of times hash chains searched for a page
2 The longest hash chain searched for a page
615710 Total number of hash chain entries checked for page
0 The number of hash bucket locks that required waiting (0%)
0 The maximum number of times any hash bucket lock was waited for (0%)
0 The number of region locks that required waiting (0%)
0 The number of buffers frozen
0 The number of buffers thawed
0 The number of frozen buffers freed
1381 The number of page allocations
0 The number of hash buckets examined during allocations
0 The maximum number of hash buckets examined for an allocation
0 The number of pages examined during allocations
0 The max number of pages examined for an allocation
8 Threads waited on page I/O
</snip>
When different indices, id2entry and dn2entry flies are all quite small
(though _db.003 is 63 mb):
ls -alh /var/db/openldap-data/
total 28924
drwx------ 3 ldap ldap 1.0K Jul 27 10:57 .
drwxr-xr-x 10 root wheel 512B Jul 29 13:56 ..
-rw-r--r-- 1 ldap ldap 1.3K Sep 16 2008 DB_CONFIG
-rw------- 1 ldap ldap 24K Jul 27 10:55 __db.001
-rw------- 1 ldap ldap 560K Jul 27 10:55 __db.002
-rw------- 1 ldap ldap 63M Jul 27 10:55 __db.003
-rw------- 1 ldap ldap 3.0M Jul 27 10:55 __db.004
-rw------- 1 ldap ldap 464K Jul 27 10:55 __db.005
-rw------- 1 ldap ldap 32K Jul 27 10:55 __db.006
drwx------ 2 ldap ldap 512B Jul 27 10:57 accesslog
-rw------- 1 ldap ldap 36K Jul 29 11:12 accountStatus.bdb
-rw-r--r-- 1 ldap ldap 4.0K Jul 27 10:57 alock
-rw------- 1 ldap ldap 956K Jul 29 11:12 cn.bdb
-rw------- 1 ldap ldap 556K Jul 29 11:12 dn2id.bdb
-rw------- 1 ldap ldap 84K Jul 29 11:12 entryCSN.bdb
-rw------- 1 ldap ldap 72K Jul 29 11:12 entryUUID.bdb
-rw------- 1 ldap ldap 36K Jul 29 11:12 gidNumber.bdb
-rw------- 1 ldap ldap 544K Jul 29 11:12 givenName.bdb
-rw------- 1 ldap ldap 2.5M Jul 29 11:12 id2entry.bdb
-rw------- 1 ldap ldap 10M Jul 5 18:20 log.0000000004
-rw------- 1 ldap ldap 10M Jul 29 11:12 log.0000000005
-rw------- 1 ldap ldap 8.0K Jul 29 10:57 lookupKey.bdb
-rw------- 1 ldap ldap 8.0K Oct 3 2008 lookupName.bdb
-rw------- 1 ldap ldap 948K Jul 29 11:12 mail.bdb
-rw------- 1 ldap ldap 36K Jul 29 11:12 mailForwardingAddress.bdb
-rw------- 1 ldap ldap 48K Jul 29 11:12 mailQuotaSize.bdb
-rw------- 1 ldap ldap 220K Jul 29 11:12 objectClass.bdb
-rw------- 1 ldap ldap 596K Jul 29 11:12 sn.bdb
-rw------- 1 ldap ldap 628K Jul 29 11:12 uid.bdb
-rw------- 1 ldap ldap 72K Jul 29 11:12 uidNumber.bdb
-rw------- 1 ldap ldap 72K Jul 29 11:12 userPassword.bdb
Here is my DB_CONFIG as it stands:
# cache
set_cachesize 0 52428800 0
# Data Directory
#set_data_dir db
# Transaction Log settings
set_lg_regionmax 1048576
set_lg_max 10485760
set_lg_bsize 2097152
# Delete transaction log files as soon as contents are checkpointed and
are no longer needed.
set_flags DB_LOG_AUTOREMOVE
I have the cache set to 50mb but I do not think I have this correct.
Entry cache vs IDL cache vs BDB cache. Any help straightening this out
would be appreciated.
Peter