What are the different elements of Liferay Performance Tuning?
Liferay Performance Tuning

What are the different elements of Liferay Performance Tuning?

Liferay performance tuning is related to providing an improved performance ratio for the testing system with a set of services by reallocating and shifting/updating some of the available computing and network resources. It is a required term to denote certain configurations in Java virtual machines and the overall frameworks that support the Liferay application.?

Looking after the performance of any portal is a very important aspect because every brand has a target audience that always looks up to new changes and extensions to the existing customer experience they are having. To cope with the ever-changing audience mode, it's ultimately required to fetch your business portal with new advanced features.?

Opting for a Liferay Performance Tuning will help to find out the cross points and revoke their crisis to form a better space.?

Elements of Liferay Performance Tuning:?

Here we will be discussing the different elements of the conceptual Liferay Performance Tuning.?

Memory tuning:?

For optimizing the Liferay Portal performance from its core, looking at the memory performance is the very first thing one can do. For this, you need to configure JVM parameters. This will be helpful in improving the performance of the production servers. Primarily, this will be more related to memory usage and the overall digital garbage collection.?

Basic performance tasks include:?

  1. Set Xms and Xmx to the same value.?

  1. Update the setenv.sh file.?

  1. Increase the JVM settings depending on the available memory.?

Using CSS Sprites?

CCS sprites, also called image sprites, are a collection of different images put into a single image. Consider that if any web page has multiple numbers of big, small, and medium-sized images, then it will be taking up a lot of their space and also making them slow. Therefore, using CSS styles is considered a preferable method for reducing the number of image requests.?

How you can perform this action is:?

  1. Combine your background images into a single image first.?

  1. Use the CSS background-image and background-position properties.?

  1. This will display the desired image segment.?

  1. Liferay has a new property called theme.images.fast.load.?

  1. It acts as a default for TRUE in the normal stage and FALSE in the development stage.?

  1. When the server starts, it automatically creates two files, ". sprite.png" and "sprite.properties.".?

  1. These files are only created in each image folder when they're required.?

  1. These relative files are displayed in "packed.png" if this feature is enabled.?

  1. Having automated tabs read the files will significantly enhance the load time.?

Implementing Cache Filter?

Cache filters are used to provide the client-side cache for the HTTP protocol. Liferay's implemented portal takes advantage of these server-based filters to manipulate the headers, gzip the content, and strip empty or unwanted spaces from it. These are called?

  1. Cache Header Filter?

  1. Caching Strip Filter?

  1. Compress Filter?

However, to note down here, the thing is that these filters are applied to each file on request, and this can be an expensive job for the brands, both in terms of processing and memory. The header filter is the most important; it saves the client-side cache. Following this, a strip filter and a compress filter are applied.?

In the new scenario, the cache header filter does not strip or compress; instead, it encodes and fetches it with the original data if it is not changed.?

"Never Expire" Header and Scripts at the Bottom?

For "Never Expire," you should be able to remember two different things:?

  1. For static components, you can implement this policy by setting a far-future Expires header.?

  1. For dynamic components, you need to use the appropriate cache-control header to help the browser perform conditional requests.?

By using the Expire header, you can make different components cacheable. For example, a first-time portal user is prone to making several HTTP requests. Using the Expire header will avoid unnecessary HTTP requests on subsequent page views. Although the Expire header is commonly used with images, it should be used for all components, including scripts, stylesheets, and Flash.?

In terms of scripts, it is suggested that the browser should not download any other files, even on different hostnames. This is because the scripts can actually block two parallel downloads. If possible, you must adopt <footer-portlet-javascript> instead of <header-portlet-javascript> in your liferay-portlet.xml. To be noted, the style sheets should be on top.?

JVM Tuning:?

JVM stands for Java Virtual Machine. Its tuning is basically focused on adjusting Java heap/non-heap settings and the configuration of garbage collection. This overall process includes the following activities to be performed:?

  1. setting up heap or non-heap space.?

  1. Setting up a survivor space?

  1. Configuring Garbage Collection on Java 8, Java 11?

  1. Considering or configuring large pages on a device?

  1. Considering or configuring large pages on JVM?

  1. Basically, JVM is all about monitoring the garbage collection and testing the sample concentrations in their own environment.?

Database configuration:?

The steps to configure a database are as follows:?

  1. Creating a database that is UTF-8.?

SQL Example: Create a database portal character set to utf8;?

  1. Now set up a database, and the based user will have all database permissions. You can restrict the database users from having access to all the permissions via the High Security Database User Practice. To be noted is that the database user must at least have permission to read and write data, as it is required by Liferay.?

  1. Next, you need to install the JDBC Connector. DXP has many open-source-based JDBC connectors in the $CATALINA_BASE/webapps/ROOT/WEB-INF/shielded-container-lib folder (for Liferay DXP version 7.4) and in the $CATALINA_BASE/lib/ext folder (for previous versions of Liferay).?

  1. JDBC connectors for proprietary databases like Oracle, etc. should be loaded via the respective vendor.?

Final Words?

All the above-mentioned different elements of Liferay performance tuning will be performed well if you select the right Liferay DXP performance tuning service provider. Aixtor can help address your exact requirements and even more.?

DXP tuning is well accepted by decomposing and optimizing the performance of each individual component. You just need to understand the environment and give it your best shot while applying the configuration in your testing environments, via us!?

要查看或添加评论,请登录

AIXTOR Technologies的更多文章