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

Log level and performances

Two questiosn about OL performances when logging is activated.
Someone asks me recently if logging has a high effect on OpenLDAP performances. As I have no information to answer him, I play with an OL instance already up, and I have a strange result.
The platform :
Dual processor PC, with Linux MDK 9.1, two HDD, 384 Mo RAM
OpenLDAP 2.1.5, BDB 4.2.50 (data files and log file on separate disks)
Directory loaded with two millions tiny entries, based on a very specific schema.
Excerpt of the slapd.conf file :

# -----------
allow bind_v2
threads         4
reverse-lookup  off
loglevel        <various - see below>

database        bdb
suffix          ...
rootdn          ...
rootpw          ...

cachesize       500000
idlcachesize    20000
searchstack     8
# -----------

I use DirectoryMark (DM) to play just the same scenarios three times : one time with no log at all, one time with logelevel=256 (directed to syslog) and one time with loglevel=0 but the "-d 256" option on command line, with redirection to a file.
The DM scenario is very simple : 95% exact search, 5% modify. 5 client process with 2 threads. Measures are made after a warming up.

The results are (tests repeated 3 times) :
 - no log       : 2540 op/s (cool !)
 - loglevel=256 : 29   op/s (uh !)
 - slapd -d 256 : 2577 op/s

So I have two questions : 
 - is there a problem with my configuration that makes slapd so slow when it logs to syslog ?
 - why is the throughput slightly better (and not clearly worst) when OL logs to stdout ?