[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: db_stat and back-bdb index question



Adam Tauno Williams wrote:

http://www.openldap.org/faq/data/cache/1075.html contains the paragraph
"Unlike the B-trees, where you only need to touch one data page to find
an entry of interest, doing an index lookup generally touches multiple
keys, and the point of a hash structure is that the keys are evenly
distributed across the data space. That means there's no convenient
compact subset of the database that you can keep in the cache to insure
quick operation, you can pretty much expect references to be scattered
across the whole thing. My strategy here would be to provide enough cache
for at least 50% of all of the hash data. (Number of hash buckets +
number of overflow pages + number of duplicate pages) * page size / 2."
Now I'm trying to match the phrases in that formulat to the output of
db_stat -d (?) resulting from looking at an index file.
Is -
Number of hash buckets = "Number of tree internal pages."
Numer of overflow pages = "Number of tree overflow pages."
Number of duplicate pages = "Number of tree duplicate pages."
Page Size = "Underlying database page size."
- correct? Or should I use some other parametet to db_stat when looking
at these indexes (back-bdb)?
Is this information correct for back-hdb as well?


What version of OpenLDAP are you using?
OpenLDAP moved to using B-trees with the OpenLDAP 2.2 release.



2.2.24; So is there still a formula to calculate an equivalent value in 2.2.x?

The parameters for B-trees were given for the dn2id and id2entry database files already. Since the index files in 2.2 are also B-trees just use the same calculation. And yes, back-hdb is the same.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support