ActiveMQ is designed to work with multi-CPUs and operating system threads
correct?  I'd have to assume so, but we are seeing some strange behavior...

We have our application deployed on a Solaris box.  I'm working with an
administrator who knows Solaris very well.  He is monitoring our application
and says its only using a single CPU and thread while others remain idle.  

We are able to achieve only 25 msg/second on the box.  I've tried different
combinations of just about everything I've seen suggested at this point. 
Also worth noting that I'm getting 80 msg/second with the identical
build/configuration on my laptop...

Our message processing is as follows...

   from("jetty:" + inboundURL)
        .process(new HTTPInboundService())
        .to("activemq:GatewayMsgQueue");

   from("activemq:GatewayMsgQueue?maxConcurrentConsumers=20")
        .convertBodyTo(DOMSource.class)
        .to("jbi:service:http://www.test.com/eda/messageProcessor?mep=in-out";)
        .convertBodyTo(String.class)
        .to("AMQPOOL:topic:PortalTopic");

If I simplify the route to just log all the HTTP requests (as follows)...I
get much better thread/CPU utilization and can process 800+/second

        from("jetty:" + inboundURL)
        .to("log:test?level=DEBUG");
            
The only other noteworthy code is the connection pool setup in the
MyRouteBuilder.java file.

String brokerURL = "vm://localhost:61616?marshal=false";
//String brokerURL = "tcp://localhost:61616";

PooledConnectionFactory pcf = new PooledConnectionFactory(brokerURL);
pcf.setMaxConnections(8);

JmsTransactionManager tm = new JmsTransactionManager();
tm.setConnectionFactory(pcf);

ActiveMQComponent amq = ActiveMQComponent.activeMQComponent(brokerURL);
amq.setConnectionFactory(pcf);
amq.setTransacted(true);
amq.setTransactionManager(tm);
amq.setMaxConcurrentConsumers(20);
//amq.setCacheLevel(3);         //no difference
//amq.setAcknowledgementModeName("DUPS_OK_ACKNOWLEDGE");        //actually 
slower

this.getContext().addComponent("activemq",amq);

here is our environment...

Solaris 10 T2000, Niagara Processor, 8 core CPU, 4 execution threads/core,
8GB RAM
ServiceMix 3.3.1 (Camel 1.6.1)

-servicemix.sh changes...

JAVA_HOME="/usr/jdk/jdk1.6.0_11"
JAVA_OPTS="-server -Xmx1024M -Xms512M -XX:MaxPermSize=256m"

-servicemix.properties changes...

servicemix.corePoolSize    = 100
servicemix.maximumPoolSize = -1
servicemix.queueSize       = 1024

Is there anything else that needs to be done to achieve better
multi-threaded execution of this message processing application?  We will
need to support 500+ msg/second at some point...

thanks in advance...

-----
Ben O'Day
Vektrel - Senior Consultant

-- 
View this message in context: 
http://www.nabble.com/single-threaded-instead-of-multi-threaded-execution-tp24508532p24508532.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to