Databases Reference
In-Depth Information
It is recommended to use Concurrent Collector, which gives the best performance.
Here are the recommended Garbage Collector configuration parameters:
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled
-XX:ParallelGCThreads=16 -XX:+CMSCompactWhenClearAllSoftRefs -XX
:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark
-XX:+CMSConcurrentMTEnabled -XX:ParallelCMSThreads=2
The preceding JVM options enable the Concurrent Garbage Collector. It configures
to use 16 Parallel Garbage Collector threads. It is recommended to configure Parallel
Garbage Collector threads equal to the number of CPU cores. For example, if the
Liferay Portal server has two quad core CPUs, this parameter should be configured
to 8. It also configures to use two CMS ( Concurrent Mark and Sweep ) threads.
Garbage Collection is a very vast subject, and it is recommended to go through the
following URL for more details:
http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html
The Java Heap configuration
Another important aspect that affects the performance of Java Virtual Machine is
Java Heap . JVM divides Java Heap into multiple sections. These sections include:
• Eden space
• Survivor space
• Old or tenured space
• Permanent generation space
• Code cache
It is very important to configure these spaces carefully for better performance. JVM
Heap can be configured using JVM arguments. Here is the recommended JVM Heap
configuration for Liferay Portal installed on a server with less than 8 GB RAM:
-server -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx2048m
-XX:MaxPermSize=200m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -
XX:MaxTenuringThreshold=15
If the RAM of the server is greater than or equal to 8 GB, it is recommended to
configure the Liferay Portal tomcat server with the following JVM parameters:
-server -d64 -XX:NewSize=3072m -XX:MaxNewSize=3072m -Xms6144m
-Xmx6144m -XX:PermSize=200m-XX:MaxPermSize=200m -XX:SurvivorRatio=6
-XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=0-
XX:+UseParNewGC -XX:ParallelGCThreads=16-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled -XX:+CMSCompactWhenClearAllSoftRefs
-XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark
 
Search WWH ::




Custom Search