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

Sizing Question: RAM size vs dbcachesize + cachesize (fwd)



Hi, I asked a Q earlier (see below) but did not get any response --
probably bad timing (sent on a weekend). Anyway, I went on with my little
formula with my setup:-

What I have: 1GB of RAM, 500,000 entries. (assuming 1 entry = 1kb)
Number of index files: 7 (counted all db files minus id2entry, dn2id, and
                          nextid -- or should I count indexes instead?
                          If so, does pres,eq count as 1, or 2?).
Size of largest index file: 28.9MB

So, my sizing calculation follows:-

dbcachesize = size of largest index file * number of index files
            =     30,000,000 bytes       *         7
            = 210MB of RAM needed.

cachesize   = number of entries * size per entry
            =  500,000 entries  * 1kb (assumption -- need pointers on how
                                       to make this approximation)
            = 500MB of RAM needed.

Total: 500MB + 210MB = 710MB RAM needed, well below 1GB which I have, so
I went on with the ideal figures:-

cachesize 500000
dbcachesize 30000000

but I still get slapd memory usage gradually increasing up to 900MB+. 
Suggestions on better rule of thumb formulas? btw -- I'm using   
openldap-2.0.25, with Berkeley-DB-3.3.11. (not the latest stable versions,
but latest offered by FreeBSD ports -- I'm running FreeBSD-4.6.2).

Thanks.

--sazli
            
---------- Forwarded message ----------
Date: Thu, 3 Oct 2002 13:55:18 +0800 (MYT)
From: Syahrul Sazli Shaharir <sazli@myjaring.net>
To: openldap-software@openldap.org
Subject: Sizing Question: RAM size vs dbcachesize + cachesize

Hi,
What is the rule of thumb / simple formula for setting cachesize &
dbcachesize, given amount of RAM and number of entries in OpenLDAP?

So far I understand that:-
cachesize = Number of entries x size per entry
dbcachesize = Size of largest index file

Questions:-

1. How do I balance memory allocation between cachesize & dbcachesize,
down to simple steps, e.g.:-
- For dbcachesize, assign it the size of the largest index file?
- For cachesize, find out how many entries are most frequently searched,
  and assign it to cachesize?
- Run it and use db_stat utility to see if it's effective?

2. How best to calculate memory size per LDAP entry?
eg: each entry has on average 20 attributes and values average of 20
characters long.

Thanks.

--sazli
cd /open/source; make world
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x06D4113E
Key fingerprint = 0776 CC02 2C3F C0FF 7312  0C3E 0593 AF64 06D4 113E

---------------------------------------------------------------------------
This e-mail has been sent via JARING webmail at http://www.jaring.my