3 Replies Latest reply on May 11, 2006 8:19 AM by amshapira

    Serious Performance Issues with JBoss 4.0.4 Web-Services (JB

    amshapira

      Hi,
      I had a test of comparing webservice performance with jbossws on jbos 4.0.4 and jboss.net over jboss 3.2.5
      I found out that jbossws was working several times slower (!!!).

      the results:
      on JBoss 4.0.4CR2 on windows with document literal donotunwrap(wrap):
      loop 10 times in 126632 ms
      average round 12663 ms
      loop 50 times in 456880 ms
      average round 9137 ms

      on JBoss 3.2.5 on windows with rpc literal:
      loop 10 times in 23695 ms
      average round 2369 ms
      loop 50 times in 108643 ms
      average round 2172 ms

      here is the bean:

      public class AmsItemManagerBean implements SessionBean{
      
       public AmsItem[] getAmsItemArray(boolean bool1, String str1, String str2, boolean bool2, boolean bo
      ol3) throws RemoteException {
       AmsItem[] amsItems = new AmsItem[1000];
      
       short shrt = 1;
       long lng = 2;
       String str = "ejbTest";
       long begin = 0;
       long end = 0;
       long begin2 = 0;
       long end2 = 0;
       AmsItem[] utia;
       begin2 = System.currentTimeMillis();
       int rounds = 1000;
       for (int i=0; i<rounds; i++) {
       AmsItem amsItem = new AmsItem(str,lng,shrt,shrt,str,str,1,new Date(),shrt,new Date(),shrt,new Str
      ing[5]);
       amsItems
       = amsItem;
       }
       end2 = System.currentTimeMillis();
       System.out.println("returning amsItem[] with length:" + amsItems.length + " in "+ (end2-begin2) + " ms");
       return amsItems;
       }
      ...
      }
      
      


      the test code:
      public class MainTest {
      
       public static void main(String[] args) {
       AmsAmsItemEjbService AmsAmsItemEjbService = new AmsAmsItemEjbService_Impl();
       try {
       AmsItemManager amsItemManager = AmsAmsItemEjbService.getAmsItemManagerPort();
       long begin = 0;
       long end = 0;
       long begin2 = 0;
       long end2 = 0;
       AmsItem[] utia = null;
       begin2 = System.currentTimeMillis();
       int rounds = 10;
       for (int i=0; i<rounds; i++) {
       begin = System.currentTimeMillis();
       utia = amsItemManager.getAmsItemArray(true,"aaa","b",false,false);
       end = System.currentTimeMillis();
       System.out.println("returned: " + utia.length + " in " + (end-begin) + " ms");
       }
       end2 = System.currentTimeMillis();
       System.out.println("loop " + rounds + " times in " + (end2-begin2) + " ms");
       System.out.println("average round " + (end2-begin2)/rounds + " ms");
       } catch (ServiceException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       } catch (RemoteException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
       }
      }
      


      and the wsdl that created by wscompile:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <definitions name="AmsItemEjbService" targetNamespace="http://obj.ams.webservicesejb.com/" xmlns:tns="http://obj.ams.webservicesejb.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://obj.ams.webservicesejb.com/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types>
       <schema targetNamespace="http://obj.ams.webservicesejb.com/types" xmlns:tns="http://obj.ams.webservicesejb.com/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
       <complexType name="getAmsItemArray">
       <sequence>
       <element name="boolean_1" type="boolean"/>
       <element name="String_2" type="string" nillable="true"/>
       <element name="String_3" type="string" nillable="true"/>
       <element name="boolean_4" type="boolean"/>
       <element name="boolean_5" type="boolean"/></sequence></complexType>
       <complexType name="getAmsItemArrayResponse">
       <sequence>
       <element name="result" type="tns:AmsItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
       <complexType name="AmsItem">
       <sequence>
       <element name="ams1" type="string" nillable="true"/>
       <element name="ams10" type="dateTime" nillable="true"/>
       <element name="ams11" type="short"/>
       <element name="ams12" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
       <element name="ams2" type="long"/>
       <element name="ams3" type="short"/>
       <element name="ams4" type="short"/>
       <element name="ams5" type="string" nillable="true"/>
       <element name="ams6" type="string" nillable="true"/>
       <element name="ams7" type="int"/>
       <element name="ams8" type="dateTime" nillable="true"/>
       <element name="ams9" type="short"/></sequence></complexType>
       <element name="getAmsItemArray" type="tns:getAmsItemArray"/>
       <element name="getAmsItemArrayResponse" type="tns:getAmsItemArrayResponse"/></schema></types>
       <message name="AmsItemManager_getAmsItemArray">
       <part name="parameters" element="ns2:getAmsItemArray"/></message>
       <message name="AmsItemManager_getAmsItemArrayResponse">
       <part name="result" element="ns2:getAmsItemArrayResponse"/></message>
       <portType name="AmsItemManager">
       <operation name="getAmsItemArray">
       <input message="tns:AmsItemManager_getAmsItemArray"/>
       <output message="tns:AmsItemManager_getAmsItemArrayResponse"/></operation></portType>
       <binding name="AmsItemManagerBinding" type="tns:AmsItemManager">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <operation name="getAmsItemArray">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal"/></input>
       <output>
       <soap:body use="literal"/></output></operation></binding>
       <service name="AmsItemEjbService">
       <port name="AmsItemManagerPort" binding="tns:AmsItemManagerBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>