The Directory Server consists mainly of a Java Virtual Machine (JVM) heap and a marginal amount of memory allocated by the JVM’s execution of native code.
While we frequently refer to the JVM Heap as the maximum memory consumed by the Directory Server, the actual process size is slightly larger than the Xmx value because of accumulation of small chunks of native code that Java requires for things, such as SSL sockets.
Within the JVM Heap, the principal memory components are the new and old generations. The new generation is a smaller area of memory where all data is initially allocated and is cleaned of garbage often. Any data that is present long enough is promoted to the old generation for the longer term. The old generation is where the database cache eventually resides. The old generation size is computed from the leftover heap after defining the MaxHeapSize and new generation sizes It is not explicitly stated in the JVM options. A typical set of generation definitions for the JVM is as follows, where mx and ms values represent the heap size.
-Xmx16g -Xms16g -XX:MaxNewSize=2g -XX-NewSize=2g
The mx and ms values should always be the same, and the MaxNewSize and NewSize values should be the same. This helps avoid negative changes in performance.
The MaxNewSize and NewSize values should never need to exceed 2g. The setup and dsjavaproperties tools set MaxNewSize and NewSize values based on the results of extensive performance testing and should not need to be changed.