How many client connections will iMQ 2.0 handle?

My main concern is what the number of concurrent client connections (in a single instance) iMQ

can handle? This also depends on Hardware/Software configuration, JVM version (if it pure Java implementation), etc. But it also depends on Vendor implementation. For example FioranoMQ claims that can handling more than 5K concurrent client connections in a single instance of the FioranoMQ server without leading to any substantial performance degradation when a low number

of clients are connected to the server.

[535 byte] By [christenscreen] at [2008-1-6]
# 1

With proper tunning iMQ 2.0 can handle thousands of simultaneous connections.

For example on a modest Sun system (Sun Ultra 60/2300 (2x300MHz) 512MB ram)

We have run 4000 active connections without a problem. With more memory the

system could have supported more.

The iMQ FAQ gives some tuning guidelines for configuring the iMQ server

(the broker) to handle large number of connections. I'm attaching the

relevant excerpt (the online FAQ is a bit out of date).

When I try to connect more than 500 clients to the Broker's JMS service, performance gets really poor. Is there a way to configure the

Broker to handle more connections with better performance?

Yes. By default the JMS service's thread pool is limited to 1000 threads. The Broker runs best when it can allocate two threads per

connection. Once the thread pool limit is reached, threads are shared and performance decreases.

The solution is to:

1.Increase the thread pool limit for the JMS service so threads are not shared.

2.Configure the broker's socket read timeout so read threads fully block.

3.Configure the JVM to improve performance in highly threaded applications.

4.And if you are running on Solaris and plan on going over ~1000 connections you will also need to:

Increase the maximum number of open file descriptors per process.

Step 1: Increase thread pool limit for JMS service

Set the jmq.jms.max_threads property to be 2X the maximum number of connections you wish to support. For example if you want to

support 1000 connections you will need to set the property to 2000. You can do this by adding the following line to

$JMQ_VARHOME/stores/<broker instance name>/props/config.properties:

jmq.jms.max_threads=2000

Or by running jmqcmd:

jmqcmd update svc -n jms -o maxThreads=2000

Step 2: Configure the broker's socket read timeout

Set the jmq.protocol.timeout to 0 to cause read threads to fully block in read. Do this by adding the following line to

$JMQ_VARHOME/stores/<broker instance name>/props/config.properties :

jmq.protocol.timeout=0

Step 3: On Solaris pass additional parameters to the JVM

If you are running the broker on Solaris you should pass the following parameters to the JVM:

-Xss128k -Xconcurrentio

The first parameter reduces the per-thread stack size to 128k. The second adjusts several internal JVM parameters that significantly improves performance of highly concurrent applications.

You may pass these to the broker by using the -vmargs option to the broker command or you may choose to alter the $JMQ_HOME/bin/jmqbroker script by adding "-Xss128k -Xconcurrentio" to the line that starts with with "def_jvm_args". For example you would end up with a line that looks like:

def_jvm_args="-Xms8m -Xmx128m -Xss128k -Xconcurrentio"

Note that if your system has sufficient RAM you may also want to increase the JVM max heap size parameter (-Xmx128m).

Step 4: On Solaris Increase the maximum number of open file descriptors per process

This is covered in the iMQ 2.0 documentation. One way to do this is to run 'ulimit -n unlimited' in the shell you are going to run the broker in.

christenscreen at 2007-7-1 > top of java,Application & Integration Servers,Sun Java System Message Queue...