Default Java settings let you evaluate OpenDJ using limited system resources. If you need high performance for production system, test with the following JVM options. These apply to the Sun/Oracle JVM.
![]() |
Tip |
|---|---|
|
To apply JVM settings for your server, edit
|
-server-
Use the C2 compiler and optimizer.
-d64-
To use a heap larger than about 3.5 GB on a 64-bit system, use this option.
-Xms, -Xmx-
Set both minimum and maximum heap size to the same value to avoid resizing. Leave space for the entire DB cache and more.
-Xmn-
Set the new generation size between 1-4 GB for high throughput deployments, but leave enough overall JVM heap to avoid overlaps with the space used for DB cache.
-XX:MaxTenuringThreshold=1-
Force OpenDJ to create only objects that have either a short lifetime, or a long lifetime.
-XX:+UseConcMarkSweepGC-
The CMS garbage collector tends to give the best performance characteristics. You might also consider the G1 garbage collector.
-XX:+PrintGCDetails,-XX:+PrintGCTimeStamps-
Use these when diagnosing JVM tuning problems. You can turn them off when everything is running smoothly.
-XX:+UseCompressedOops-
Java object pointers normally have the same size as native machine pointers. If you run a small, but 64-bit JVM, then compressed object pointers can save space. Set this option when you have a 64-bit JVM,
-Xmxless than 32 GB, and Java SE 6u23 or later.

![[Tip]](common/images/admon/tip.png)
