Knowing how to configure the JVM is the most important aspect of configuring Elixir Repertoire Server. This has significant impact on the performance and memory load. It is critical if the server is going to have a heavy load or be deployed in a 24 by 7 environment. The parameters are specified in runnable server script as startServer.bat for Windows or startServer.sh for Unixes.
The default setting of the server are:
java -mx512M -Djava.security.auth.login.config=../config/auth.conf -Djava.security.policy=../config/java2.policy RepertoireServer-Launcher.jar
where java
is
the JVM executable. The actual configuration may differ
between vendor and JVM version. User are advised to be
familiar with all these settings. This information is shipped
as part of the JVM documentation.
Java Heap Memory: The
Java heap memory limits the amount of memory that is
available to the server. The setting
-mx[XXX]M
determines the maximum memory
that the server could use for reporting where -mx is the
maximum memory size, XXX is the actual memory size and M is
the unit of measurement in Megabytes. Additional parameters
-ms can be added predetermine the startup JVM memory
size.
The default configuration
,-mx512M
. Generally 256 megabytes of memory is
good enough for most small ,medium report generation load.
The most common indicator when there is insufficient memory to
generate the report is that the VM will throws OutOfMemory
exceptions. In this situation, the memory can increase accordingly.
Load testing is needed to determine the actual setting. It is recommended
that 512 MB or more of both heap and ram memory for production server.
The optimal maximum heap memory should be set at 75% to 85% range or lesser of the hardware RAM memory.
This is to allow enough memory to be reserved for the operating system and other applications.
Java security model: Java System Parameters, -Djava.security.auth.login.config set the URL pointing to the login configuration file (auth.conf) and the -Djava.security.policy URL pointing policy file that handles Principal-based queries, and the default policy implementation supports Principal-based grant entries. Thus, access control can now be based not just on what code is running, but also on who is running it.
Additional JVM settings can be applied. For JVM shipped by Sun additional parameters as -server for server side hotspot optimization and -Djava.awt.headless where it can run without the Window Frame Buffer for Unix platform. The -Duser.home system property determines the location of the license keys location. This may be added to the VM setting to modify the location.
Fine tuning of the Garbage Collection (GC) for performance and load is useful. Different JVM from vendors may provides various setting for optimizing GC like Parallel Throughput Garbage Collector which is useful with large young generation heaps, and lots of CPUs. While a batch report may use Mark-Sweep Garbage Collector. A search in the web may provide the white papers on the various discussion in this area. This optimization schema may vary vendor to vendor of the JVM and version.
Elixir Repertoire Server specific JVM configuration:
Server root directory (-Delixir.home): This setting is optional.
Server configuration directory (-Delixir.config): determines where all the configuration files are stored. This setting is optional. The default value is elixir.home/config.
Server log configuration (-Delixir.log): determines the log4j configuration file. This setting is optional. The default value is elixir.home/config/log-config.xml.
Server db configuration (-Delixir.db): determines the database location. This setting is optional. The default value is elixir.home/db.