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

RE: dbcachenowsync



Randy,

I saw your posting and had a question about dbcachenowsync.

I have been testing OpenLDAP 1.2.x with this option enabled to increase
write performance.  However, I have observed the id2entry.dbb file
increasing as more data is added to LDAP.  In addition, restarting the
machine does not cause LDAP to loose any data.

My question is this:  When dbcachenowsync is enabled, is slapd never
synchronizing data to disk or is it just doing it less frequently.

Thanks,
Mark

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Randy Kunkee
Sent: Monday, September 11, 2000 12:43 AM
To: Wanadoo
Cc: openldap-software@OpenLDAP.org
Subject: Re: dbcachenowsync


> Hi
>
> I'm am building an ldap based application where an administrator needs to
do
> updates to the ldap data from time to time. Some of the data consists of
> pretty long textstrings that are indexed using the sub index. The Ldap
> server therefore takes a long time to update an entry, sometimes several
> minutes. In order to reduce that time I added the dbcachenowsync flag to
the
> slapd.conf. However, as I understand it, that means that the updated data
is
> kept in memory and not written to disk, and therefore lost in case the
> server goes down. I therefore would like to know how I can force the new
> data to be written to disk, say once a day.
>
> Thanks in advance for any advice.
>
> ../Tonny
>
>

I extended my OpenLDAP 1.2.11 adding a thread that gets started at the
same time the daemon thread is started, and adds a flag to detect when
changes are made.  Once a change is made, it waits until there are no
active threads and then synchronizes the database.  It is hard-coded
to check every 60 seconds.  This was a solution to solve the very
problem you describe.  If you are using 1.2.11, I can put a patch
file up somewhere.  If you are talking about 2.0, then it would have
to be re-written some.  It seems to work very well, giving me the
performance of dbcachenowsync, while flushing the database when the
server is not too busy.  So the question is, what version are you
using?

Randy