Foren

Hugepages in Liferay

Adam Brown, geändert vor 6 Jahren.

Hugepages in Liferay

Junior Member Beiträge: 27 Beitrittsdatum: 17.07.17 Neueste Beiträge
Liferay 6.2 EE would seem to be able to benefit from hugepages. Not transparent hugepages, though. Does anyone have any thoughts on this?
Running on Centos 6 with JDK8. I'm going to disable THP and manually enable hugepages in sysctl.
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Adam,

This is a new one for me but it looks interesting. Are you asking if it is possible because you haven't tried it yet and are curious? or are you asking because you have tried it and you don't see it working?
Adam Brown, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Junior Member Beiträge: 27 Beitrittsdatum: 17.07.17 Neueste Beiträge
I'm playing around with it now, trying to tune performance. I know that transparent hugepages can cause severe performance issues with some JVM applicatiomns.
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hey Adam,

I'm super interested in the results. If you have the time, please do share what you find emoticon
Adam Brown, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Junior Member Beiträge: 27 Beitrittsdatum: 17.07.17 Neueste Beiträge
Added the following to the tomcat JAVA_OPTS.
JAVA_OPTS="$JAVA_OPTS -XX:NewSize=3072m -XX:MaxNewSize=3072m -XX:SurvivorRatio=65536 -XX:TargetSurvivorRatio=0 -XX:MaxTenuringThreshold=0 -XX:+UseParNewGC -XX:ParallelGCThreads=16 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85 -XX:+CMSScavengeBeforeRemark -XX:+CMSConcurrentMTEnabled -XX:ParallelCMSThreads=2 -XX:+UseCompressedOops -XX:+DisableExplicitGC -XX:-UseBiasedLocking -XX:+BindGCTaskThreadsToCPUs -XX:+UseFastAccessorMethods -XX:+AlwaysPreTouch -XX:LargePageSizeInBytes=256m"


Disabled transparent hugepages and set the following on a 15GB of RAM machine.
AnonHugePages:     26624 kB
HugePages_Total:    5120
HugePages_Free:     1613
HugePages_Rsvd:      680
HugePages_Surp:        0
Hugepagesize:       2048 kB


Just making those changes on a single server, no code improvements, reduced average response time from 15 seconds to 8 seconds for 1000 users over five minutes. The 1000 users hit 8 URLs apiece after login. Login is with SSL certificate, so that adds to the processing time.

I know the JAVA_OPTS need to be tuned more, that was just a starting point.
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Wow -- that's awesome. What kind of content is being pulled back from those 8 links?
Adam Brown, geändert vor 6 Jahren.

RE: Hugepages in Liferay

Junior Member Beiträge: 27 Beitrittsdatum: 17.07.17 Neueste Beiträge
A ridiculous amount of libraries and theme stuff from a hundred legacy sites. Otherwise just some basic text, css, and imagery.