1. AdroitLogic
  2. esbperformance

Source

esbperformance / fuse / README.TXT

Use Maven 2.x to build the artifacts as:

    $ cd ~/resources/esbperformance/fuse
    $ mvn install

Increase heap memory by editing bin/servicemix to read as follows

    JAVA_MIN_MEM=2048M
    ...
    JAVA_MAX_MEM=2048M

Start Fuse ESB as

    $ cd bin
    $ ./servicemix

Copy the deployable artifacts into the ServiceMix deploy directory from within ~/resources/esbperformance/fuse

    cp ./direct-proxy/proxy-sa/target/proxy-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy
    cp ./cbr/cbr-sa/target/cbr-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy
    cp ./hbr-soap/hbr-soap-sa/target/hbr-soap-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy
    cp ./hbr-transport/hbr-transport-sa/target/hbr-transport-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy
    cp ./transform-xslt/transform-xslt-sa/target/transform-xslt-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy
    cp ./secure-proxy/secure-proxy-sa/target/secure-proxy-sa-1.0.zip /home/ubuntu/esbs/apache-servicemix-4.4.0-fuse-00-43/deploy

Before executing the performance test, re-generate the WS-Security related requests as Fuse is particular about the timestamps used
    $ cd client-scripts
    $ ./recreate-secure-requests.sh

Notes:
======

During our testing sometimes we found that the Fuse ESB did not start as expected - or kept on complaining with the following warning for a valid HTTP request

Warning:  The encoding 'UTF-8' is not supported by the Java runtime.
Warning: encoding "UTF-8" not supported, using UTF-8
Warning:  The encoding 'UTF-8' is not supported by the Java runtime.
Warning: encoding "UTF-8" not supported, using UTF-8

If this happens, delete the ESB completely from the ~/esbs directory
and re-extract it as as follows from within the ~/esbs directory

    $ tar xvfz ../resources/software/apache-servicemix-4.4.0-fuse-00-43.tar.gz

When we tested the WS-Security scenario, for a single request everything was successful. However, running the smoke performance test itself started
filling up the log file with the following error, and hence we abandoned the performance tests for the WS-Security scenarios

12:58:32,478 | WARN  | tp1807330842-482 | PhaseInterceptorChain            |  -  -  | Interceptor for {http://services.samples/xsd}SecureProxy#{http://services.samples/xsd}buyStocksOperation1K has thrown exception, unwinding now
java.util.EmptyStackException
	at org.apache.cxf.staxutils.FastStack.pop(FastStack.java:31)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.staxutils.AbstractDOMStreamReader.next(AbstractDOMStreamReader.java:132)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(StartBodyInterceptor.java:59)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(StartBodyInterceptor.java:37)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:739)[168:servicemix-cxf-bc:2011.02.0.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:318)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:286)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:185)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.Server.handleAsync(Server.java:391)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:393)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)[111:org.eclipse.jetty.io:7.4.1.v20110513]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[111:org.eclipse.jetty.io:7.4.1.v20110513]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[114:org.eclipse.jetty.util:7.4.1.v20110513]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]

To execute the load test, use the custom script which excludes the WS-Security test cases as follows

    $ cd ~/client-scripts
    $ ./loadtest-no-sec.sh http://localhost:8182/service > fuse-4.4.0.txt

Again the load test iteration with 640 concurrent users with 100K messages to the DirectProxy rendered the Fuse ESB unusable. It was not servicing any requests after the apparent crash, and the logs contained stack traces as shown below

09:44:52,804 | WARN  | p1776334754-1113 | PhaseInterceptorChain            | ?                                   ? |  -  -  | Interceptor for {http://services.samples/xsd}DirectProxy#{http://services.samples/xsd}buyStocksOperation5K has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Current event not START_ELEMENT
	at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handleMessage(CxfBcConsumer.java:896)[168:servicemix-cxf-bc:2011.02.0.fuse-00-43]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:744)[168:servicemix-cxf-bc:2011.02.0.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:318)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:286)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:185)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.Server.handleAsync(Server.java:391)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:393)[109:org.eclipse.jetty.server:7.4.1.v20110513]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)[111:org.eclipse.jetty.io:7.4.1.v20110513]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[111:org.eclipse.jetty.io:7.4.1.v20110513]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[114:org.eclipse.jetty.util:7.4.1.v20110513]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
Caused by: java.lang.IllegalStateException: Current event not START_ELEMENT
	at com.ctc.wstx.sr.BasicStreamReader.getAttributeCount(BasicStreamReader.java:561)[144:woodstox-core-asl:4.0.8]
	at org.apache.cxf.staxutils.DepthXMLStreamReader.getAttributeCount(DepthXMLStreamReader.java:51)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]
	at javax.xml.stream.util.StreamReaderDelegate.getAttributeCount(StreamReaderDelegate.java:100)[80:org.apache.servicemix.specs.stax-api-1.0:1.8.0]
	at org.apache.servicemix.cxfbc.interceptors.StaxJbiWrapper.getAttributeCount(StaxJbiWrapper.java:327)[168:servicemix-cxf-bc:2011.02.0.fuse-00-43]
	at org.apache.servicemix.soap.util.stax.StaxSource.getAttributes(StaxSource.java:163)[169:servicemix-soap2:2011.02.0.fuse-00-43]
	at org.apache.servicemix.soap.util.stax.StaxSource.parse(StaxSource.java:112)[169:servicemix-soap2:2011.02.0.fuse-00-43]
	at org.apache.servicemix.soap.util.stax.StaxSource.parse(StaxSource.java:227)[169:servicemix-soap2:2011.02.0.fuse-00-43]
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)[:]
	at org.apache.servicemix.nmr.core.util.ExchangeUtils.convertSource(ExchangeUtils.java:252)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.util.ExchangeUtils.convert(ExchangeUtils.java:217)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.util.ExchangeUtils.ensureReReadable(ExchangeUtils.java:198)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.util.ExchangeUtils.ensureReReadable(ExchangeUtils.java:184)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.util.ExchangeUtils.display(ExchangeUtils.java:47)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.ExchangeImpl.display(ExchangeImpl.java:419)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:288)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.nmr.core.ChannelImpl.send(ChannelImpl.java:132)[98:org.apache.servicemix.nmr.core:1.5.0.fuse-00-43]
	at org.apache.servicemix.jbi.runtime.impl.DeliveryChannelImpl.send(DeliveryChannelImpl.java:178)[148:org.apache.servicemix.jbi.runtime:1.5.0.fuse-00-43]
	at org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:91)[149:servicemix-common:2011.02.0.fuse-00-43]
	at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handleMessage(CxfBcConsumer.java:875)[168:servicemix-cxf-bc:2011.02.0.fuse-00-43]
	... 19 more


Service URLs
============

Direct Proxy
    url             : http://localhost:8182/service/DirectProxy
    wsdl-url        : http://localhost:8182/service/DirectProxy?wsdl

SOAP Body CBR Proxy
    url             : http://localhost:8182/service/CBRProxy
    wsdl-url        : http://localhost:8182/service/CBRProxy?wsdl

SOAP Header CBR Proxy
    url             : http://localhost:8182/service/CBRSOAPHeaderProxy
    wsdl-url        : http://localhost:8182/service/CBRSOAPHeaderProxy?wsdl

Transport Header CBR Proxy
    url             : http://localhost:8182/service/CBRTransportHeaderProxy
    wsdl-url        : http://localhost:8182/service/CBRTransportHeaderProxy?wsdl

XSLT Transformation Proxy
    url             : http://localhost:8182/service/XSLTProxy
    wsdl-url        : http://localhost:8182/service/XSLTProxy?wsdl

WS-Security Proxy
    url             : http://localhost:8182/service/SecureProxy
    wsdl-url        : http://localhost:8182/service/SecureProxy?wsdl