Hi

 

I’m measuring the time spent between deliveryChannel.send(exchange) in MySender and exchange.getMessage("in") in MyReceiver and I found that it is more than 100 times slower than sending a message between 2 JVM using JMS or Hessian over HTTP. Even if ServiceMix/JBI is not designed for high performance, the performance that I found is unacceptable.

My test consists in sending 400 messages from MySender to MyReceiver (example on http://servicemix.codehaus.org/POJO+support). The time spent for the last 300 messages is used to get the statistics (average). I start a timer just before deliveryChannel.send(exchange) and stop the timer immediately after exchange.getMessage("in") trying to measure the time spent in marshalling and transport inside the JBI ESB. I’m using a timer API that provides a resolution of at least 5 microseconds on my hardware. The messages sent are as simple as:

            message.setProperty("id", new Integer(gen_counter));           

            message.setContent(new StringSource("<example id='" + gen_counter + "'/>"));

            message.setProperty("time", Double.toString(microTimer.getTicks()));

 

MySender and MyReceiver are executed inside the same ServiceMix instance (the same JVM); but the communication between these two components is slower by a factor greater than 100 when I compare my benchmark for a similar message interchange between 2 applications running in different JVM but using other protocols.

 

I really hope I am wrong. I’d appreciate somebody’s help in providing me with some guidelines about how to tune ServiceMix in order to get better performance.

 

Best regard,

 

Cesar

Reply via email to