OpenLDAP Faq-O-Matic : OpenLDAP Software FAQ : Configuration : SLAPD Configuration : Performance Tuning : Can I tune logging to improve performance? | |
Yes. Logging ("debug" messages) is expensive. Though you can disable logging using the --disable-debug flag, it is not recommended.
Instead, it is recommend you disable logging only as needed.
Otherwise, you'd have to rebuild to reenable logging.
| |
On a heavily loaded LDAP server, you'll want to add the following to your
This will prevent slapd from using up extra CPU via syslogd. Because syslog uses both a userland process (syslogd) and system calls | |
You can improve logging performance on some systems by configuring syslog not
to sync the file system with every write-- see your man pages for syslogd/syslog.conf. In Linux, you can prepend the log file name with a "-" in syslog.conf. For example, if you are using the default LOCAL4 logging you could try:
# LDAP logs LOCAL4.* -/var/log/ldap
This took SN searches on a PII 450Mhz from 3/sec to 51/sec. | |
For syslog-ng, add or modify the following line in syslog-ng.conf:options { sync(n); };where n is the number of lines which will be buffered before a write. | |
[Append to This Answer] | |
Kurt@OpenLDAP.org, hyc@openldap.org, rhooper@cyberus.ca, green@mail.utexas.edu, openldap@alextasker.net |
Previous: | Can more indexes improve performance? |
Next: | Can I tune the BDB entry cache? |
|