The standard JVM settings are as follows:
-Xms1G -Xmx2G -Dcom.sun.management.jmxremote
-XX:+UseConcMarkSweepGC -XX:+UseParNewGCThis includes installations where Solr 4 is running on the same server as Alfresco Content Services and Alfresco Share.
Tune the JVM using the following three steps:
- Use as much RAM as possible for the JVM (-Xmx32GB).
- 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.
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.
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=8082where 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, alfrescoTomcatnum1).
- From the /tomcat/bin directory, run the following command at
tomcat7w.exe //ES//<alfrescoTomcatnum1>where <alfrescoTomcatnum1> is the value from your tomcat_unique_service_name parameter.
- Open the alfrescoTomcatnum1 Properties window, select the
Java tab, and the Java Options field and
add the following lines of code on two separate
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000where address is a port for your system.