Foren

High CPU usage after 10 days running Liferay

Gerald Madlsperger, geändert vor 7 Jahren.

High CPU usage after 10 days running Liferay

New Member Beiträge: 7 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi,

We have some nasty CPU problems with our portal instances when they are running for around 7-10 days.
The problem was already worse which we could solve with updating some components according to LPS-12516.

As you can see the methods com.liferay.faces.util.map.AbstractPropertyMap.containsKey() and java.util.concurrent.ConcurrentHashMap$Traverser.advance() are using most of the CPU in the snapshot of 2 minutes:


At least for the Traverser I can see, that it comes from RequestScoped... classes. Further in a small memory snapshot I can see that there are many RequestScopedMapEntries. Is this behaviour normal?



regards,
Gerald
thumbnail
Neil Griffin, geändert vor 7 Jahren.

RE: High CPU usage after 10 days running Liferay

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Gerald,

Thank you for reporting this problem.

When you get an opportunity, please let us know the versions of the following products in your environment:
1. Liferay Portal
2. Liferay Faces Bridge
3. Server (Tomcat, Wildfly, etc.)
4. Mojarra

After we receive this information we will be able to try and reproduce the problem.

Thank you,

Neil
Gerald Madlsperger, geändert vor 7 Jahren.

RE: High CPU usage after 10 days running Liferay

New Member Beiträge: 7 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi Neil,

Thank you for the fast reply.
We are using these versions:

  • Liferay Portal => 6.1.20-ee-ga2
  • Liferay Faces Bridge => Is this the same as portletfacesbridge? (sorry I'm no developer only the performance guy) => 3.1.5-ga6
  • JBoss => 7.0
  • Mojarra => 2.1.28


regards,
Gerald
thumbnail
Juan Gonzalez, geändert vor 7 Jahren.

Moved to Liferay Faces category

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Moved to Liferay Faces category
thumbnail
Neil Griffin, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Gerald,

If the version number is 3.1.5-ga6, then you are using Liferay Faces Bridge, and not PortletFaces Bridge.

Would it be possible for you to upgrade your portlet(s) according to our new Liferay Faces version scheme? You can use the dropdown menus on the home page of www.liferayfaces.org in order to determine the correct version numbers.

The reason I ask is because you are using artifacts from our old Liferay Faces version scheme and we are no longer maintaining those repositories.

If you still see the performance problem with the new version scheme then we would be able to try and reproduce the problem and provide a fix.

Thank you,

Neil
Gerald Madlsperger, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

New Member Beiträge: 7 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi Neil,

I'll talk with our developers and keep you updated, if the problem persists.

thank you,

Gerald
Gerald Madlsperger, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

New Member Beiträge: 7 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi Neil,

Are there also compatible versions for Portal version 6.1.2?
On the site you provided only Liferay 7 and 6.2 are selectable.

regards,
Gerald
thumbnail
Neil Griffin, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Gerald,

You are correct -- the new version scheme does not support Liferay 6.1.

Does your organization have a Liferay 6.2 or 7.0 test environment that you could use with the new Liferay Faces version scheme?

Thank you,

Neil
thumbnail
Neil Griffin, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Gerald,

Regarding com.liferay.faces.util.map.AbstractPropertyMap.containsKey() taking up too much CPU time, I think it might be caused by FACES-2605. If we were to provide a fix, would you be able to upgrade to Liferay 6.2 so that you could take advantage of our new version scheme?

Regarding the number of RequestScopedMapEntry instances, do they go away if you click the "Perform Garbage Collection" button in your profiler?

If not, then you might have com.liferay.faces.bridge.bridgeRequestScopeAjaxEnabled or com.liferay.faces.bridge.bridgeRequestScopePreserved set to as true in your portlet's WEB-INF/web.xml or WEB-INF/portlet.xml descriptor. Please let me know if that's the case.

Thank you,

Neil
thumbnail
Neil Griffin, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

Liferay Legend Beiträge: 2655 Beitrittsdatum: 27.07.05 Neueste Beiträge
Hi Gerald,

We fixed FACES-2605 in our new version scheme. As I indicate in the issue comments, the fix improved the speed of our Bridge TCK by over 6% on my local machine.

When you get an opportunity, please let me know the answers to my questions in the previous post regarding upgrading and portlet.xml/web.xml init parameter usage.

Kind Regards,

Neil
Gerald Madlsperger, geändert vor 7 Jahren.

RE: Moved to Liferay Faces category

New Member Beiträge: 7 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi Neil,

I'll forward you answer to our dev.

I think the RequestScopedMapEntries are correctly collected, as I saw them shrink and grow in size over further dumps.

Unfortunately it is not possible for us to update at this point.

regards,
Gerald