To be done.
To be done.
Need detailed deliberation on tuning of my.cnf.
Tuning the Application Server is most important to see 'real' performance improvement.
To be done.
To be done.
To be done.
Clustering is needed for scalability, increased availability, and load balancing.
If you are using Sun Glassfish Enterprise Server as the application server, you can refer to the following links for the information on clustering:
http://developers.sun.com/appserver/reference/techart/glassfishcluster/
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV2Architecture
http://docs.sun.com/app/docs/prod/gf.entsvr.v3pre?l=en&a=view
Memory is one of the first things to look at when you want to optimize performance. If you have any disk swapping, that will have a serious impact on performance. Make sure that your server has an optimal amount of memory and that your JVM is tuned to use it.
There are three JVM command switches that control the amount of memory it will use.
Java heap size:
-Xms
VM heap size:
-Xmx
PermGen space:
-XX:MaxPermSize
These three settings control the amount of memory available to the JVM initially, the maximum amount of memory into which the JVM can grow, and the separate area of the heap called Permanent Generation space.
For example, the default settings can be:
-Xms128m -Xmx1024m -XX:MaxPermSize=128m
This is perfectly reasonable for a moderately sized machine or a developer machine. These settings allow the JVM to initially take 128MB of RAM, grow up to 1024MB of RAM, and have a PermGen space of 128MB. If, however, you have Liferay on a server with 4GB of RAM and you are having performance problems, the first thing you might want to look at is increasing the memory available to the JVM. You will be able to tell if memory is a problem by running a profiler (such as Jprobe or YourKit) on the server. If you see Garbage Collection (GC) running frequently, you will definitely want to increase the amount of memory available to the JVM.
Issues with PermGen space can also affect performance. PermGen space contains long-lived classes, anonymous classes and interned Strings. Hibernate, in particular-which WebSynergy uses extensively? has been known to make use of PermGen space. If you increase the amount of memory available to the JVM, you may want to increase the amount of PermGen space accordingly.
There are also some changes you can make to your portal-ext.properties file once you are in a production environment.
Set the following to false to disable checking the last modified date on server side CSS and JavaScript:
last.modified.check=false
Set this property to true to load the theme's merged CSS files for faster loading for production. By default it is set to false for easier debugging for development. You can also disable fast loading by setting the URL parameter css_fast_load to 0.
theme.css.fast.load=true
Set this property to true to load the combined JavaScript files from the property javascript.files into one compacted file for faster loading for production. By default it is set to false for easier debugging for development. You can also disable fast loading by setting the URL parameter js_fast_load to 0.
javascript.fast.load=true
Also, set the following parameters:
portlet.css.enabled=false
velocity.engine.resource.manager.cache.enabled=true
com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter=true
WebSynergy comes by default with a number of servlet filters enabled and running. It is likely that for your installation, you don't need them all. Two filters that you can disable without any impact are the Compression Filter and the Strip Filter. These filters are responsible for shrinking the size of the response (to save bandwidth). The Strip Filter removes whitespace from the response object, and the Compression Filter compresses it. This obviously requires some processing, and so disabling these two filters can enhance performance.
To disable a servlet filter, simply comment it out of your web.xml file.
If there is a feature supported by a servlet filter that you know you are not using, you can comment it out as well to achieve some performance gains. For example, if you are not using CAS for single sign-on, comment out the CAS Filter. If you are not using NTLM for single sign-ons, comment out the Ntlm Filter. If you are not using the Virtual Hosting for Communities feature, comment out the Virtual Host Filter. The fewer servlet filters you are running, the less processing power is needed for each request.
WebSynergy comes pre-bundled with many portlets which contain a lot of functionality, but not every web site that is running on WebSynergy needs to use them all. In portlet.xml and liferay-portlet.xml, comment out the ones you are not using. While having a loan calculator, analog clock, or game of hangman available for your users to add to pages is nice, those portlets may be taking up resources that are needed by custom portlets you have written for your site. If you are having performance problems, commenting out some of the unused portlets may give you the performance boost you need.
To be done.
To be done.