117-300 · Question #236
Which of the following parameters in slapd.conf are used to tune the database cache size? (Choose two.)
The correct answer is B. dbcachesize D. cachesize. See the full explanation below for the reasoning.
Question
Options
- Adatabasecachesize
- Bdbcachesize
- Cdcachesize
- Dcachesize
How the community answered
(26 responses)- A8% (2)
- B77% (20)
- C15% (4)
Community Discussion
8The correct answers are B and D, dbcachesize and cachesize. Both are legitimate slapd.conf directives that control different layers of caching in OpenLDAP: cachesize sets the number of entries kept in the in-memory entry cache, while dbcachesize (used with the BDB and HDB backends specifically) controls the size of the Berkeley DB page cache in bytes. The other two options, databasecachesize and dcachesize, simply do not exist as slapd.conf parameters and will cause errors if you throw them in your config. If you want to really nail this one down, spin up a test OpenLDAP instance, drop both directives into slapd.conf under your database stanza, and watch ldap-slaptest validate them cleanly while it rejects the fakes.
I almost picked A because "databasecachesize" looks the most obvious, but when I actually saw this on my exam last week I remembered that slapd.conf uses dbcachesize for the BDB backend cache and cachesize for the in-memory entry cache, so B and D saved me. Glad I drilled the actual parameter names instead of just guessing by what sounded right.
Nina, that split is exactly right, and the one trap people still fall into is assuming dbcachesize and cachesize behave the same way, so knowing that dbcachesize is a BDB disk cache size in bytes while cachesize controls how many entries sit in the in-memory cache is what separates a quick 30-second pick from a painful re-read that bleeds your clock dry.
Quick win, grab B and D, I clocked it in 18 seconds flat on my real exam.
Solid shortcut for the time crunch, but make sure you can explain why B and D are correct, because some exam versions rephrase the stem enough to trap you if you only memorized the letter.
These two parameters operate at different layers, one controls how many entries the LDAP server keeps in memory and the other controls the size of the underlying Berkeley DB page cache, so knowing which layer each one targets is what the exam actually cares about. Do you understand why tuning just one of them without the other can leave performance gains on the table?
The trap is A, databasecachesize looks convincing because it reads like English, but crack open man slapd.conf and search for it, you will find nothing. The two real knobs are dbcachesize, which sets the BDB backend page cache passed straight to the underlying Berkeley DB environment, and cachesize, which controls how many entries the slapd process itself holds in its in-memory entry cache. B and D is the call.
Good catch, and it also helped me to remember that dbcachesize works below slapd at the Berkeley DB storage layer while cachesize sits above that inside slapd itself, so they are really tuning two separate tiers, which explains why both B and D are needed and not just one or the other.