blob: cbfd0f8bebf43ad195ea4f3035dc2f3053b7851c [file] [log] [blame]
<?xml version="1.0"?>
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
<appendix xmlns="" version="5.0" xml:id="Java-Broker-Appendix-Environment-Variables">
<title>Environment Variables</title>
<para>The following table describes the environment variables understood by the Qpid scripts
contained within the <literal>/bin</literal> directory within the Broker distribution.</para>
<para>To take effect, these variables must be set within the shell (and exported - if using Unix)
before invoking the script.</para>
<table pgwide="1">
<title>Environment variables</title>
<tgroup cols="3">
<entry>Environment variable</entry>
<row xml:id="Java-Broker-Appendix-Environment-Variables-Qpid-Home">
<para>The variable used to tell the Broker its installation directory. It must be an
absolute path. This is used to determine the location of Qpid's dependency JARs and
some configuration files.</para>
<para>Typically the value of this variable will look similar to
<literal>c:\qpid\qpid-broker\\${project.version}</literal> (Windows) or
<literal>/usr/local/qpid/qpid-broker/${project.version}</literal> (Unix). The
installation prefix will differ from installation to installation. </para>
<para>If not set, a value for <literal>QPID_HOME</literal> is derived from the location
of the script itself.</para>
<row xml:id="Java-Broker-Appendix-Environment-Variables-Qpid-Work">
<para>User's home directory</para>
<para>Used as the default root directory for any data written by the Broker. This is the
default location for any message data written to persistent stores and the Broker's
log file.</para>
<para>For example, <literal>QPID_WORK=/var/qpidwork</literal>.</para>
<row xml:id="Java-Broker-Appendix-Environment-Variables-Qpid-Opts">
<para>This is the preferred mechanism for passing <link linkend="Java-Broker-Appendix-System-Properties">Java system properties</link> to the
Broker. The value must be a list of system properties each separate by a space.
<row xml:id="Java-Broker-Appendix-Environment-Variables-Qpid-Java-Gc">
<literal>-XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC</literal>
<para>This is the preferred mechanism for customising garbage collection behaviour. The
value should contain valid garbage collection options(s) for the target JVM.</para>
<para>Refer to the JVM's documentation for details.</para>
<row xml:id="Java-Broker-Appendix-Environment-Variables-Qpid-Java-Mem">
<literal>-Xmx512m -XX:MaxDirectMemorySize=1536m</literal>
<para>This is the preferred mechanism for customising the size of the JVM's heap and
direct memory.
The value should contain valid memory option(s) for the target JVM. Oracle JVMs
understand <literal>-Xmx</literal> to specify a maximum heap size,
<literal>-Xms</literal> an initial size, and
<literal>-XX:MaxDirectMemorySize</literal> for the maximum amount of direct
<para>For example, <code>QPID_JAVA_MEM="-Xmx6g -XX:MaxDirectMemorySize=12g"</code> would
set a maximum heap size of 6GB and 12GB of direct memory.</para>
<para>Refer to the JVM's documentation for details.</para>
<row xml:id="Java-Broker-Appendix-Environment-Variables-Java-Opts">
<para>This is the preferred mechanism for passing any other JVM options. This variable is
commonly used to pass options for diagnostic purposes, for instance to turn on verbose
GC. <literal>-verbose:gc</literal>.</para>
<para>Refer to the JVM's documentation for details.</para>