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

RE: 2.1.17 performance issues

On Thu, 24 Apr 2003, Howard Chu wrote:

> > -----Original Message-----
> > From: jehan procaccia [mailto:jehan.procaccia@int-evry.fr]
> > To clear things up in my mind that means that if you put in
> > slapd.conf:
> > cachesize    1000
> > and in the database directory a DB_CONFIG with:
> > set_cachesize 0 8192000 1
> >
> > The latest will be taken and "cachesize 1000" will always be ignore ?
> No. These are two completely different caches and both are used at the same
> time. The BDB library cache controls how much memory, in bytes, is used by
> the library to maintain its internal bookkeeping information. The back-bdb
> entry cache controls how many LDAP entries to cache, independent of their
> size in bytes.
> > In that case, why allowing  BDB tunning in slapd.conf, just
> > forget about it, and tell people to only use a DB_CONFIG file !?
> As I said before, our benchmarks showed that the back-bdb entry cache is
> necessary for best performance. Did you miss that sentence in my original
> message?
> Fetching data from the BDB library is a lot slower than fetching from the
> entry cache. The BDB library locks data on a page level, and a page generally
> carries at least two data items in it, usually more. If multiple threads need
> access to data items that reside on the same page, they will be blocked and
> only one at a time will progress. The back-bdb entry cache stores one LDAP
> entry per cache entry. If multiple threads need access to multiple entries,
> they most likely will not interfere with each other.

This is interesting. BDB stores al values in tuples of ("key","value"). in
essential these are index lookups that should be fast. An extra
environnement cache wouldn't be nessecary right ? The cache lookups are
also similar to index loookups (get entry fron page given key). If the
whole cache was stored in memory then i could understand why this is
faster, But bdb stores this file by defualt on disk....

i'm still trying to answer this question, uhm anyone got an idea ?
> You cannot use only one or the other, because the absence of either cache
> will slow down the entire system. You need both.