Configuring the Directory Server
Configuring Security in the Directory Server
Improving Performance When Importing Large Data Sets
To Adjust the Number of Import Threads
Adjusting Memory Requirements to Match Configuration Settings
Preload Database Content. You can configure the directory server to preload some of the database contents into memory on startup for back ends that use the Berkeley DB JE (those entries with the local-db-backend object class). This can be done by setting the preload-time-limit configuration property to indicate the length of time that should be spent pre-loading data into the database cache. For more information, see “Local DB Backend Configuration” in the Configuration Reference.
Tuning Parameters. Some JE database tuning parameters can be used to tune performance.
Use the db-cache-percent and db-cache-size properties to configure the amount of memory that the OracleTM Berkeley DB Java Edition (JE) cache uses. For best performance, consider setting your directory server so that the whole database can fit into the DB cache. For example, after importing 200,000 entries into the userRoot back end, you might run the following procedure to determine your DB cache:
$ cd install-dir/db $ du -sk userRoot/ 910616 userRoot/
Set the JVM heap to 2 Gbytes (-Xms2g -Xmx2g), and then set the db-cache-percent to 50, so that the DB cache will use 1 Gbyte of memory. To monitor the DB cache, observe the following properties under the "dn:cn=userRoot Database Environment,cn=monitor" entry through Jtrace and JMX:
Check that EnvironmentCacheDataBytes has a value consistent with the expected size of the DB cache.
Check that EnvironmentNCacheMiss does not have unexpected growth when loading the server.
The db-evictor-lru-only configuration property can be used to control how the database cache retains information. Setting this value to false ensures that the internal nodes are maintained in cache, which provides better performance when the JE cache holds only a small percentage of the database contents.
The db-txn-no-sync and db-txn-write-no-sync configuration properties can be used to configure durability for write operations. Reducing durability can increase write performance, but it can also increase the chance of data loss in the event of a JVM crash or system crash.
The db-log-file-max configuration property can be used to control the size of JE log files. Increasing the file size can improve write performance, but it can also make it harder to maintain the desired utilization percentage.
The db-num-cleaner-threads and db-cleaner-min-utilization properties control how the cleaner works, which keeps the database size down and keeps up with high write throughput.
On systems with a large number of CPUs, the db-num-lock-tables configuration property improves concurrency within the database lock manager.
Configure the LDAP Connection Handler. The LDAP connection handler (and also the LDAPS connection handler, if it is enabled) can be configured to use multiple threads for decoding client requests through the num-request-handlers configuration property. Increasing the number of threads on systems with a larger number of CPUs can improve performance. Also, in some cases disabling the keep-stats property can help reduce lock contention. For more information, see “LDAP Connection Handler Configuration” in the Configuration Reference.
Enable an Entry Cache. In some cases, particularly those involving relatively small directories (for example, up to a few hundred thousand entries), it can be useful to enable an entry cache. In general the FIFO entry cache provides better results than the soft reference entry cache. For more information, see “Entry Cache Configuration” in the Configuration Reference.
Disable Unused Virtual Attributes. If the functionality needed by one or more of the virtual attributes is not required, they can be disabled for a slight performance improvement when decoding entries. For more information, see “Virtual Attribute Configuration” in the Configuration Reference.
Disable Unused Access Logging. If access logging is not necessary, disabling the server access logger can help improve performance. For more information, see “Logger Configuration” in the Configuration Reference.
Disable Unused Access Control Handlers. If you do not need access control processing in the server, then you can disable it by setting the enabled configuration property to false for the Access Control Handler. You can set the property by using dsconfig.
Reduce Lock Contention. On systems with large numbers of CPUs (for example, chip multi-threading (CMT) systems with several hardware threads per core), you can reduce lock contention by setting the org.opends.server.LockManagerConcurrencyLevel system property to be equal to the number of worker threads you intend to use.
Note - This property must be set as a JVM system property, because it can be required very early in the server startup process, even before accessing the server configuration.