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

Re: Strange behaviour on FreeBSD 3.s STABLE

At 08:46 AM 8/9/99 +1000, Robert Dal Santo wrote:
>	I've recently changed to OpenLDAP 1.2.6 with Berkeley DB 2.7.5.
>I use a configure command 
>env CPPFLAGS="-I/usr/local/BerkeleyDB/include" LDFLAGS="-L/usr/local/BerkeleyDB/lib"./configure --with-ldbm-api=db2 --datadir=/usr/local
>	When I start slapd it all runs nice and fast but it grows, and grows 
>and grows and grows in memory. It starts at around 2MB and quickly gets to 
>around 38Mb in only a day. Theres about 8000 entries in the database. 

Memory utilization grown is not necessarily the result of leaks.
You are likely just seeing in LDBM entry caching in action.

Do a search that matches everything:
	ldapsearch -b "database suffix" -D "rootDN" -w "rootpw" \
		"(objectclass=*)" 1.1

			 SIZE   RSS
Fresh slapd:		 2888  1984
Prep'ed slapd:	62480 17956
Repeat:		62488 17960
Repeat:		62488 17960
Repeat:		62488 17960

(slapd-devel w/ 7K entries LDBM/db2, caching up to 10K entries, running on
FreeBSD 4.0-current.  I got similiar results last time I did the same
with slapd-stable).

>	The other unusual behaviour is that it takes a very very long time to 
>do a batch of modifys. It does about one modify every second so updating all 
>8000 entries takes a very very long time.

The default mode implements db write sync.  This is slow, but safe.
See dbcacheNoWsync option in slapd.conf(5).