You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Keith W <ke...@gmail.com> on 2018/01/16 14:44:10 UTC

Re: Java Broker performance

Hi Tomas,

The work for QPID-8032 is done on master.   If you could repeat your
test-case with Broker-J compiled for master and let us know how
performance changes (improves, hopefully a lot).  Once I have heard
back from you I'll look to have this included in a 7.0.1 very soon.

Kind regards, Keith Wall.

On 26 November 2017 at 14:54, Keith W <ke...@gmail.com> wrote:
> Hi Tomas
>
> Thanks for the attachments.
>
> With your Broadcaster code, which sends persistent messages
> asynchronously, I do see inferior performance from Broker J than the
> CPP Broker.  I am using proton master (fa80534)
>
> Currently for this use-case, Broker-J commits synchronously after each
> delivery (see StandardReceivingLinkEndpoint#receiveDelivery.  The
> pertinent part is its use of an AutoCommitTransaction and the fact
> that AutoCommitTransaction#enqueue uses a synchronous #commitTran) and
> this will explain some (if not all) of the performance difference.  As
> Rob mentioned on the 10th November in this thread, the older protocols
> already have an optimisation for this use-case (involving
> AsyncAutoCommitTransaction) which should improve performance on the
> AMQP 1.0 path.   This was raised as QPID-8032. I try and include this
> in a 7.0.1 soon.
>
> This doesn't explain your observation about performance when using
> Qpid JMS Client which is doing a synchronous send of persistent
> messages, but as I commented above, I cannot reproduce the problem: I
> see very similar performance for Broker-J and CPP on my hardware.
>
> cheers Keith.
>
> On 24 November 2017 at 13:06, Tomas Soltys <to...@gmail.com> wrote:
>> Hi Keith,
>>
>> Please find attached  cpp_vs_java.gz
>> <http://qpid.2158936.n2.nabble.com/file/t365522/cpp_vs_java.gz>  . This
>> archive contains:
>> * *java* - setup of Java broker (v7.0.0)
>> * *cpp* - setup of C++ broker (v1.36.0)
>> * *proton-client* - C++client based on Qpid proton (v0.18.1)
>> * *java_trace.log* - trace log from client sending 20 messages (10240 Bytes
>> each) to Java broker
>> * *java_trace.log* - trace log from client sending 20 messages (10240 Bytes
>> each) to C++ broker
>>
>> One thing I've noticed in logs is that C++ broker is sending dispositions in
>> chunks of 5 whereas Java broker does this for each message separately.
>>
>> Best regards,
>> Tomas
>>
>>
>>
>> --
>> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>

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


Re: Java Broker performance

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Tomas,

Thanks for feedback. I will merge the changes into 7.0.1.

We will be looking into performance improvements for AMQP 1.0 later
this year. Though, we do not have a date exactly when we will be doing
this work.
The changes we had implemented are tactical. They are small enough to
be ported into 7.0.x branch.

For the use cases exercised by your sample applications I cannot think
about any Broker settings which would improve the performance farther.
Hopefully the following work will increase the performance and resolve
the Broker-J lagging behind the C++ broker.

Kind Regards,
Alex


On 29 January 2018 at 09:40, Tomas Soltys <to...@gmail.com> wrote:
> Hi Alex,
>
> The performance is way much better now and is acceptable for us. Thank you
> very much for your effort.
>
> Do you know why the performance is still lagging behind the C++ broker? Is
> it something that can be influenced by the broker settings?
>
> Thanks and regards,
> Tomas
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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


Re: Java Broker performance

Posted by Tomas Soltys <to...@gmail.com>.
Hi Alex,

The performance is way much better now and is acceptable for us. Thank you
very much for your effort.

Do you know why the performance is still lagging behind the C++ broker? Is
it something that can be influenced by the broker settings?

Thanks and regards,
Tomas



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: Java Broker performance

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Tomas,

We are going to port the implemented changes into 7.0.x branch for
inclusion into 7.0.1.
Please, let us know whether the sending and receiving performances are
acceptable for you.

Kind Regards,
Alex


On 23 January 2018 at 15:59, Oleksandr Rudyy <or...@gmail.com> wrote:
> Hi Tomas,
>
> Today I committed changes [1] into master improving the performance of
> the broker-j for the Receiver use case. The commit is made against
> QPID-8032.
>
> I tested the changes locally on my machine and could see the
> improvements in broker-j performance. Before the change the dequeue
> operations in broker-j on my test machine were 7-8 times slower than
> the ones in cpp broker.
> After the change the performance has increased  but the broker-j is
> still 2-3 times slower than cpp broker.
>
> Please give it a try on your environment and let us know about your
> performance results.
>
> Kind Regards,
> Alex
>
>
> [1] https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=a1ed997
>
> On 22 January 2018 at 16:44, Oleksandr Rudyy <or...@gmail.com> wrote:
>> Hi Tomas,
>>
>> We are currently looking into performance improvements for the Receiver.
>> We will notify you after necessary changes are made and ready for testing.
>>
>> Kind Regards,
>> Alex
>>
>>
>>
>> On 22 January 2018 at 11:20, Tomas Soltys <to...@gmail.com> wrote:
>>> Hi Keith,
>>>
>>> I can confirm that sending is now much faster.
>>>
>>> *C++ broker*
>>> $ ./Broadcaster 20001
>>> real    0m0.085s
>>> user    0m0.027s
>>> sys     0m0.005s
>>>
>>> *Java broker*
>>> $ ./Broadcaster 20002
>>> real    0m0.876s
>>> user    0m0.037s
>>> sys     0m0.011s
>>>
>>> However receiving is still much slower.
>>>
>>> *C++ broker*
>>> $ time ./Receiver 20001
>>> real    0m0.113s
>>> user    0m0.035s
>>> sys     0m0.014s
>>>
>>> *Java broker*
>>> $ time ./Receiver 20002
>>> real    0m50.168s
>>> user    0m0.061s
>>> sys     0m0.032s
>>>
>>> See attached file  cpp_vs_java.gz
>>> <http://qpid.2158936.n2.nabble.com/file/t365522/cpp_vs_java.gz>   which
>>> contains:
>>> Broadcaster.cpp and Receiver.cpp based on qpid-proton 0.19.0
>>> Setup for C++ broker 1.37.0
>>> Setup for Java broker (master from 22-nd January 2017)
>>>
>>> Regards,
>>> Tomas
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: users-help@qpid.apache.org
>>>

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


Re: Java Broker performance

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Tomas,

Today I committed changes [1] into master improving the performance of
the broker-j for the Receiver use case. The commit is made against
QPID-8032.

I tested the changes locally on my machine and could see the
improvements in broker-j performance. Before the change the dequeue
operations in broker-j on my test machine were 7-8 times slower than
the ones in cpp broker.
After the change the performance has increased  but the broker-j is
still 2-3 times slower than cpp broker.

Please give it a try on your environment and let us know about your
performance results.

Kind Regards,
Alex


[1] https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=a1ed997

On 22 January 2018 at 16:44, Oleksandr Rudyy <or...@gmail.com> wrote:
> Hi Tomas,
>
> We are currently looking into performance improvements for the Receiver.
> We will notify you after necessary changes are made and ready for testing.
>
> Kind Regards,
> Alex
>
>
>
> On 22 January 2018 at 11:20, Tomas Soltys <to...@gmail.com> wrote:
>> Hi Keith,
>>
>> I can confirm that sending is now much faster.
>>
>> *C++ broker*
>> $ ./Broadcaster 20001
>> real    0m0.085s
>> user    0m0.027s
>> sys     0m0.005s
>>
>> *Java broker*
>> $ ./Broadcaster 20002
>> real    0m0.876s
>> user    0m0.037s
>> sys     0m0.011s
>>
>> However receiving is still much slower.
>>
>> *C++ broker*
>> $ time ./Receiver 20001
>> real    0m0.113s
>> user    0m0.035s
>> sys     0m0.014s
>>
>> *Java broker*
>> $ time ./Receiver 20002
>> real    0m50.168s
>> user    0m0.061s
>> sys     0m0.032s
>>
>> See attached file  cpp_vs_java.gz
>> <http://qpid.2158936.n2.nabble.com/file/t365522/cpp_vs_java.gz>   which
>> contains:
>> Broadcaster.cpp and Receiver.cpp based on qpid-proton 0.19.0
>> Setup for C++ broker 1.37.0
>> Setup for Java broker (master from 22-nd January 2017)
>>
>> Regards,
>> Tomas
>>
>>
>>
>>
>> --
>> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>

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


Re: Java Broker performance

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Tomas,

We are currently looking into performance improvements for the Receiver.
We will notify you after necessary changes are made and ready for testing.

Kind Regards,
Alex



On 22 January 2018 at 11:20, Tomas Soltys <to...@gmail.com> wrote:
> Hi Keith,
>
> I can confirm that sending is now much faster.
>
> *C++ broker*
> $ ./Broadcaster 20001
> real    0m0.085s
> user    0m0.027s
> sys     0m0.005s
>
> *Java broker*
> $ ./Broadcaster 20002
> real    0m0.876s
> user    0m0.037s
> sys     0m0.011s
>
> However receiving is still much slower.
>
> *C++ broker*
> $ time ./Receiver 20001
> real    0m0.113s
> user    0m0.035s
> sys     0m0.014s
>
> *Java broker*
> $ time ./Receiver 20002
> real    0m50.168s
> user    0m0.061s
> sys     0m0.032s
>
> See attached file  cpp_vs_java.gz
> <http://qpid.2158936.n2.nabble.com/file/t365522/cpp_vs_java.gz>   which
> contains:
> Broadcaster.cpp and Receiver.cpp based on qpid-proton 0.19.0
> Setup for C++ broker 1.37.0
> Setup for Java broker (master from 22-nd January 2017)
>
> Regards,
> Tomas
>
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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


Re: Java Broker performance

Posted by Tomas Soltys <to...@gmail.com>.
Hi Keith,

I can confirm that sending is now much faster.

*C++ broker*
$ ./Broadcaster 20001
real	0m0.085s
user	0m0.027s
sys	0m0.005s

*Java broker*
$ ./Broadcaster 20002
real	0m0.876s
user	0m0.037s
sys	0m0.011s

However receiving is still much slower.

*C++ broker*
$ time ./Receiver 20001
real	0m0.113s
user	0m0.035s
sys	0m0.014s

*Java broker*
$ time ./Receiver 20002
real	0m50.168s
user	0m0.061s
sys	0m0.032s

See attached file  cpp_vs_java.gz
<http://qpid.2158936.n2.nabble.com/file/t365522/cpp_vs_java.gz>   which
contains:
Broadcaster.cpp and Receiver.cpp based on qpid-proton 0.19.0
Setup for C++ broker 1.37.0
Setup for Java broker (master from 22-nd January 2017)

Regards,
Tomas




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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