[Date Prev][Date Next]
Re: DB_CONFIG file
No, example is just an example, I've found good help in OpenLDAP
faq-O-Matic : "How do I determine the proper BDB/HDB database cache size?"
also in the man page slapd-bdb(5)
I hope it's suffisant to configure properly db for ldap but you should
find other informations in the sleepycat Berkeley DB Reference guide
(chapter 10 The Berkeley DB environment)
At 13:14 30/03/06 +0000, Marcelo Moulin wrote:
Hello all !
I will enjoy Lise Didillon questions because i have one doubt about
I just changed the DB_CONFIG.conf.example and used as DB_CONFIG.
Am i suppose to understand how to write a good DB_CONFIG or the
example is already enough for good performance?
On 3/29/06, Lise Didillon <email@example.com> wrote:
> Thank you for your help, so I understand that the DB_CONFIG file is always
> what are the file __db.00x?
> If I want to save the ldap directory, is it suffisant to save the *.bdb
> (after slapd stop) or do I have to save also the other files (alock, __db*,
> log.*) ?
> what happens with the log files, do i have to delete them regularly or do i
> have to save them (as mentionned in db_archive documentation) and delete
> them after?
> I write also some remarqs below (specially at the end for the creation of
> At 16:00 29/03/06 +0200, Buchan Milne wrote:
> >On Tuesday 28 March 2006 16:09, Lise Didillon wrote:
> > > Hello,
> > >
> > > I use db-4.2.52 and openldap 2.3.19.
> > > It's the firts time I use db berkeley, and i have some questions
> > >
> > > 1-
> > >
> > > why DB_CONFIG file is needed with slapadd and not required with
> >DB_CONFIG isn't required in either case, but in both cases,
> >be bad without one.
> > > I explain what I'm doing:
> > > I set in slapd.conf the following db_config parameters: set_cachesize,
> > > set_lg_bsize, set_lg_regionmax, set_lg_max, set_lg_dir
> >What do you set these to (which will help evaluate some of your questions
> the values are very inconsistant for moment because I am at the beginning
> of the work!!
> I will recalculate them (I've seen the method on the openldap.org
> set_cachesize 0 2097152 1
> set_lg_bsize 2097152
> set_lg_regionmax 262144
> set_lg_max 1048576
> set_lg_dir /var/log/db
> > > I have two ldif file to populate my ldap directory, one for use with
> > > slapadd, one for use with ldapadd.
> > >
> > > when I don't have a DB_CONFIG file in the same directory as the ldap
> > > directory files (/var/openldap-data) if I use slapadd to populate
> > > directory, it will output the following message:
> > > "bdb_db_open: Warning - No DB_CONFIG file found in directory
> > > /var/openldap-data: (2) Expect poor performance for suffix
> > > and creat a log.0000000001 file , five __db.00x files, alock file
> > > *.bdb files
> > >
> > > If I put a DB_CONFIG file, then slapadd don't output warning,
> > > the log.0000000001 file
> >If you use slapadd without the -q flag, it will still create the log
> >but in the location you set with set_lg_dir.
> Hum, sorry i did'nt see that
> > > , creats the five files __db.001 to __db.005 (but
> > > they haven't the same size), creats the bdb files with same size
> > >
> > > I don't understand why DB_CONFIG seems to be required for proper use,
> > > because when you run slapadd you specifie the slapd.conf file (-f
> >slapd.conf is the configuration file for the slapd daemon, not the
> >database library.
> >Eg, smb.conf is the configuration file for the smbd daemon, but you
> >have to configure some settings in the OpenLDAP library configuration file
> >(ldap.conf) or the Kerberos library configuration file (/etc/krb5.conf).
> > > Is the DB_CONFIG really needed?
> >If you want any kind of performance with more than ~1000 entries ...
> it's approximatively the number of entries I want to manage correctly. But
> if there is only 500 entries you really tell me that I don't need to creat
> a DB_CONFIG file?
> > > 2-
> > > instead of that if I start ldap and use ldapadd to populate my ldap
> > > directory, without any DB_CONFIG file, it works fine and does'nt
> > > warning
> >ldapadd doesn't know anything about the database backend or library etc,
> >it is operating over the LDAP protocol ...
> >However, I am quite sure that slapd (essentially ldapadd's interface
> >database backend) will have complained about this (via syslog).
> > > BUT any DB_CONFIG file is created at this time. so is that ok? I
> > > in the slapd-bdb man page that if you have dbconfig directives in the
> > > slapd.conf then they will be written to the DB_CONFIG file if no
> > > existed.
> >The options set using this directive will
> > only be written to the DB_CONFIG file if no such file
> > existed at
> > server startup time. This allows one to set initial values
> > with-
> > out overwriting/destroying a DB_CONFIG file that was
> > already
> > customized through other means.
> >You will then have a DB_CONFIG file anyway.
> No I didn't find any DB_CONFIG file exept one but in the directory where
> I do the "tar xfz" to get the openldap sources
> (/usr/local/src/openldap-2.3.19/servers/slapd/DB_CONFIG), so I can't
> imagine that db is able to find it. Have you an idea?
> Lise DIDILLON
> >AFAIK, this was added more to allow initial DB_CONFIG population when
> >adding a
> >new bdb database via back-config than to place an initial DB_CONFIG with
> >using slapd.conf files.
> >Buchan Milne
> >ISP Systems Specialist