Community Forums
Combination View Flat View Tree View
Threads [ Previous | Next ]
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Performance
toggle
Performance of Liferay 5.1 tested on Quad Core CPU
8/31/08 7:34 AM
Hello

I have been doing performance testing of Liferay 5.1.0 running on a machine running on Intel Quad Core 2.67GHz CPU and Linux for the last couple of weeks.

I have written an article about my findings, you can read my article here. The article contains links to the JMeter test scripts used, and also detailed test results, analysis and areas for further investigation.

I am happy with the performance numbers when I test one URL, the "/web/guest/home". My tests then show that Liferay 5.1.0 can deliver 2200 requests per second, with average response time well under 1 second, when between 1000 and 5000 users are simultaneously hitting the server.

However, when I use the test which samples the 7500 different URLs for the sample Liferay website that was shipped as part of Liferay 5.0.0, I observe a significant performance drop. Liferay is then only able to serve 26 requests per second. I believe this is caused by the fact that memory set aside for caching pages, I guess the EhCache configuration, is so small, that each page has to be generated by the JSP engine.

Comments on my performance testing are appreciated. If anyone as some useful tips on how to easily improve or check the reasons for the major drop in performance to only 26 requests per second, I will look into them, and rerun some of the tests.

Regards
Alf Hogemark
Re: [Liferay Forums][1. Installation / Deployment / Setup] Performance of L
9/4/08 7:32 AM as a reply to Alf Høgemark.
> However, when I use the test which samples the 7500 different URLs for
> the sample Liferay website that was shipped as part of Liferay 5.0.0,
> I observe a significant performance drop. Liferay is then only able to
> serve 26 requests per second. I believe this is caused by the fact
> that memory set aside for caching pages, I guess the EhCache
> configuration, is so small, that each page has to be generated by the
> JSP engine.
>
> Comments on my performance testing are appreciated. If anyone as some
> useful tips on how to easily improve or check the reasons for the
> major drop in performance to only 26 requests per second, I will look
> into them, and rerun some of the tests.


Hello Alf,

You don't indicate which DB you're using, do this before testing:

1) access database as portal user
2) perform the following query:

update JournalTemplate set cacheable = 1; (this is for MySQL,
the 'cacheable' column of the JournalTemplate is a boolean field. Make
sure it has a value which returns "true" for your DB.)

The default site content provided with the stock 5.0.0 portal was
defective in that none of the Journal Templates were set to use caching,
so performance was horribly slow. This affects the portal running on any
DB.
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Performance
9/7/08 8:52 AM as a reply to Ray Augé.
Hi

Thanks for the reply.

I was using Liferay 5.1.0 codebase, and the sample Liferay database from version 5.0.0, where the database was running on MySQL.

I executed your query, and you are correct, the cacheable property was 0 for all rows.

I will set all these to 1, and then rerun some of the tests, and repost my results, but I have a feeling that your suggestion will improve the performance greatly.

Thanks again
Alf
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Performance
9/14/08 12:45 AM as a reply to Alf Høgemark.
Hi again

I have done some further performance testing.

I tried updating the database first, setting the JournalTemplates cacheable. It did not make much difference.

So then I thought it must be the Ehcache configuration that was wrong. I then used the exceptional useful tool VisualVM, which is part of the JDK from Build 7 of JDK 1.6 from Sun. Using this tool, I was able to fine tune my Ehcache config files, and the performance increased from about 26 requests per second to around 300 requests per second, when I was testing the 7500 different URLs. Mainly the problem was that the Ehcache settings were too small, so the caches were full, and therefor not everything was cached, leading to bad performance.

You can read more about how I used VisualVM to improve my Liferay performance in my article.
The article also mentions a couple of areas that I think will useful to investigate to try to improve the performance even more.

Regards
Alf Hogemark
RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Performance
9/14/08 3:35 AM as a reply to Alf Høgemark.
This is very interesting. Performance is still my only concern about Liferay. We are planning to do some performance tests too. We're running Liferay now on a dual Opteron server with 16 GB ram. This server runs two tomcat servers for Liferay (5.0.1, we're planning to upgrade to 5.1.x but we're having some problems with the ajax stuff in wicket) (test and production) and a third tomcat for a Solr index which we use in our portlets (Wicket based).

Pages are served according to YSlow between 1 and 4 seconds (which is too slow at the moment). I'll run some JMeter tests and hope to get started with Yourkit or some other profiler.
RE: Performance of Liferay 5.1 tested on Quad Core CPU
9/14/08 5:05 AM as a reply to Alf Høgemark.
Alf,

We had made some strides in performance with 5.1.1, primarily due to LEP-6865. The version of Velocity we were using had a good number of synchronization locks and did not leverage the Java concurrent packages. Our internal benchmarks have shown roughly a doubling of the throughput between 5.1.0 and 5.1.1

Cheers

-m