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

Re: Memory usage with bdb



Sorry.

Here you have it:

On Mon, Jan 14, 2013 at 3:30 PM, Quanah Gibson-Mount <quanah@zimbra.com> wrote:
--On Monday, January 14, 2013 2:00 PM -0200 Friedrich Locke <friedrich.locke@gmail.com> wrote:

Some time ago, i send a message about slapd "eating" all my memory
resource.

Mr. Quanah asked me to provide more details. Here you have it:
sioux@gustav$ uname -a
OpenBSD gustav.cpd.ufv.br 5.2 GENERIC.MP#368 amd64
sioux@gustav$

sioux@gustav$ pkg_info | grep openldap
openldap-client-2.4.31 Open source LDAP software (client)
openldap-server-2.4.31p0 Open source LDAP software (server)
sioux@gustav$ pkg_info | grep db      
cyrus-sasl-2.1.25p3-db4 RFC 2222 SASL (Simple Authentication and Security
Layer)
db-4.6.21v0         Berkeley DB package, revision 4
dbus-1.6.2p0v0      message bus system
gdbm-1.8.3p0        GNU dbm
iodbc-3.52.7        ODBC 3.x driver manager
sioux@gustav$

You are still extremely vague in your details.

How large is your DB on disk? (du -c -h *.bdb)

gustav# pwd
/var/openldap-data
gustav# du -c -h *.bdb
32.0K   cn.bdb
32.0K   dn2id.bdb
64.0K   id2entry.bdb
32.0K   mail.bdb
32.0K   mailAlternateAddress.bdb
32.0K   mailHost.bdb
32.0K   objectClass.bdb
32.0K   uid.bdb
288K    total
 
What are your BDB settings in your DB_CONFIG file?

gustav# cat /var/openldap-data/DB_CONFIG                                      
# $OpenLDAP$
# Example DB_CONFIG file for use with slapd(8) BDB/HDB databases.
#
# See the Oracle Berkeley DB documentation
#   <http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html>
# for detail description of DB_CONFIG syntax and semantics.
#
# Hints can also be found in the OpenLDAP Software FAQ
#       <http://www.openldap.org/faq/index.cgi?file=2>
# in particular:
#   <http://www.openldap.org/faq/index.cgi?file=1075>

# Note: most DB_CONFIG settings will take effect only upon rebuilding
# the DB environment.

# one 0.25 GB cache
#set_cachesize 0 268435456 1
set_cachesize 0 16777216 1

# Data Directory
#set_data_dir db

# Transaction Log settings
set_lg_regionmax 262144
set_lg_bsize 2097152
#set_lg_dir logs

# Note: special DB_CONFIG flags are no longer needed for "quick"
# slapadd(8) or slapindex(8) access (see their -q option).

 
What how many DNs are there in your database?

gustav# ldapsearch -D cn=oldap,dc=ufv,dc=br -W | grep dn:
Enter LDAP Password:
dn: dc=ufv,dc=br
dn: ou=group,dc=ufv,dc=br
dn: cn=its,ou=group,dc=ufv,dc=br
dn: cn=asd,ou=group,dc=ufv,dc=br
dn: cn=dba,ou=group,dc=ufv,dc=br
dn: cn=wbx,ou=group,dc=ufv,dc=br
dn: cn=alg,ou=group,dc=ufv,dc=br
dn: cn=djb,ou=group,dc=ufv,dc=br
dn: cn=nofiles,ou=group,dc=ufv,dc=br
dn: cn=qmail,ou=group,dc=ufv,dc=br
dn: cn=ftp,ou=group,dc=ufv,dc=br
dn: cn=src,ou=group,dc=ufv,dc=br
dn: cn=vmail,ou=group,dc=ufv,dc=br
dn: cn=ord,ou=group,dc=ufv,dc=br
dn: cn=adc,ou=group,dc=ufv,dc=br
dn: cn=bod,ou=group,dc=ufv,dc=br
dn: cn=frn,ou=group,dc=ufv,dc=br
dn: ou=people,dc=ufv,dc=br
dn: uid=sioux,ou=people,dc=ufv,dc=br
dn: uid=mysql,ou=people,dc=ufv,dc=br
dn: uid=oldap,ou=people,dc=ufv,dc=br
dn: uid=dnscache,ou=people,dc=ufv,dc=br
dn: uid=dnslog,ou=people,dc=ufv,dc=br
dn: uid=tinydns,ou=people,dc=ufv,dc=br
dn: uid=ftp,ou=people,dc=ufv,dc=br
dn: uid=alias,ou=people,dc=ufv,dc=br
dn: uid=qmaild,ou=people,dc=ufv,dc=br
dn: uid=qmaill,ou=people,dc=ufv,dc=br
dn: uid=qmailp,ou=people,dc=ufv,dc=br
dn: uid=qmailq,ou=people,dc=ufv,dc=br
dn: uid=qmailr,ou=people,dc=ufv,dc=br
dn: uid=qmails,ou=people,dc=ufv,dc=br
dn: uid=cvs,ou=people,dc=ufv,dc=br
dn: uid=tftp,ou=people,dc=ufv,dc=br
dn: uid=vmail,ou=people,dc=ufv,dc=br
dn: uid=grios,ou=people,dc=ufv,dc=br
dn: uid=vlobo,ou=people,dc=ufv,dc=br
dn: ou=appsrv,dc=ufv,dc=br
dn: cn=ypldap,ou=appsrv,dc=ufv,dc=br
dn: cn=webprv,ou=appsrv,dc=ufv,dc=br
dn: cn=mail,ou=appsrv,dc=ufv,dc=br
gustav#

Total: 41
 
What is your total amount of RAM?


Memory: 2GB
 
May be a few useful bits of information to have.


If further information is necessary, let me know!
 

--Quanah



--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration