0

Liferay + ZK + Hibernate: Performance

asked 2009-04-16 02:05:25 +0800

mrSmall gravatar image mrSmall
30

Hi,

I am doing some short performance tests on my project:

Three configs:
1. Empty portal page
2. Page with 2 ZK Portlets, each with only a Window-Component w/o children
3. Page with 2 ZK Portlets, each with one Listbox loaded from DB over Liferay-Service (Spring, Hibernate, MySql 5) (ca. 20 Items)
4. Page with 2 ZK Portlets, each with one Listbox filled with integers 0-20 (also ca. 20 Items =)

Server: Ubuntu on Amd X2, 4GB RAM, SW RAID with 2 SATA drives
Client is the same machine, just to exclude the network as an variable.

So, now some numbers:
On 120 requests with 40 concurent request repeated 2 times, I have folowing results for

Config 4 (20 Integers in Listbox): 13-14s. mean time pro request
Config 3 (20 items from DB): 14-15s. mean time pro request
Config 2 (Empty window): 3-4s. mean time pro request
Config 1 (empty page): 1-2s. mean time pro request

Tests are made with "ab"-Tool (ApacheBench) and are very simple: no ajax, no js, nothing but one http-request.

Are listboxes so "slow" / heavy weight?

We are using much Listboxes with all possible molds in our project, that's because I made this quick test.

A real page from project (some Liferay standart portlets, and one big ZK thing with 5 Listboxes filled from DB, 2 Dateboxes and paging on one Listbox) is at 18 seconds mean time pro request (30 seconds w/o tomcat tuning), so caching is a possible solution, but unfortunatly not for this problem.

Is there a way to make Listboxes faster?

Best regards,
mrSmall.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-04-16 07:50:07 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

In my experience,
It is impossible spending 14s for loading a listbox with only 20 item and 40 current users.
it maybe a protlet/db back-end bottleneck , please test a pure portlet with data-access/display (without zk) first.

link publish delete flag offensive edit

answered 2009-04-16 07:52:02 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

A old performance test result one year ago.
http://docs.zkoss.org/wiki/Five_Times_Faster_-_The_Performance_Test_On_ZK_3.0_RC

link publish delete flag offensive edit

answered 2009-04-16 08:50:35 +0800

mrSmall gravatar image mrSmall
30

Hi,

just tested forEach instead of listbox
<label forEach="${list}" value="${each}" />
and got 12-13 seconds...

And the same portlet, but without my init.zs which is loaded with every page (get current userId, sync ZK Locale with Liferay Locale, etc.) got 3-4 seconds...

Bottleneck is found... it's my code, not ZK... ZK ist still great!

Best regards/ mrSmall.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-04-16 02:05:25 +0800

Seen: 389 times

Last updated: Apr 16 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More