PingDirectory

Configuring database preloading

Use the dsconfig tool to set the database priming method.

If multiple prime methods are used, the order in which they are specified in the configuration is the order in which they are performed. Changing the preloading option requires restarting the PingDirectory server. The following procedures show how to configure database preloading.

Configuring database preloading

You can configure database preloading to load the database contents from disk into memory when the PingDirectory server starts up.

Steps

  1. Configure database preloading.

    This eliminates the need for the server to gradually prime the database cache using client traffic and ensures that the server has optimal performance when it starts to receive client connections.

    Example:

    $ bin/dsconfig set-backend-prop \
      --backend-name userRoot \
      --set prime-method:preload
  2. To apply the changes, restart the PingDirectory server.

    1. Run bin/stop-server.

    2. Run bin/start-server.

Configuring multiple preloading methods

You can configure multiple preloading methods to achieve the benefits of preloading without delaying PingDirectory server startup.

Steps

  1. Set prime-method to preload-internal-nodes-only, which caches all of the keys within the database, but not the values.

    The database values themselves can be cached in the background once the server has been started with the cursor-across-indexes option.

    Example:

    $ bin/dsconfig set-backend-prop \
      --backend-name userRoot \
      --add prime-method:preload-internal-nodes-only \
      --add prime-method:cursor-across-indexes \
      --set background-prime:true
  2. To apply the changes, restart the PingDirectory server.

    1. Run bin/stop-server.

    2. Run bin/start-server.

Configuring system index preloading

You can configure system index preloading to reduce the PingDirectory server’s startup time.

About this task

Some environments have many indexes configured though only a few are used for performance-sensitive traffic.

Steps

  1. Preload only the necessary indexes into the database at startup.

    Example:

    $ bin/dsconfig set-backend-prop --backend-name userRoot \
      --set prime-method:preload \
      --set prime-all-indexes:false \
      --set system-index-to-prime:dn2id \
      --set system-index-to-prime:id2entry
    $ bin/dsconfig set-local-db-index-prop --backend-name userRoot \
      --index-name mail \
      --set prime-index:true
    $ bin/dsconfig set-local-db-index-prop --backend-name userRoot \
      --index-name uid \
      --set prime-index:true
    $ bin/dsconfig set-local-db-index-prop --backend-name userRoot \
      --index-name entryUUID \
      --set prime-index:true
  2. To apply the changes, restart the PingDirectory server.

    1. Run bin/stop-server.

    2. Run bin/start-server.