Notes |
(0004549)
vicsanca
05-04-10 02:47
|
Bad performance confirmed in 3.1.10 with quad core.
It's possible to fix in the 3.1.x without migrating to 4.0.x? |
|
(0004550)
vicsanca
05-04-10 04:28
edited on: 05-04-10 04:30
|
More info.
Centos 5.4 32bits default install. Quad core CPU. 1GB RAM. Java Sun 1.6 rev18.
Under heavy load "top" only shows one core in use and others idle. In test application one thread used CPU at 100% and other requests to the server were served but very slowly (like with old green threads). Older server with Pentium 4HT+Resin 2.1+Java 1.4.2 worked better than new Xeon+Resin 3.1+1.6 under concurrency.
|
|
(0004553)
vicsanca
05-05-10 00:05
edited on: 05-05-10 00:22
|
Unable to reproduce error. Checked with this class and this jsp.
This jsp puts heavy cpu load in all cores and lets one free for resin. Resin works fine.
Then it's not true or only happens with resin jsp requests. Maybe a resin thread pooling problem?
<%@ page contentType="text/plain; charset=utf-8" language="java" import="" %>
<%
int cpus=Runtime.getRuntime().availableProcessors();
out.println("cores="+cpus);
int cores=cpus-1;
if (cores==0) cores=1;
out.println("threads to test="+cores);
java.util.Vector v=new java.util.Vector();
out.println("***********START*******************");
for(int i=1;i<=cores;i++) {
cputest.TestThread t=new cputest.TestThread(i,out);
t.start();
v.addElement(t);
}
try {
Thread.sleep(30000);
}catch(Exception err) {}
for(int i=0;i<v.size();i++) {
cputest.TestThread t=(cputest.TestThread)v.elementAt(i);
t.stopThread();
}
out.println("************STOP*******************");
%>
I will try with some http stress tool.
|
|
(0004554)
vicsanca
05-05-10 00:53
edited on: 05-05-10 00:56
|
Resin seems to work fine. Try HttpTest with a simple hello world jsp page.
First parameter it's the number of concurrent clients(threads).
Second parameter it's the time to test.
Third parameter it's the url
I launched 3-4 threads against my quad core and top showed all cpus in use. I think now that maybe it's not a bug
|
|
(0004600)
ferg
05-20-10 10:06
|
Resin itself does not limit the number of cores or CPUs.
However, Resin 4.0.x has removed a good deal of synchronization blocks compared to Resin 3.1.x. By reducing the locking, Resin 4.0.x has improved the multi-cpu performance.
These changes cannot be made in Resin 3.1.x because it's not like a bug fix where you fix a few lines or code; it's a system-wide cleanup of locking code. |
|