6443N/A<?xml version="1.0" encoding="UTF-8"?>
6443N/A<!--
6443N/A ! CCPL HEADER START
6443N/A !
6443N/A ! This work is licensed under the Creative Commons
6443N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
6443N/A ! To view a copy of this license, visit
6443N/A ! http://creativecommons.org/licenses/by-nc-nd/3.0/
6443N/A ! or send a letter to Creative Commons, 444 Castro Street,
6443N/A ! Suite 900, Mountain View, California, 94041, USA.
6443N/A !
6443N/A ! You can also obtain a copy of the license at
6443N/A ! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
6443N/A ! See the License for the specific language governing permissions
6443N/A ! and limitations under the License.
6443N/A !
6443N/A ! If applicable, add the following below this CCPL HEADER, with the fields
6443N/A ! enclosed by brackets "[]" replaced with your own identifying information:
6443N/A ! Portions Copyright [yyyy] [name of copyright owner]
6443N/A !
6443N/A ! CCPL HEADER END
6443N/A !
6443N/A ! Copyright 2011 ForgeRock AS
6443N/A !
6443N/A-->
6443N/A<chapter xml:id='chap-jvm-opts'
6443N/A xmlns='http://docbook.org/ns/docbook'
6443N/A version='5.0' xml:lang='en'
6443N/A xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
6443N/A xsi:schemaLocation='http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd'
6443N/A xmlns:xlink='http://www.w3.org/1999/xlink'
6443N/A xmlns:xinclude='http://www.w3.org/2001/XInclude'>
6443N/A <title>Tuning JVM Options</title>
6443N/A
6443N/A <para>By default, OpenDJ installs with options appropriate for evaluation, not
6443N/A for production.</para>
6443N/A
6443N/A <indexterm><primary>Java</primary><secondary>Settings</secondary></indexterm>
6443N/A
6443N/A <variablelist>
6443N/A <para>You can change JVM options for the server in the QuickStart installer,
6443N/A and alternatively using the Control Panel (Runtime Options > Java Settings),
6443N/A or with the <command>dsjavaproperties</command> command after editing the
6443N/A <filename>config/java.properties</filename> file.</para>
6443N/A
6443N/A <varlistentry>
6443N/A <term>Heap size</term>
6443N/A <listitem>
6443N/A <para>The JVM heap size by default is either 256 MB or 1 GB.</para>
6443N/A <para>In production, use at least a 2 GB heap (-Xms2G -Xmx2G).</para>
6443N/A </listitem>
6443N/A </varlistentry>
6443N/A
6443N/A <varlistentry>
6443N/A <term>Server optimizations</term>
6443N/A <listitem>
6443N/A <para>Use -server to select the HotSpot Server VM.</para>
6443N/A </listitem>
6443N/A </varlistentry>
6443N/A
6443N/A <varlistentry>
6443N/A <term>32-bit vs. 64-bit</term>
6443N/A <listitem>
6443N/A <para>For heap sizes over 4 GB on 64-bit systems use -d64.</para>
6443N/A </listitem>
6443N/A </varlistentry>
6443N/A
6443N/A <varlistentry>
6443N/A <term>Garbage collection</term>
6443N/A <listitem>
6443N/A <para>Use -XX:+UseConcMarkSweepGC to select the CMS garbage collector
6443N/A for low GC pause times.</para>
6443N/A </listitem>
6443N/A </varlistentry>
6443N/A
6443N/A <varlistentry>
6443N/A <term>New generation size</term>
6443N/A <listitem>
6443N/A <para>If your directory handles high throughput, set the new generation
6443N/A size large enough for the JVM to avoid promoting short-lived objects
6443N/A into the old gen space (-XX:NewSize=512M).</para>
6443N/A </listitem>
6443N/A </varlistentry>
6443N/A </variablelist>
6443N/A</chapter>