RE: Liferay JVM Setting Example

Jeffrey Ramspacher, modified 5 Years ago. New Member Posts: 4 Join Date: 4/11/19 Recent Posts
We are currently in the process of setting up our Liferay instance and we are trying to expand the amount of memory the server alots to Liferay.
A few important details: Liferay is the only app on this server utilizing the JVM, we are university expecting between a few thousand and ten thousand concurrent users at any given time, and we have been experiencing regular slowness since we've started on-boarding our apps into Liferay.
Currently our configuration has 16 GBs of RAM and around 1 TB of disk space. We were hoping to push the JVM up to 8 GB of allotable RAM, but Liferay throws a "not enough memory" error whenever we attempt to expand it. Does anyone have any suggestions or examples about a suggested setup? Here is our current Tomcat config:
"$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms4096m -Xmx4096m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Which Liferay version do you use?
Might be obvious, but please make sure you use a 64bit Java SDK.
Are you on Windows or Linux?
When do you get the error? At startup? Later, after some time running?
In general, it should work, I just started a Liferay server with:
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms8192m -Xmx8192m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
Amos Fong, modified 5 Years ago. New Member Posts: 4 Join Date: 4/11/19 Recent Posts
We are on DXP 7.2 that runs on a 64-bit Linux VM and we are just using the Tomcat Bundled distro.

​​​​​​​Currently our Java version is openjdk version "11.0.6", but it is 64-bit as well.
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
I tried it with JDK 8, so we have at least there a clear difference. My best guess is that you face a JDK 11 issue, since you use DXP, I would advise that you open a ticket.