Liferay Performance Tuning is aimed to collect one of the most important aspects to deliver user experience of any website or portal with help of performance enhancing tweaks, tips and techniques. We have hereby provided optimization areas and performance tuning tips for Liferay as well as Web, Application and Database layer.
You may need to fine tune Liferay Portal performance, especially if your site traffic shoots up than you’d expected. Though having tons of rich UI/features users wouldn’t like a portal with slow response time.
Best Practices importance may vary however it is essential to measure various key performance areas including server metrics, tweak configuration based on load tests, and verify that the changes were helpful to achieve optimum performance.
1.1 Enable Keep Alive in httpd.conf
This parameter is to allow more than 1 request per TCP connection. MaxKeepAliveRequest sets the maximum number of requests allowed per persistent connection.
1.2 Enable MPM worker
This module implements a hybrid multi-process multi-threaded server. By using threads to serve requests, it is able to serve a large number of requests with fewer system resources than a process-based server. However, it retains much of the stability of a process-based server by keeping multiple processes available, each with many threads.
(a) Enable line in /etc/sysconfig/httpd
1.3 Configure MPM worker
Configuration parameters will be dependent upon concurrency expected.
1.4 Change LogLevel
1.5 Configure ETag
1.6 Use mod_jk instead of mod_proxy for connecting to Liferay tomcat from Apache.
Ensure JK module is enabled/configured in Apache. Using mod_jk is preferred to use by Liferay for clustering as mod_proxy module has its own performance issues. Along with this we are configuring static contents to be served from Apache, hence static contents should be placed on Apache Web Server local file-system.
Header set Cache-Control “private, no-cache, no-store, proxy-revalidate, no-transform” Header set Pragma “no-cache”
2.1 Optimize thread pool in Tomcat
Each incoming request to the application server consumes a worker thread for the duration of the request. When no threads are available to process requests, the request will be queued waiting for the next available worker thread. In a finely tuned system, the number of threads in the thread pool should be relatively balanced with the total number of concurrent requests. There should not be a significant amount of threads.
Liferay Engineering recommends setting this initially to 50 threads and then monitoring it within your application server’s monitoring consoles. You may wish to use a higher number (e.g. 250) if your average page times are in the 2-3s range
Apache should be configured to connect on AJP port i.e. 8009 with help of topic 1.6 defined in the guide
(a) $CATALINA_HOME /conf/server.xml
2.2 Fine tune JVM settings as suggested by Liferay.
Tuning the JVM primarily focuses on tuning the garbage collector and the Java memory heap. These parameters look to optimize the throughput of your application.
(a) We suggest removing unwanted applications which are deployed in the server.
2.4 Optimize Database Thread pool
The database connection pool is generally sized at roughly 20-30% of the thread pool size. The connection pool provides a connection whenever LPEE needs to retrieve data from the database (e.g. user login, etc). If this size is too small, requests will queue in the server waiting for database connections. However, too large a setting will mean wasting resources with idle database connections.
https://www.knowarth.com/wp-content/uploads/2017/11/Why-Liferay-is-the-best-platform-to-build-an-Intranet-Portal-1.jpg4001140Chintan Mehtahttps://www.knowarth.com/wp-content/uploads/2017/01/knowarth-logo.pngChintan Mehta2017-11-15 17:45:312018-03-06 18:21:02Why Liferay is the best platform to build an Intranet Portal?
https://www.knowarth.com/wp-content/uploads/2017/02/Community-Portal-for-a-Leading-Telecom-Company1.png6571920Krupal Khatrihttps://www.knowarth.com/wp-content/uploads/2017/01/knowarth-logo.pngKrupal Khatri2017-02-22 16:25:382017-02-28 10:55:03Community Portal for a Leading Telecom Company
https://www.knowarth.com/wp-content/uploads/2017/02/White-Paper-7.jpg6571920Krupal Khatrihttps://www.knowarth.com/wp-content/uploads/2017/01/knowarth-logo.pngKrupal Khatri2017-02-16 15:29:482017-05-02 18:40:28Unleash the Power of Collaboration through Partner Portal
https://www.knowarth.com/wp-content/uploads/2016/12/White-Paper-1.jpg6571920KNOWARTH Adminhttps://www.knowarth.com/wp-content/uploads/2017/01/knowarth-logo.pngKNOWARTH Admin2016-12-20 18:08:462017-04-10 17:58:12Digital Disruption in Banking Industry
https://www.knowarth.com/wp-content/uploads/2016/12/Digital-Experience-in-Automotive-Industry-2.jpg6571920KNOWARTH Adminhttps://www.knowarth.com/wp-content/uploads/2017/01/knowarth-logo.pngKNOWARTH Admin2016-12-01 11:54:052017-04-10 17:59:09Digital Experience in Automotive Industry