At setup, the Directory Server automatically allocates memory to each command-line utility based upon the maximum JVM heap size. The server sets each command-line utility in the config/java.properties with -Xmx/Xms values depending on the expected memory needs of the tools. Because some tools can be invoked as a server task while the server is online, there are two definitions of the tool in the config/java.properties file: one with .online and one with .offline added to the name. The online invocations of the tools typically require minimal memory as the task is performed within the Directory Server’s JVM. The offline invocations of the tools, for example, import-ldif.offline and rebuild-index.offline, can require the same amount of memory that is needed by the Directory Server.

Beyond the offline tool invocations, some tools, such as ldap-diff and verify-index, may need more than the minimal memory if large databases are involved. The table below lists the tools that are expected to have more than the minimal memory needs along with the rules for defining the default heap size.

Command-Line Tools Allocated JVM Memory
start-server, import-ldif (offline), rebuild-index (offline) MaxHeapSize
backup (offline), dbtest export-ldif (offline), ldap-diff, restore (offline), scramble-ldif, summarize-access-log, verify-index If Max System Memory is:
  • Greater than or equal to 16 GB: set Heap to 3 GB
  • Greater than or equal to 8 GB: set Heap to 1 GB
  • Greater than or equal to 4 GB: set Heap to 512 MB
  • Under 4 GB: set Heap to 256 MB