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
-
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
-
To apply the changes, restart the PingDirectory server.
-
Run
bin/stop-server
. -
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
-
Set
prime-method
topreload-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 after 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
-
To apply the changes, restart the PingDirectory server.
-
Run
bin/stop-server
. -
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
-
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
-
To apply the changes, restart the PingDirectory server.
-
Run
bin/stop-server
. -
Run
bin/start-server
.
-