NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.
Issue
- Need the JVM parameters that Liferay recommends for Quarterly Release with Java 21
- The deployment checklist for tuning the Liferay DXP 7.4 contains only the instructions for tuning the JVM parameters for Java 8 and Java 11.
Environment
- Liferay Quarterly Release
- JDK 21
Resolution
- Java Virtual Machine (JVM) tuning primarily focuses on adjusting Java heap and non-heap settings and configuring garbage collection.
- The deployment checklist explicitly provides only a starting point for Liferay DXP deployment’s performance and a list of critical parameters for tuning. However, it'll vary based on the hardware and software specifications.
- Here is the Liferay documentation: Tuning your JVM for learning purposes, and the user can add the additional GC settings on Java 21 (start testing with G1’s default settings) by following the article: https://docs.oracle.com/en/java/javase/21/gctuning/garbage-first-garbage-collector-tuning.html#GUID-90E30ACA-8040-432E-B3A0-1E0440AB556A
- However, as specified in the deployment checklist, there are additional "new" algorithms like G1, but Liferay Engineering’s tests for G1 have indicated that it does not improve performance. The application performance may vary, and it should be added as per the testing and tuning plans
- Additionally, G1 Garbage Collection logs can be collected using the following JVM configuration
-verbose:gc -Xlog:gc:/tmp/liferaygc1.log
Additional Information
- There is a separate channel named "Global Service Team" where users may seek help with any performance issue or JVM configuration: Hardware-and-Performance-Issues