[jboss-cvs] JBossAS SVN: r78307 - trunk/cluster/src/resources/jgroups.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 9 23:28:53 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-09-09 23:28:53 -0400 (Tue, 09 Sep 2008)
New Revision: 78307
Modified:
trunk/cluster/src/resources/jgroups/jgroups-channelfactory-stacks.xml
Log:
[JBAS-5341] Share the UDP transport between the 'udp' stack and 'jbm-control'
Modified: trunk/cluster/src/resources/jgroups/jgroups-channelfactory-stacks.xml
===================================================================
--- trunk/cluster/src/resources/jgroups/jgroups-channelfactory-stacks.xml 2008-09-10 02:42:02 UTC (rev 78306)
+++ trunk/cluster/src/resources/jgroups/jgroups-channelfactory-stacks.xml 2008-09-10 03:28:53 UTC (rev 78307)
@@ -1,15 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE protocol_stacks [
+ <!ENTITY shared-udp '
+ <!-- UDP transport config meant to be shared between different channels
+ with different requirements. Message bundling is disabled in this
+ general-purpose config as it can add latency to synchronous RPCs. -->
+ <UDP
+ singleton_name="shared-udp"
+ mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="true"
+ discard_incompatible_packets="true"
+ enable_bundling="false"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ thread_naming_pattern="cl"
+ timer.num_threads="12"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="Run"/>
+ '>
+]>
+
+
<!--
Standard JGroups protocol stacks definitions, used by the JChannelFactory bean.
+
Author: Bela Ban, Brian Stansberry
Version: $Id:jgroups-channelfactory-stacks.xml 71313 2008-03-26 19:46:59Z bstansberry at jboss.com $
-->
<protocol_stacks>
<stack name="udp"
- description="Default: IP multicast based stack, with flow control and message bundling">
+ description="Default: IP multicast based stack, with flow control.">
<config>
+ <!-- UDP transport config meant to be shared between different channels,
+ including a JBoss Messaging channel that uses the 'jbm-control'
+ stack listed below. Message bundling is disabled, as it can add
+ latency to synchronous group RPCs. Services that only make
+ asynchronous RPCs (e.g. JBoss Cache configured for REPL_ASYNC)
+ and do so in high volume may be able to improve performance by
+ configuring their cache to use the udp-async stack below.
+ Services that only make synchronous RPCs (e.g. JBoss Cache
+ configured for REPL_SYNC or INVALIDATION_SYNC) may be able
+ to improve performance by using the udp-sync stack below, which
+ does not include flow control.
+
+ The UDP config is included via an XML entity to ensure that
+ it remains consistent between this stack and the 'jbm-control'
+ stack below.
+ -->
+ &shared-udp;
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="100000" min_interval="20000"/>
+ <FD_SOCK/>
+ <FD timeout="6000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="true"
+ view_bundling="true"
+ view_ack_collection_timeout="5000"/>
+ <FC max_credits="2000000" min_threshold="0.10"/>
+ <FRAG2 frag_size="60000"/>
+ <!-- pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/ -->
+ <pbcast.STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </stack>
+
+
+ <stack name="udp-async"
+ description="Same as the default 'udp' stack above, except message bundling
+ is enabled in the transport protocol (enable_bundling=true).
+ Useful for services that make high-volume asynchronous
+ RPCs (e.g. high volume JBoss Cache instances configured
+ for REPL_ASYNC) where message bundling may improve performance.">
+ <config>
<UDP
- singleton_name="udp"
- mcast_port="${jboss.jgroups.udp.mcast_port:45688}"
+ singleton_name="udp-async"
+ mcast_port="${jboss.jgroups.udp_async.mcast_port:45689}"
mcast_addr="${jgroups.udp.mcast_addr:228.11.11.11}"
tos="8"
ucast_recv_buf_size="20000000"
@@ -18,7 +113,7 @@
mcast_send_buf_size="640000"
loopback="true"
discard_incompatible_packets="true"
- enable_bundling="true"
+ enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
@@ -28,21 +123,21 @@
use_concurrent_stack="true"
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="200"
- thread_pool.keep_alive_time="5000"
- thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="1000"
- thread_pool.rejection_policy="Run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- oob_thread_pool.max_threads="8"
- oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false"
- oob_thread_pool.queue_max_size="100"
- oob_thread_pool.rejection_policy="Run"/>
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="200"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="20"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="Run"/>
<PING timeout="2000" num_initial_members="3"/>
<MERGE2 max_interval="100000" min_interval="20000"/>
<FD_SOCK/>
@@ -68,10 +163,12 @@
<stack name="udp-sync"
- description="IP multicast based stack, without flow control and without message bundling. This should be used
- instead of udp if (1) synchronous calls are used and (2) the message volume (rate and size)
- is not that large. Don't use this configuration if you send messages at a high sustained rate, or you might
- run out of memory">
+ description="IP multicast based stack, without flow control and
+ without message bundling. This should be used instead
+ of 'udp' if (1) synchronous calls are used and (2) the
+ message volume (rate and size) is not that large. Don't
+ use this configuration if you send messages at a high
+ sustained rate, or you might run out of memory">
<config>
<UDP
singleton_name="udp_sync"
@@ -84,11 +181,11 @@
mcast_send_buf_size="640000"
loopback="true"
discard_incompatible_packets="true"
+ enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
ip_ttl="${jgroups.udp.ip_ttl:2}"
- enable_bundling="false"
use_concurrent_stack="true"
@@ -131,8 +228,10 @@
<stack name="tcp"
- description="TCP based stack, with flow control and message bundling. This is usually used when IP
- multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast)">
+ description="TCP based stack, with flow control and message bundling.
+ This is usually used when IP multicasting cannot be used
+ in a network, e.g. because it is disabled (e.g. routers
+ discard multicast)">
<config>
<TCP
singleton_name="tcp"
@@ -168,14 +267,14 @@
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="discard"/>
- <!-- Alternative 1: multicast-based automatic discovery. -->
+ <!-- Alternative 1: multicast-based automatic discovery. -->
<MPING timeout="3000"
num_initial_members="3"
mcast_addr="${jgroups.udp.mcast_addr:230.11.11.11}"
mcast_port="${jgroups.tcp_mping.mcast_port:45700}"
ip_ttl="${jgroups.udp.ip_ttl:2}"/>
<!-- Alternative 2: non multicast-based replacement for MPING. Requires a static configuration
- of all possible cluster members.
+ of *all* possible cluster members.
<TCPPING timeout="3000"
initial_hosts="${jgroups.tcpping.initial_hosts:localhost[7600],localhost[7601]}"
port_range="1"
@@ -205,10 +304,13 @@
<stack name="tcp-sync"
- description="TCP based stack, without flow control and without message bundling. This is usually used when IP
- multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). This
- configuration should be used instead of tcp when (1) synchronous calls are used and (2) the message volume
- (rate and size) is not that large">
+ description="TCP based stack, without flow control and without
+ message bundling. This is usually used when IP
+ multicasting cannot be used in a network (e.g.routers
+ discard multicast). This configuration should be used
+ instead of 'tcp' above when (1) synchronous calls are
+ used and (2) the message volume (rate and size) is not
+ that large.">
<config>
<TCP
singleton_name="tcp_sync"
@@ -276,45 +378,21 @@
</config>
</stack>
+
<stack name="jbm-control"
description="Stack optimized for the JBoss Messaging Control Channel">
<config>
- <UDP
- singleton_name="jbm-control"
- mcast_addr="${jboss.messaging.controlchanneludpaddress,jboss.partition.udpGroup:228.7.7.7}"
- mcast_port="${jboss.messaging.controlchanneludpport:45568}"
- tos="8"
- ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
- mcast_recv_buf_size="25000000"
- mcast_send_buf_size="640000"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- ip_ttl="${jboss.messaging.ipttl:8}"
- enable_bundling="false"
- enable_diagnostics="true"
- thread_naming_pattern="cl"
-
- use_concurrent_stack="true"
-
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="200"
- thread_pool.keep_alive_time="5000"
- thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="1000"
- thread_pool.rejection_policy="Run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- oob_thread_pool.max_threads="8"
- oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false"
- oob_thread_pool.queue_max_size="100"
- oob_thread_pool.rejection_policy="Run"/>
+ <!-- By default we use the same UDP transport protocol config as is
+ used for the default 'udp' stack defined above. This allows
+ the JBoss Messaging Control Channel to use the same sockets,
+ network buffers and thread pools as are used by the other
+ standard JBoss AS clustered services.
+
+ The UDP config is included via an XML entity to ensure that
+ it remains consistent between this stack and the 'udp'
+ stack above.
+ -->
+ &shared-udp;
<PING timeout="2000"
num_initial_members="3"/>
<MERGE2 max_interval="100000"
@@ -343,6 +421,7 @@
</config>
</stack>
+
<stack name="jbm-data"
description="Stack optimized for the JBoss Messaging Data Channel">
<config>
@@ -397,6 +476,7 @@
</config>
</stack>
+
<stack name="tunnel"
description="Used with a GossipRouter">
<config>
More information about the jboss-cvs-commits
mailing list