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

RE: 2.1.17 performance issues



> -----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.

You cannot use only one or the other, because the absence of either cache
will slow down the entire system. You need both.

> Again to clear things up, if you set a DB_CONFIG file with a certain
> cachesize and no sync:
> set_flags DB_TXN_NOSYNC
> set_cachesize 0 8192000 1
>
> initiate your directory with a slapdadd  ( I use set_flags
> DB_TXN_NOSYNC
> at this stage to accelarate directory initialisation ) , then comment
> #set_flags DB_TXN_NOSYNC in DB_CONFIG and finally start
> slapd, will the
> BDB do the sync or not ?
> Same thing with cachesize, after slapdadd , can I dynamically
> increase
> it by changing the value in set_cachesize 0 8192000 1 and
> reload slapd
> or do I need to detroy db file and reinitite with slapdadd ?
>
> This "The BDB settings are persistent" confuses me ....

The cachesize can only be set once. You have to destroy the environment and
recreate it (using db_recover) if you want to change it. The DB_TXN_NOSYNC
flag can be changed between runs.

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