1

I have Liferay 6 with Tomcat system setup on two machines:

Machine 1: Windows 2003 Server 2GB RAM, 2Gh CPU Mysql Ver 14.14 Distrib 5.1.49 Liferay 6.0.6 with Tomcat 6

Machine 2: Linux CentOS 5.5 4GB RAM, 2Gh CPU Mysql Ver 14.14 Distrib 5.5.10 Liferay 6.0.6 with Tomcat 6

Both the liferay systems are having identical startup parameters and mysql configurations. The liferay system contains a custom theme and a servlet filter hook checking each URL access.

We have written a Grinder script to test the load of the system starting with 50 concurrent users .

The test script does the following things:

  1. Open home page
  2. Login with username/password
  3. Enter security key (custom portlet)
  4. Move to a private community
  5. Logout

On Windows system the response time is as expected (nearly 40 seconds mean time for each test in Grinder). However on the Linux system the response time is too high (nearly 4mins) for the same operations.

We tried revising the mysql, tomcat, connection pool and few other parameters but all resulting the same. Also the liferay were tested using mysql of the other machine (machine 1 liferay -> machine 2 mysql)

We are facing the same issue on Linux machines in our test environment and also at our client's end.

dhaval
  • 7,611
  • 3
  • 29
  • 38

2 Answers2

1

This looks like a duplicate question. I suspect your issue is related to memory / jvm configuration and specifically garbage collection. High CPU utilization under small loads tend to point in that direction.

stackfish
  • 251
  • 1
  • 3
0

In your Grinder script, have you set each of the steps as a separate transaction? This will allow you to see how much time each step is taking. It might be useful to know if everything is slower across the board, or if it's just one transaction type that's slowing you down.

Also, is there anything in the Tomcat logs on the Linux box you aren't seeing on windows? Unexpected java stack traces, etc?

Finally, are the databases on each machine identical? Do they have the same amount of data? Do they have the same indexes?

edit: Is it one transaction that's taking up all the extra time, or is each transaction slower? When you run 'top' on your linux box, is it the tomcat java process that's eating all your CPU, or some other process?

Travis Bear
  • 13,039
  • 7
  • 42
  • 51
  • Grinder script is compartmentalizing each page request into multiple requests and shows in the result set. We have also added new function to calculate the total time taken by entire test as the script does not reporting total time. Tomcat log is not having anything unusual besides the regular log message. Databases on each machine are having identical values. Lately we have been testing with only liferay specific data so we are not entering any special data. – dhaval Aug 10 '11 at 17:40
  • We have found that the CPU utilization (load average value in top command) is unexpectedly high on this machine during the test, but unable to indentify that how two different linux machines in two different premises can have the same issue. – dhaval Aug 10 '11 at 17:43
  • java is taking 80% to 85% of the CPU time but never goes to 100% just like it does under Windows machine. load average value which is a concern for us is coming 20 to 24 for last 60 seconds during test run. Top 5 processes to take CPU times are: kjournald, hald-addon-star, kblockd/0, java and mysql – dhaval Aug 11 '11 at 06:10
  • we have started using AppDynamics to find out the part/request which is responding slower. We found that the following code blocks the thread. `com.mchange.v2.resourcepool.BasicResourcePool.checkinResource(BasicResourcePool.java:683)` We are using C3PO for the connection pooling – dhaval Aug 11 '11 at 06:14