This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
it's great chance to have you on JavaRanch forums, I do have the following question regarding Liferay.
A while ago I used to develop portlets for Liferay, and we published many portals and developed several portlets on these portals, the problem that all the customers complained about was the low performance "slow portals, the pages opened slower than any other CMS" and we looked around for way to improve the portal performance.
my question in this manner is as the following: what is/are the bottle nicks that need(s) to be monitored, tuned or improved in order to improve the overall performance of the portal? is there any perferred stack in terms of OS, DBMS, Application server...etc that got better performance than others?
I looked into the book index and I'm not sure if there is something related to performance tuning.
Hi Fahd, I am learning liferay on my own. Was curious from your post and would request you to share some tips on what liferay is good at doing and what isn't as good? Any good pointers to get up and running with a DIY guide? I did visit the liferay.com website, BTW. Apart from performance any other issues you faced like integrating to SQL Server, SPS, etc?
Java Pal - Your friend in technology and innovation...India.
I didn't have the chance to run Liferay using MS SQL server as a DBMS, but I assume it won't be a big problem since Liferay supports several DBMSs including SQL server.
as for my experience: I would really like to point you to some guides but my experience is quite old "I used to develop for Liferay 5", anyway if you got any specific request I think lots of people here can help "including me"
as for the partial page loading: there is a mechanism to update parts of the pages of the portal, and since Liferay supports jQuery I would say that using AJAX calls to refresh parts of the page would be easy to do.
at the end: sorry for my short answers which I hope to be helpful, eventually my experience with Liferay is not comparable to the book author
Liferay has many ways it can be tuned. It's hard to say exactly what might have affected your particular installations. From a code standpoint, if you're deploying Liferay into a situation where performance is key, out of the gate, EE will perform faster than CE. Liferay implements new features, puts them into CE, gives them bug fixes, and then performance optimizes them for EE. So generally, every new CE release gets the performance optimizations from the previous release, but not the ones for the current release.
I did a presentation on this several Liferay symposiums back; I'll give you the main points from that presentation:
1. Adjust the server's thread pool and JDBC connection pool. You have to use a profiler and tune to the right number.
2. Turn off unused servlet filters. This can be done through the portal-ext.properties file.
3. Tune your JVM parameters. Again, you need a profiler for this.
4. Tune Liferay's cache. If your site makes heavy use of CMS objects, but not so much wiki objects, you will want to tune the CMS cache appropriately.
5. Change the Lucene index writer interval. If you're doing mostly reads, make it low. If you're doing mostly writes make it high.
6. If search is a big part of your site, offload it with Solr, and use the Solr plugin.
7. Optimize the counter increment (counter.increment in portal-ext.properties). Set it to a higher number to reduce database calls.
8. Use a CDN for static content (cdn.host).
9. If you can't use a CDN, use a web server to serve your static resources. This is done via three steps: 1) set theme.virtual.path to your Apache root, 2) Set the <virtual-path> property in your theme, and 3) Set your server proxy to exclude from the proxy the path to the theme.
10. Use Liferay's tag libraries for your code. They already include optimizations, such as the auto-creation of CSS/JS sprites for your images.
11. Use a Read-writer database. This is one database optimized for reads, and one database optimized for writes. Properties are jdbc.read.* and jdbc.write.*.