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

Openldap 2.3 and proxy cache server



I am using Openldap 2.3.12 as a proxy caching server. The remote ldap
server (master) is also based on Openldap though older (2.1.30).

I am performing three tests:

1. Go without the local proxy caching server i.e. go remote
2. Go through the local proxy cache server with cache-miss
3. Go through the local proxy cache server with cache-hit

For option 2, I ensure the cache miss by searching sequentially for
users. The searches are of the type (mailLocalAddress=testn@example.com)
and return Attribute is mailRoutingAddress. where n = from 1 to 10,000

For option 3, I do the test once all the entries are cached, and I
search randomly within the user base of 1-10,000

I am seeing a performance of (option1 / option 2 / option 3) respectively:
537 secs vs 479 secs vs 456 secs

I have 2 GB memory on the box and its a Pentium Xeon Server.

I am currently in the process of testing 100,000 users, and will have
the results soon.

Can you suggest me:

a. How to test the ldap proxy caching scenario?
b. How to improve the performance?

Here is the part of my slapd.conf, DB_CONFIG and ulimits on the machine:

slapd.conf:

overlay pcache
proxycache bdb 10000 5 5000 3600
#
#
proxyattrset 0 mailRoutingAddress
proxytemplate (mailLocalAddress=) 0 3600
proxytemplate (|(mail=)(mailAlternateAddress=) 0 3600
cachesize 10000
checkpoint 512 720
dbnosync


DB_CONFIG file:

# Cache Size
# Ideally the cache size should be set large enough to hold the entire
# database. This is often not practical, so a good rule of thumb is to
# specify a cache size equal to half the amount of physical memory in the
# system. The syntax of this parameter is:
#       set_cachesize <GBytes> <Bytes> <Segments>
# For additional information on selecting a cache size, see:
# http://www.sleepycat.com/docs/ref/am_conf/cachesize.html
set_cachesize   0       4194304        0
 
#
# Log File Max Size
# The log file max size determines the point at which log files are rotated.
# A good value for this setting is 10 MB.
set_lg_max      10485760
set_lg_bsize            2097152
 
#
# Log File Directory
# The log files are written to continuously during ldap write operations.
# This will cause a large number of disk seek operations to take place as
# the system writes to both the database and log files, and  write
# performance will be significantly reduced. It is therefore STRONGLY
# recommended that the log file directory be placed on a different disk
# drive than the datbase files.
set_lg_dir      /var/ldap/openldap-bdb/log
 
#DB data directory
#The bdb files get moved to the directory specified under
#uncomment the following line and put in a directory location
#set_data_dir <new_location>
 
#DB LOG AUTOREMOVE
#Uncommenting the following line will remove unneeded transaction log files
#Without some sort of automatic log file removal in place, log files will
#accumulate as you use your repository. This is actually somewhat of a
feature
#of the database system.you should be able to recreate your entire
database using
#nothing but the log files, so these files can be useful for
catastrophic database
#recovery. We dont recommend uncommenting the following line.
set_flags db_log_autoremove
set_flags       DB_TXN_NOSYNC

----
Ulimit:


# ulimit -a
core file size        (blocks, -c) unlimited
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) 32
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1048576
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 16382
virtual memory        (kbytes, -v) unlimited