[imp] ldap

Rick Stevens rstevens@publichost.com
Wed, 06 Dec 2000 17:40:53 -0800


Mike Coughlan wrote:

> The big advantage of LDAP is that it can be used as a public contacts DB by
> both Netscape and Outlook.  We are using it as such for a company wide
> Rolodex with a web front end.  I imagine it will have significant traffic
> and use.  I don't mind losing some bytes on the hard drive, but it also
> sounds like it may cause LDAP to eat additional memory on the server, if the
> LDAP database is cashed in memory.  That is less acceptable.
> 
> Is that a big risk, and if so, how can I claim the space back?

The caching is determined by the slapd.conf file, so you can play with
that all you want.  It is a LRU cache, so once it hits a maximum size,
it doesn't get any bigger.  The problem has to do with if something
isn't in the cache.  If you have holes in the DBM files, the server
has to traverse a bigger file, hence slower access.

In order to reclaim the "holes" in the DBM files, you have to use the
LDIF utilities that come with OpenLDAP.  You run ldbmcat to spit out
LDIF files based on the binary DBM files, delete the old DBM files,
then run ldif2ldbm on the LDIF files to recreate the binary DBM files. 
This CAN TAKE A VERY LONG TIME TO DO!  On a dual Pentium-II/400 system 
with 1GB of memory and DBM files of about 2.5GB, this process took over 
4 hours for us.

----------------------------------------------------------------------
- Rick Stevens, CTO, PublicHost, Inc.        rstevens@publichost.com -
- 949-743-2010 (Voice)                     http://www.publichost.com -
-                                                                    -
-    "Hello. My PID is Inigo Montoya.  You `kill -9'-ed my parent    -
-                     process.  Prepare to vi."                      -
----------------------------------------------------------------------