Databases Reference
In-Depth Information
Lucene Coniguration
As discussed earlier, Liferay uses Apache Lucene as a search engine. If the Portal is
heavily using search functionalities, it is required to tune the Lucene search engine.
We can tune the Lucene configuration parameters from portal-ext.properties .
The Lucene engine internally maintains index changes in memory and at certain
intervals persists index changes on the filesystem. If the Portal is designed to create a
large amount of indexes, one of the important configuration is how often we commit
index changes to the filesystem. By default, Liferay is configured to commit every
index change on the filesystem. For a large number of index writes, it will slow down
the system. It is recommended to configure the following parameters in the portal-
ext.properties file as starting values and tune them during a load test:
#Set the value of batch size to configure how many consecutive
#updates will trigger a commit to file.
lucene.commit.batch.size=10000
#Set the commit time interval in milliseconds after which commits
#will be triggered. It works in conjunction with batch size. If batch
#size is greater than zero then if batch size is not reached but time
#interval is reached then commit will be triggered.
lucene.commit.time.interval=300000
Application Server configuration
best practices
In Chapter 1 , Architectural Best Practices , we talked about the reference architecture.
We choose Tomcat as an Application Server for Liferay Portal. We can choose to use
any supported Application Server with Liferay Portal. In this section, we will learn
the Application Server configuration best practices. We will focus on the Tomcat
server, which is a part of our reference architecture.
Database connection pool configuration
Liferay Portal uses the database connection pool to perform the database operation.
It is very important to size the database connection pool carefully. If the database
connection pool size is lower than what is needed, it will slow down the system.
Application threads will be in waiting mode because of busy connections. Similarly,
if the database connection pool is oversized, it will consume more resources of both
the Application Server and the Database Server. By default, the database connection
pool is configured using portal-ext.properties . Liferay Portal also supports the
database connection pool configuration through the Application Server. Liferay Portal
 
Search WWH ::




Custom Search