DeviceProxy subscribe_event performance

Hi, debugging performance issues with some graphical applications with many (500+) attributes, we have found a performance regression between TANGO7 and TANGO9.

We were used to ~60us for each subscribe_event in C++ TANGO 7.2.6
and now we experience ~10ms for each subscribe_event in C++ TANGO 9.2.5

Please, find attached the test code I have used:


$ ./subscribe_loop_t7 sys/tg_test/1 double_scalar
avg subscription takes 5.8716e-05 seconds

$ ./subscribe_loop_t9 sys/tg_test/1 double_scalar
avg subscription takes 0.0104682 seconds

Could somebody confirm this?

Thanks,

Guifré.
Hi Guifré,

A quick look at the source code led me to the following lines:
https://github.com/tango-controls/cppTango/blob/tango-9-lts/cppapi/client/event.cpp#L3113

There is indeed a sleep of 10ms (even 25ms on Windows!) during the subscription process and as explained in the source code:
This is required in case there is a push_event in the read_attribute (or pipe) method on the device side. This sleep gives time to ZMQ to send its subscription message
Maybe this could be improved but it looks tricky at first sight.

Cheers,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi Guifre,

I confirm I get 10ms with Tango 9.2.5 on my laptop running Ubuntu 17.04:

$ ./a.out sys/tg_test/1 double_scalar
avg subscription takes 0.0107445 seconds

Could you create an issue on github for this?

Thanks

Andy
Yes, of course: https://github.com/tango-controls/cppTango/issues/399

BTW, I did not receive your replies by email…
I guess it's because you did not subscribe to this forum category after the update of the website which occurred some months ago. Many subscriptions were lost at that time…
A new version of the website will be released soon and will give the possibility to subscribe to all categories by clicking on one button. Let's hope this update will not remove the existing subscriptions again…
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
I did some tries reducing the sleep to 1 ms and I got several API event timeout that ended in segfault. So it seems that there's a problem behind.

Just one poing. I'm currently running a Tango9 client on Tango7 devices, so the events are notifd and not ZMQ, so why am I affected by this sleep issue !?!?!

Sergi
Keep on dancing,

http://www.tango-controls.org/resources/howto/how-fandango/
 
Register or login to create to post a reply.