Configuring Transaction Logs for Frequent Database Updates

When the server is going to be asked to perform frequent database updates (LDAP adds, modifies, replication), the database transaction log files should be configured to be on a different disk than the primary database files.
Storing the transaction log files on a separate physical disk improves performance because the disk heads do not thrash moving between the log files and the data files.
  1. Stop the Directory Server instance.
    /etc/init.d/dirsrv stop example
  2. Create the new directory, if necessary, where the transaction logs will be located.
    mkdir /home/exampledb-txnlogs
  3. Set the appropriate file permissions on the directory so that the Directory Server user can access it; the default Directory Server user and group are nobody:nobody.
    chown nobody:nobody /home/exampledb-txnlogs
  4. Open the Directory Server instance's configuration directory.
    cd /etc/dirsrv/slapd-instance_name
  5. Edit the dse.ldif file, and change the nsslapd-db-logdirectory directive for the new log file path:
    nsslapd-db-logdirectory: /home/exampledb-txnlogs
    This attribute goes on the same entry that has the nsslapd-dbcachesize attribute.
  6. Open the database directory.
    cd /var/lib/dirsrv/slapd-instance_name/db
  7. Remove all of the __db.* files.
  8. Move the log.* files to the new location.
  9. Start the Directory Server instance again.
    /etc/init.d/dirsrv start example