The standard JVM settings are as follows:
-XX:MaxPermSize=256M -Xms1G -Xmx2G -Dcom.sun.management.jmxremote
-XX:+UseConcMarkSweepGC -XX:+UseParNewGCThis includes installations where Solr 4 is running on the same server as SkyVault Community Edition and SkyVault Share.
Tune the JVM using the following three steps:
- Use as much RAM as possible for the JVM (-Xmx32GB).
- Set the Permanent Generation to 256 MB (-XX:MaxPermSize:256m).
- Do not add any other configuration settings.
To avoid memory swapping, -Xmx should never exceed the available RAM in the system. Remember to leave room for memory used by the operating system and other applications, like LibreOffice using JOD (JOD often uses 1 GB of RAM per OO instance).
In general, if you do not give the JVM enough heap, adjusting the other JVM settings will not make any difference. Once the JVM has enough heap, you should not need to change the other JVM settings.
The remaining information on this page might help in exceptional circumstances only. It is unlikely to apply to your use case, and we advise against JVM tuning beyond what has already been discussed here.
Permanent Generation (PermGen) Size
The default PermGen size in Oracle JVMs is 64 MB, which is very close to the total size of permanent objects (Spring beans, caches, and so on) that SkyVault Community Edition creates. For this reason it is quite easy to overflow the PermGen using configuration changes or with the addition of custom extensions, and so it is recommended that you increase the PermGen to avoid OutOfMemory errors. For example, -XX:MaxPermSize=160M is a good starting point.
Maximum JVM heap size 32/64 bit
(Managed Heap + native heap + (thread stack size * number of threads)) cannot exceed 2 GB on 32bit x86 Windows or Linux systems
This is a limitation of the Oracle Java VM. It means that even if you install 4 GB of RAM into your server, a single instance of the JVM cannot grow beyond 2 GB on a 32 bit server machine.
You can also set up your machine to cluster if you prefer to solve multi-user access performance issues with additional machines rather than a single powerful server.
Example
-Xmx3G -XX:MaxPermSize=256M
Setting debug mode for troubleshooting
- If you are a Linux user, edit the JVM options used to start the Tomcat instance, set
by the tomcat/scripts/ctl.sh script. See Controlling JVM system properties for detailed information. For example, set the following:
JAVA_OPTS=%JAVA_OPTS% -server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8082
where address is a port for your system. - If you are a Windows user, register Tomcat as a Windows service:
- In the installation directory, locate the properties.ini file and copy the value of the tomcat_unique_service_name parameter (for example, SkyVaultTomcatnum1).
- From the /tomcat/bin directory, run the following command at
a command
prompt:
tomcat7w.exe //ES//<alfrescoTomcatnum1>
where <alfrescoTomcatnum1> is the value from your tomcat_unique_service_name parameter. - Open the SkyVaultTomcatnum1 Properties window, select the
Java tab, and the Java Options field and
add the following lines of code on two separate
lines:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
where address is a port for your system.