Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003991 [Resin] minor always 04-12-10 08:25 05-20-10 10:06
Reporter alex View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.10
Summary 0003991: Resin does not use more than 1 CPU
Description rep by: SHINOMIYA Nobuaki

related bug: http://bugs.caucho.com/view.php?id=3465 [^]
Additional Information
Attached Files  TestThread.class [^] (2,560 bytes) 05-05-10 00:01
 HttpTest.class [^] (2,984 bytes) 05-05-10 00:50
 HttpTest.java [^] (2,007 bytes) 05-05-10 02:09
 TestThread.java [^] (1,753 bytes) 05-05-10 02:10

- Relationships

- 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.
 

- Issue History
Date Modified Username Field Change
04-12-10 08:25 alex New Issue
05-04-10 02:47 vicsanca Note Added: 0004549
05-04-10 04:21 vicsanca Issue Monitored: vicsanca
05-04-10 04:28 vicsanca Note Added: 0004550
05-04-10 04:30 vicsanca Note Edited: 0004550
05-04-10 12:35 stbu Issue Monitored: stbu
05-05-10 00:01 vicsanca File Added: TestThread.class
05-05-10 00:05 vicsanca Note Added: 0004553
05-05-10 00:21 vicsanca Note Edited: 0004553
05-05-10 00:22 vicsanca Note Edited: 0004553
05-05-10 00:50 vicsanca File Added: HttpTest.class
05-05-10 00:53 vicsanca Note Added: 0004554
05-05-10 00:56 vicsanca Note Edited: 0004554
05-05-10 02:09 vicsanca File Added: HttpTest.java
05-05-10 02:10 vicsanca File Added: TestThread.java
05-20-10 10:06 ferg Note Added: 0004600
05-20-10 10:06 ferg Assigned To  => ferg
05-20-10 10:06 ferg Status new => closed
05-20-10 10:06 ferg Resolution open => fixed
05-20-10 10:06 ferg Fixed in Version  => 4.0.7


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
49 total queries executed.
32 unique queries executed.
Powered by Mantis Bugtracker