qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: C++ Broker --worker-threads option
Date Mon, 21 Nov 2016 13:49:33 GMT
On 21/11/16 13:25, Gregory Simpson wrote:
> Hi,
>
> I am trying to get a better understanding of what the C++ broker
> --worker-threads option does. The Linux man pages says that this parameter
> "Sets the broker thread pool size" so I believed that when this is set to a
> higher number then performance should improve. In testing this theory I
> received conflicting results in that performance was downgraded as I
> increased the number of worker threads.
>
> The tests I ran:
> Test 1: One send process broadcasting to multiple receivers
> Test 2: One send process broadcasting to one receiver
> Both: Increment --worker-thread parameter from default to 15 by iterations
> of 5
> Both: Record start and stop time for the receiver and sender processes
>
> I would like answers to the following questions:
> * Why would the performance degrade when this parameter is increased

Adding worker threads increases the potential for parallel processing of 
the overall load. However, the achievable parallelism is limited by the 
number of cores on your machine. Increasing the worker threads beyond 
that won't to improve overall performance.

All processing of a given connection is serialised. Therefore having 
more worker threads than there are connections won't help either.

Further, there can be contention between threads (e.g. two connections 
accessing the same queue), and this also limits the amount of 
parallelism actually achievable.

> * What does this parameter do

It controls the number of threads that process connections.

> * In what case would setting this parameter help performance

The default value is linked to the number of cores. Whether that can be 
improved on depends on the system in question, the number of cores, the 
number of connections, the messaging patterns etc.

Hope this helps a little.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message