Re: [jgroups-dev] How can Discovery be multithreaded ?

Bela Ban <[email protected]> Fri, 10 Apr 2015 07:44:17 +0200
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
Hi Pooja,

On 10/04/15 03:33, Khambhayata, Pooja wrote:
> Hi Bela,
>
> We have a 10 node system which can scale up to 60 nodes. We set
> following configuration in TCP based protocol stack
>
> We wanted to keep TCPPING time less so we decided to increase the
> internal thread pool and timer threads.
>
> TCPPING timeout = 6 seconds
>
> timer.min_threads = 75
>
> We increased internal thread pool also to 75
>
> In a scenario where, Node 1 is coordinator, Nodes 2-9 are all powered
> off and Node 10 is coming up;
>
> Node 10 sends discovery request and creates multiple threads to send the
> request but we see in the logs that the threads are executing sequentially.
>
> Each thread waits for 3 seconds (which is our socket_conn_timeout) and
> then next thread takes it turn. As a result discovery times out before
> the discovery request reaches the coordinator.
>
> The node ends up becoming coordinator.
>
> Can you help us understand why inspite of increasing timer threads and
> internal thread pool the threads are sending messages in sequence?

The discovery is _not_ done in a separate thread. You can force running 
discovery in a separate (timer) thread by setting 
async_discovery="true", but that means we'll have *one* timer thread 
which tries to discover the 10 members, but still *sequentially*.

The idea is not to waste threads, and a down() should always return 
quickly. I realize though that an empty TCP send window or trying to 
connect to a server that's not running might slow things down, and 
perhaps reducing sock_conn_timeout is not the preferred solution, so I 
created [1] to enhance this.

Fixed in 3.6.4 by adding flag 
async_discovery_use_separate_thread_per_request to Discovery.

[1] https://issues.jboss.org/browse/JGRP-1923

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Javagroups-development mailing list