You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Adel Boutros <Ad...@live.com> on 2016/11/02 17:28:42 UTC

[Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

Hello,


In Proton 0.12.2, we were able to inject events from other threads to the messaging_handler thread by calling timer.schedule indefinitely and queues storing messages to send.


With Proton 0.14.0, We have implemented proton::thread_safe::event_loop() which should replace the above timer.schedule.


We have noticed our unit tests are 1 000 times slower with the event loop mechanism


We have tried having an event_loop which does nothing (Test takes 1254 milliseconds instead of 4 milliseconds).


We also tried with Proton 0.15.0 but it didn't change a thing.


Are you aware of such performance regression? How can we analyze it?


Regards,

Adel



Re: [Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

Posted by Adel Boutros <ad...@live.com>.
Hello Alan,

Did you have time to check the below?

Regards,
Adel



On Thu, Nov 3, 2016 at 2:53 PM +0100, "Adel Boutros" <Ad...@live.com>> wrote:

Hello Alan,


Issue created and test case attached in the JIRA. You need to have a running broker for the code to run. The functor just closes the connection and it takes 1.15 seconds for the "on_connection_closed" to be called. The timer is started when the functor code is called.


https://issues.apache.org/jira/browse/PROTON-1339


PS: If the fix is patchable and appliable on 0.14.0, I would like to apply it locally.


Regards,

Adel

________________________________
From: Alan Conway <ac...@redhat.com>
Sent: Wednesday, November 2, 2016 6:32:00 PM
To: users@qpid.apache.org
Subject: Re: [Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

On Wed, 2016-11-02 at 17:28 +0000, Adel Boutros wrote:
> Hello,
>
>
> In Proton 0.12.2, we were able to inject events from other threads to
> the messaging_handler thread by calling timer.schedule indefinitely
> and queues storing messages to send.
>
>
> With Proton 0.14.0, We have implemented
> proton::thread_safe::event_loop() which should replace the above
> timer.schedule.
>
>
> We have noticed our unit tests are 1 000 times slower with the event
> loop mechanism

Yikes! Please open a JIRA with a test program, I will look at it right
away. I am currently working on improvements to the underlying IO
driver so this is well timed. Better performance metrics is also a hot
topic right now.

> Are you aware of such performance regression? How can we analyze it?

Probably not a regression but just a foolish bit of code in the inject
path, I imagine it will be easy to find and fix with such a large
delta. I'll try to get it fixed for the next release.

Cheers,
Alan.

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


Re: [Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

Posted by Adel Boutros <Ad...@live.com>.
Hello Alan,


Issue created and test case attached in the JIRA. You need to have a running broker for the code to run. The functor just closes the connection and it takes 1.15 seconds for the "on_connection_closed" to be called. The timer is started when the functor code is called.


https://issues.apache.org/jira/browse/PROTON-1339


PS: If the fix is patchable and appliable on 0.14.0, I would like to apply it locally.


Regards,

Adel

________________________________
From: Alan Conway <ac...@redhat.com>
Sent: Wednesday, November 2, 2016 6:32:00 PM
To: users@qpid.apache.org
Subject: Re: [Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

On Wed, 2016-11-02 at 17:28 +0000, Adel Boutros wrote:
> Hello,
>
>
> In Proton 0.12.2, we were able to inject events from other threads to
> the messaging_handler thread by calling timer.schedule indefinitely
> and queues storing messages to send.
>
>
> With Proton 0.14.0, We have implemented
> proton::thread_safe::event_loop() which should replace the above
> timer.schedule.
>
>
> We have noticed our unit tests are 1 000 times slower with the event
> loop mechanism

Yikes! Please open a JIRA with a test program, I will look at it right
away. I am currently working on improvements to the underlying IO
driver so this is well timed. Better performance metrics is also a hot
topic right now.

> Are you aware of such performance regression? How can we analyze it?

Probably not a regression but just a foolish bit of code in the inject
path, I imagine it will be easy to find and fix with such a large
delta. I'll try to get it fixed for the next release.

Cheers,
Alan.

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


Re: [Proton-c] [0.14.0] [0.15.0] Event_loop injection is very slow compared to timer schedule

Posted by Alan Conway <ac...@redhat.com>.
On Wed, 2016-11-02 at 17:28 +0000, Adel Boutros wrote:
> Hello,
> 
> 
> In Proton 0.12.2, we were able to inject events from other threads to
> the messaging_handler thread by calling timer.schedule indefinitely
> and queues storing messages to send.
> 
> 
> With Proton 0.14.0, We have implemented
> proton::thread_safe::event_loop() which should replace the above
> timer.schedule.
> 
> 
> We have noticed our unit tests are 1 000 times slower with the event
> loop mechanism

Yikes! Please open a JIRA with a test program, I will look at it right
away. I am currently working on improvements to the underlying IO
driver so this is well timed. Better performance metrics is also a hot
topic right now.

> Are you aware of such performance regression? How can we analyze it?

Probably not a regression but just a foolish bit of code in the inject
path, I imagine it will be easy to find and fix with such a large
delta. I'll try to get it fixed for the next release.

Cheers,
Alan.

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