<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to configure ActiveMQ to support a lot of concurrent connections</title>
	<atom:link href="http://www.pepperdust.org/?feed=rss2&#038;p=150" rel="self" type="application/rss+xml" />
	<link>http://www.pepperdust.org/?p=150</link>
	<description>* middleware &#38; open source escapades *</description>
	<lastBuildDate>Sun, 27 Jun 2010 15:23:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Mahesh</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-421</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Sun, 27 Jun 2010 15:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-421</guid>
		<description>Hi Oleg Kiorsak,

I have a requirement where there are around 800 topic consumers and one publisher,  Can you help send your configuration, i am more interested in the memory setting you had done to handle 5000 clients.

For my case messages are getting struck for some subscribers. 
At least post some of the important tweaks you had done for ur scenario, i will change accordingly for topics.

Thanks &amp; Regards,
Mahesh</description>
		<content:encoded><![CDATA[<p>Hi Oleg Kiorsak,</p>
<p>I have a requirement where there are around 800 topic consumers and one publisher,  Can you help send your configuration, i am more interested in the memory setting you had done to handle 5000 clients.</p>
<p>For my case messages are getting struck for some subscribers.<br />
At least post some of the important tweaks you had done for ur scenario, i will change accordingly for topics.</p>
<p>Thanks &amp; Regards,<br />
Mahesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dstanley</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-102</link>
		<dc:creator>dstanley</dc:creator>
		<pubDate>Wed, 17 Feb 2010 15:56:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-102</guid>
		<description>I actually talked to &lt;a href=&quot;http://blog.garytully.com/&quot; rel=&quot;nofollow&quot;&gt;Gary Tully&lt;/a&gt; about the behaviour your seeing and it turns out there have been a number of recent upgrades to the way the dispatch threading works within the broker, so that explains why you can get so many connections now with the OOTB config.

The queue dispatch thread used to be per destination, but in recent 5.3.x versions its using a shared thread pool factory and respects the dedicated task runner configuration.

In terms of the selector/vs partitioned destination question, the latter (partitioning) will be better as the selectors are limited by the pagedInMessages window.

On the support question, thats very exciting. I would say use this &lt;a href=&quot;http://form.fusesource.com/forms/getsupportnow&quot; rel=&quot;nofollow&quot;&gt;form&lt;/a&gt; when your ready to go down that road :-)

Cheer&#039;s
/Dave</description>
		<content:encoded><![CDATA[<p>I actually talked to <a href="http://blog.garytully.com/" rel="nofollow">Gary Tully</a> about the behaviour your seeing and it turns out there have been a number of recent upgrades to the way the dispatch threading works within the broker, so that explains why you can get so many connections now with the OOTB config.</p>
<p>The queue dispatch thread used to be per destination, but in recent 5.3.x versions its using a shared thread pool factory and respects the dedicated task runner configuration.</p>
<p>In terms of the selector/vs partitioned destination question, the latter (partitioning) will be better as the selectors are limited by the pagedInMessages window.</p>
<p>On the support question, thats very exciting. I would say use this <a href="http://form.fusesource.com/forms/getsupportnow" rel="nofollow">form</a> when your ready to go down that road <img src='http://www.pepperdust.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Cheer&#8217;s<br />
/Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Kiorsak</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-96</link>
		<dc:creator>Oleg Kiorsak</dc:creator>
		<pubDate>Wed, 17 Feb 2010 05:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-96</guid>
		<description>Thanks Dave!

We are using queues.... not topics...

Yes I think I will start posting a whole batch of questions to the mailing list forum very soon...

Now, interestingly when I reverted the settings (OptimizedDispatch etc)
back to the &quot;vanilla&quot; Out of the Box configuration, the crash error went away... 

and here is what is pleasantly surprising.. I am actually able to have and sustain 5000 clients (each a producer and a consumer)  with just plain TCP (not NIO) and those plain original settings (just with RAM values increased all over the place)

Are there any disadvantages of having it this way? 
Or we actually should to try get working the recommendations that this post recommends...

Also, I should mention that we so far tried to have one IN queue and one OUT queue and have all of 5000 clients use them... and do a selector on &quot;WHERE CustomeHeaderCLIENTID=&#039;BLAHBLAH&#039;&quot;... but it seem that the consumers then becomes a serious bottleneck when the queue has a backlog (10-20K messages queued up)

Am I right in my understanding that this is what should be expected because the queue is not indexed in any way by this customer header we use for selector and therefor each consumer session does a FULL SCAN of sorts and potentially locks and blocks and when we have 5000 of this it becomes a bottleneck....

so we are going to change it now so that we have a dedicated queue for each consumer...

(and as far as I understand ActiveMQ now _can_ have 5000 queues easily)?

Are we on a right path here?

i.e. would you recommend one huge queue and 5000 clienst doing a &quot;selector&quot; on it or 5000 dedicated queues instead... 

are there some &quot;golden rules&quot; regarding kind of considerations?

Thank you!


cheers,
O.K.
BTW, we are seriously contemplating getting a help from FUSE as we are a big PROGRESS customer already (for SonicMQ)... at least as an a consulting/training engagement (btw, by any chance maybe you or other ActiveMQ committers from FUSE feel like traveling to Australia? - that would be great if we got get one of the actual engineers to interrogate here ;)</description>
		<content:encoded><![CDATA[<p>Thanks Dave!</p>
<p>We are using queues&#8230;. not topics&#8230;</p>
<p>Yes I think I will start posting a whole batch of questions to the mailing list forum very soon&#8230;</p>
<p>Now, interestingly when I reverted the settings (OptimizedDispatch etc)<br />
back to the &#8220;vanilla&#8221; Out of the Box configuration, the crash error went away&#8230; </p>
<p>and here is what is pleasantly surprising.. I am actually able to have and sustain 5000 clients (each a producer and a consumer)  with just plain TCP (not NIO) and those plain original settings (just with RAM values increased all over the place)</p>
<p>Are there any disadvantages of having it this way?<br />
Or we actually should to try get working the recommendations that this post recommends&#8230;</p>
<p>Also, I should mention that we so far tried to have one IN queue and one OUT queue and have all of 5000 clients use them&#8230; and do a selector on &#8220;WHERE CustomeHeaderCLIENTID=&#8217;BLAHBLAH&#8217;&#8221;&#8230; but it seem that the consumers then becomes a serious bottleneck when the queue has a backlog (10-20K messages queued up)</p>
<p>Am I right in my understanding that this is what should be expected because the queue is not indexed in any way by this customer header we use for selector and therefor each consumer session does a FULL SCAN of sorts and potentially locks and blocks and when we have 5000 of this it becomes a bottleneck&#8230;.</p>
<p>so we are going to change it now so that we have a dedicated queue for each consumer&#8230;</p>
<p>(and as far as I understand ActiveMQ now _can_ have 5000 queues easily)?</p>
<p>Are we on a right path here?</p>
<p>i.e. would you recommend one huge queue and 5000 clienst doing a &#8220;selector&#8221; on it or 5000 dedicated queues instead&#8230; </p>
<p>are there some &#8220;golden rules&#8221; regarding kind of considerations?</p>
<p>Thank you!</p>
<p>cheers,<br />
O.K.<br />
BTW, we are seriously contemplating getting a help from FUSE as we are a big PROGRESS customer already (for SonicMQ)&#8230; at least as an a consulting/training engagement (btw, by any chance maybe you or other ActiveMQ committers from FUSE feel like traveling to Australia? &#8211; that would be great if we got get one of the actual engineers to interrogate here <img src='http://www.pepperdust.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dstanley</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-92</link>
		<dc:creator>dstanley</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:55:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-92</guid>
		<description>Hi Oleg,
I used the fuse version for my testing so you could &lt;a href=&quot;http://fusesource.com/products/enterprise-activemq/&quot; rel=&quot;nofollow&quot;&gt;try&lt;/a&gt; &lt;-- this. JDK 1.5 should be fine.

In terms of the thread counts are you using queue&#039;s or topics? I just realized I just set a destination policy on the queue, but if your using topics you may need to also setup a destination policy on the topic. Remember to make sure you enabled optimizedDispatch.

On the crash, would need to see the stack from the hs_err_pid, but you could also try mailing the activemq user list for that one. The folks on the list are usually very responsive.

/Dave</description>
		<content:encoded><![CDATA[<p>Hi Oleg,<br />
I used the fuse version for my testing so you could <a href="http://fusesource.com/products/enterprise-activemq/" rel="nofollow">try</a> <&#8211; this. JDK 1.5 should be fine.</p>
<p>In terms of the thread counts are you using queue&#8217;s or topics? I just realized I just set a destination policy on the queue, but if your using topics you may need to also setup a destination policy on the topic. Remember to make sure you enabled optimizedDispatch.</p>
<p>On the crash, would need to see the stack from the hs_err_pid, but you could also try mailing the activemq user list for that one. The folks on the list are usually very responsive.</p>
<p>/Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Kiorsak</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-86</link>
		<dc:creator>Oleg Kiorsak</dc:creator>
		<pubDate>Mon, 15 Feb 2010 00:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-86</guid>
		<description>Thanks a lot Dave!

It is all very clear now.

One last question:

re:
&gt;4) Use a broker with a version &gt; 5.3.0.3


I downloaded just a month ago and looked again now and also in the console
when it start and I don&#039;t see &quot;5.3.0.3&quot; anywhere... just &quot;&quot;5.3.0&quot;...

where should I look to confirm that it is &quot;....0.3&quot; (assuming you actually meant that)?

Also, I guess somewhat important - what Java version is recommended (we still use 1.5)

The reason I want to be very pedantic is that I am following the instructions from here and configured everything as suggested, but I still see about 2 threads per connection as opposed to 1 thread per 16 connections...

so does not seem that we got it quite right yet...


and also I am quite consistently getting a rather scary java crash
- have you ever seen anything like that?

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGBUS (0xa) at pc=0xffffffff7ee00c10, pid=20145, tid=3611
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_16-b02 mixed mode)
# Problematic frame:
# C  [libc_psr.so.1+0xc10]
#
# An error report file with more information is saved as hs_err_pid20145.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp


Please help!


Thank you!
cheers,
O.K.</description>
		<content:encoded><![CDATA[<p>Thanks a lot Dave!</p>
<p>It is all very clear now.</p>
<p>One last question:</p>
<p>re:<br />
&gt;4) Use a broker with a version &gt; 5.3.0.3</p>
<p>I downloaded just a month ago and looked again now and also in the console<br />
when it start and I don&#8217;t see &#8220;5.3.0.3&#8243; anywhere&#8230; just &#8220;&#8221;5.3.0&#8243;&#8230;</p>
<p>where should I look to confirm that it is &#8220;&#8230;.0.3&#8243; (assuming you actually meant that)?</p>
<p>Also, I guess somewhat important &#8211; what Java version is recommended (we still use 1.5)</p>
<p>The reason I want to be very pedantic is that I am following the instructions from here and configured everything as suggested, but I still see about 2 threads per connection as opposed to 1 thread per 16 connections&#8230;</p>
<p>so does not seem that we got it quite right yet&#8230;</p>
<p>and also I am quite consistently getting a rather scary java crash<br />
- have you ever seen anything like that?</p>
<p>#<br />
# An unexpected error has been detected by HotSpot Virtual Machine:<br />
#<br />
#  SIGBUS (0xa) at pc=0xffffffff7ee00c10, pid=20145, tid=3611<br />
#<br />
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_16-b02 mixed mode)<br />
# Problematic frame:<br />
# C  [libc_psr.so.1+0xc10]<br />
#<br />
# An error report file with more information is saved as hs_err_pid20145.log<br />
#<br />
# If you would like to submit a bug report, please visit:<br />
#   <a href="http://java.sun.com/webapps/bugreport/crash.jsp" rel="nofollow">http://java.sun.com/webapps/bugreport/crash.jsp</a></p>
<p>Please help!</p>
<p>Thank you!<br />
cheers,<br />
O.K.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dstanley</title>
		<link>http://www.pepperdust.org/?p=150&#038;cpage=1#comment-78</link>
		<dc:creator>dstanley</dc:creator>
		<pubDate>Fri, 12 Feb 2010 19:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.pepperdust.org/?p=150#comment-78</guid>
		<description>&gt;do we really need both?

No, you can just enable the nio transport and it will handle all incoming connections using nio.

&gt;And also – what connection url should the clients use – “nio://localhost:62828?useQueueForAccept=false”

Just the regular tcp:// transport url for the producers and consumers. The nio is configuring how the incoming connection is handled on the broker side.

&gt; And also, we are connecting from thousands of .NET clients using “NMS”… and there is no protocol option of “nio:” in NMS…
&gt; is it ok to use just “tcp:” then?

Yes absolutely.

&gt;as far as I understand NIO is still TCP and from the client’s side it should be transparent whether its handled using nio or “old io” on the server side?

Yep thats right. Its not a client side concern. This is all on the server side. We are trying to minimize the number of broker threads created when you have a large incoming connection load.

Hope that helps
/Dave</description>
		<content:encoded><![CDATA[<p>&gt;do we really need both?</p>
<p>No, you can just enable the nio transport and it will handle all incoming connections using nio.</p>
<p>&gt;And also – what connection url should the clients use – “nio://localhost:62828?useQueueForAccept=false”</p>
<p>Just the regular tcp:// transport url for the producers and consumers. The nio is configuring how the incoming connection is handled on the broker side.</p>
<p>&gt; And also, we are connecting from thousands of .NET clients using “NMS”… and there is no protocol option of “nio:” in NMS…<br />
&gt; is it ok to use just “tcp:” then?</p>
<p>Yes absolutely.</p>
<p>&gt;as far as I understand NIO is still TCP and from the client’s side it should be transparent whether its handled using nio or “old io” on the server side?</p>
<p>Yep thats right. Its not a client side concern. This is all on the server side. We are trying to minimize the number of broker threads created when you have a large incoming connection load.</p>
<p>Hope that helps<br />
/Dave</p>
]]></content:encoded>
	</item>
</channel>
</rss>
