Databases Reference
In-Depth Information
Similarly, if the value of the numBusyConnections attribute is very low as compared
to the value of the maxPoolSize attribute, it indicates that the database connection
pool is oversized.
Cache - monitoring and tuning
In Chapter 4 , Caching Best Practices , we spoke about how to provide custom
configuration for default Ehcache-based caching. Liferay creates many cache
instances for both multi-VM and Hibernate cache managers. Liferay includes the
default cache configuration for each cache instance. Depending upon the Portal,
requirement-specific cache instances can be tuned to improve performance. Liferay
Portal exposes cache information using JMX MBeans. Liferay Portal exposes two
types of cache information: one is related to actual cache objects and the other one is
for overall cache statistics. During load testing, cache statistics should be monitored.
By default, cache statistics are not exposed via JMX MBeans. It is required to enable
cache statistics using the Liferay Portal configuration. Here are the steps to enable
cache statistics in our setup:
1.
Stop both Liferay Portal nodes if they are already running.
2.
Now add the following properties in portal-ext.properties of the
two nodes:
#
# To enable cache statistics for Single VM, Multi VM
# Cache Managers
#
ehcache.statistics.enabled=true
#
# To enable cache statistics for Hibernate cache manager
#
hibernate.generate_statistics=true
3.
Restart both the Liferay portal nodes.
We enabled cache statistics for both Liferay Portal's cache manager and Hibernate's
cache manager. Once cache statistics are enabled, we can monitor cache statistics
using JConsole. Here are the steps to monitor the cache using JConsole:
1.
Open JConsole and connect JConsole with the Liferay Portal node.
2.
In JConsole, navigate to the MBeans tab and then expand net.sf.ehcache |
CacheStatistics | liferay-multi-vm-clustered .
 
Search WWH ::




Custom Search