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

RE: BDB Locking problem



_Something_ caused a major corruption in the database which required me to
restore it. After trudging through the files, and I think someone restored
the database to a version that was previously corrupted and/or did it
improperly. The other times this has happened is when it starting is
up and someone queries it during the startup, and when I was loading data.
The database ends up to be corrupt and you either restore or start over.

I was really looking for example of the syntax to use for the BDB tuning
parameters and whether or not they went in the slapd.conf file or I needed
to create the BD_CONFIG file. The openldap documentation for BDB is
ambiguous and the sleepycat site is written for the programmer and not
ldap specific. I mean something like for BDB performance tweaking is done
with the BD_CONFIG file which you create in the database directory, these
are the default values DB_CONFIG.sample. Then have a table with the
options, and a one or two line thing as to what they do so you have an
idea of what you are looking for and maybe a sample/default config.

As far as performance on the doggy machine, it is pretty good.
With 376k users in an NIS passwd/group schema, a finger on a non-cached
user on the db machine (with no load) is down to:

real    0m0.438s
user    0m0.120s
sys     0m0.010s

Which to me is pretty impressive since I still need to load test and tweak
it yet.

--------------------------------------
  Sean O'Malley, Information Technologist
  Michigan State University
-------------------------------------

On Fri, 7 Feb 2003, Howard Chu wrote:

> > -----Original Message-----
> > From: owner-openldap-software@OpenLDAP.org
> > [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Sean O'Malley
>
> > Im running this rather large database. I am getting the
> > sched_yield()                           = 0
> > error with openldap 2.1.12., bsb-4.1.x, RH7.3
> >
> > I thought this bug was fixed?? I guess not.
>
> I hesitate to call it a "bug" when you try to run a configuration that is too
> large for your machine to handle. That is "user error" - you should read the
> BDB documentation; it is quite explicit about choosing a DB cache size that
> is small enough to fit in your physical RAM.
> >
> > I read something where you need to increase the maximum number of locks
> > for the bdb database but how do you set it in the slapd file?
>
> No. The default is something like 1000 concurrent locks; I think you would
> need to be running with about 300 threads to exhaust that limit. Just a wild
> guess. The only time I've seen the number of locks be a problem was with BDB
> 3 because it was leaking them.
> >
> > It was working fine before i axed the 2Gig swapfile I had set up with the
> > same configuration file. ... Is this automatically configuring itself on
> > how much RAM you have available or something along those lines?
>
> No. There is no automatic configuration for memory size. Even if portable
> code could be written to determine the amount of free RAM on a machine (which
> is a hassle in itself) there's no way to automatically set the policy -
> should the server use all of the RAM? Should it use only half? Leave some for
> other processes? How much should it leave?
>
> In this day and age, computer systems are getting faster and more capable,
> but they still do not eliminate the need for a sensible, intelligent person
> to run the show. Computers will *never* be "smart enough for any fool to
> use."
>
> Pardon me for a moment while I step on my soapbox - the whole Free Software
> phenomenon proves something that I've said for a long time - "Intellectual
> Property" doesn't have much intrinsic value. It is nowhere near as valuable
> as "Intellect." This is why I believe ultimately the Free Software model will
> succeed, and businesses based on the old proprietary model will ultimately
> fail. Companies pushing proprietary software take the attitude that it is the
> Intellectual Property they create wherein their value resides. The fact that
> Free Software-based enterprises are becoming more and more successful shows
> how wrong this is, IP is really a cheap commodity. The real value of any
> enterprise is in its Intellect, its talent base. And the best piece of
> software in the world is all just a bunch of colorful garbage, in the hands
> of an idiot. Without Intellect, Intellectual Property is worthless.
>
> When you go looking for a software package, don't just look for which one has
> the most automation. Don't believe that because it has all that automation,
> it will make your job or your life easier. It won't. Many times it will make
> it harder, because it will automatically do a task in a manner unsuitable for
> your needs. This is true of programming languages, spreadsheets, databases,
> and any other system of greater than trivial complexity. There is no
> substitute for using your own brain to get a job done right.
> </soapbox>
>
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support
>