RE: Liferay performance issue

thumbnail
تم تعديل Nor EL MALKI منذ 8 سنوات من الدقائق. New Member المشاركات: 14 تاريخ الإنضمام: 27‏/8‏/16 المشاركات الحديثة
Hi,

We are encountering a performance issue when trying to access Liferay management pages, each page call is taking up to 50 seconds.

The performances were good at the Liferay setup time.

Is there any advice to boost the load time?

Here is our Liferay installation characteristics :
  • Liferay version: 7.0.3 GA4
  • VM settings: debian 8.9 / 16 G RAM / 4 Processors Intel Xeon
  • Elastic search version : 2.2.0
  • MySQL version : 5.7.17
  • MySQL directory size (/var/lib/mysql) : 1.4 G
  • Data directory size (liferay-ce-portal-7.0-ga4/data) : 24 G


TIA
thumbnail
تم تعديل Christoph Rabel منذ 8 سنوات من الدقائق. Liferay Legend المشاركات: 1555 تاريخ الإنضمام: 24‏/9‏/09 المشاركات الحديثة
You need to find the root cause, I'd suggest you enable some logging.

But before you do that, stop Liferay, delete osgi/state, both work folders and the tomcat/temp folder and start it again. You might also try to undeploy all your own modules to find if it also happens without any of your code.

To enable logging:
Go to Control Panel -> Configuration -> Server Administration -> Log Levels
A good start is to set "com.liferay.portal.servlet.MainServlet" to all. Maybe this gives you a hint.

Also, you could enable slow query log in mysql.

Also, try to get some stacktraces: "kill -3 <Tomcat_PID>" should give you a hint in which methods it waits. Look for locks. If CPU is used, you might also do a "top -H" to find the thread that uses the CPU. You can then convert the pid to hex and look into the stacktrace to find it. This article describes the idea:
http://www.nurkiewicz.com/2012/08/which-java-thread-consumes-my-cpu.html

With those stacktraces you might get an idea which part of the code gets stuck and enable logging for those classes to get a clearer picture.

hth
thumbnail
تم تعديل Nor EL MALKI منذ 8 سنوات من الدقائق. New Member المشاركات: 14 تاريخ الإنضمام: 27‏/8‏/16 المشاركات الحديثة
Thanks Christoph
thumbnail
تم تعديل Nor EL MALKI منذ 8 سنوات من الدقائق. New Member المشاركات: 14 تاريخ الإنضمام: 27‏/8‏/16 المشاركات الحديثة
Thanks Christoph,

I enabled debugging on "org.hibernate.loader.Loader" to check on database calls. I noticed that the processServicePre method on MainServlet is generating too much databases calls :
  • When accessing to Content -> Document and Media, it generates 80337 calls.
  • When accessing to Configuration -> Application Display Template, it generates 15564 calls.
  • When publishing a new Web Content, it generates 15796 calls.


Is there a way to overcome this issue (maybe some Liferay caching) ? or is it a bug that should be raised ?

PS. I also tried disabling any extra modules in our liferay instance, but it didn't improve performances.

Thanks again for your help !

Nor
تم تعديل Deependra Singh منذ 8 سنوات من الدقائق. New Member المشاركات: 19 تاريخ الإنضمام: 13‏/11‏/13 المشاركات الحديثة
Hi,

To improve the page performance you can enable the SPA engine as it is disabled by default.
Steps to enable SPA engine -
Go to System Settings -> Foundation -> Fronted SPA Infrastructure. The Cache Expiration Time is -1 by default.
Update the cache expiration and provide value as 10(This value can vary as per your requirement)
thumbnail
تم تعديل Nor EL MALKI منذ 8 سنوات من الدقائق. New Member المشاركات: 14 تاريخ الإنضمام: 27‏/8‏/16 المشاركات الحديثة
Thanks Deependra, it works perfecly !