Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  13 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
    Reply  13 Jan 2021, Konstantin Olchanski, Forum, poll_event() is very slow. 
       Reply  15 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
    Reply  13 Jan 2021, Stefan Ritt, Forum, poll_event() is very slow. 
       Reply  14 Jan 2021, Pintaudi Giorgio, Forum, poll_event() is very slow. 
       Reply  14 Jan 2021, Isaac Labrie Boulay, Forum, poll_event() is very slow. 
          Reply  08 Feb 2021, Konstantin Olchanski, Forum, poll_event() is very slow. 
Message ID: 2075     Entry time: 14 Jan 2021     In reply to: 2074
Author: Pintaudi Giorgio 
Topic: Forum 
Subject: poll_event() is very slow. 
> Something must be wrong on your side. If you take the example frontend under
> 
> midas/examples/experiment/frontend.cxx
> 
> and let it run to produce dummy events, you get about 90 Hz. This is because we have a
> 
>   ss_sleep(10);
> 
> in the read_trigger_event() routine to throttle things down. If you remove that sleep, 
> you get an event rate of about 500'000 Hz. So the framework is really quick.
> 
> Probably your routine which looks for a 'lam' takes really long and should be fixed.
> 
> Stefan

Sorry if I am going off-topic but, because the ss_sleep function was mentioned here, I 
would like to take the chance and report an issue that I am having.

In all my slow control frontends, the CPU usage for each frontend is close to 100%. This 
means that each frontend is monopolizing a single core. When I did some profiling, I 
noticed that 99% of the time is spent inside the ss_sleep function. Now, I would expect 
that the ss_sleep function should not require any CPU usage at all or very little.

So my two questions are:
Is this a bug or a feature?
Would you able to check/reproduce this behavior or do you need additional info from my 
side?
ELOG V3.1.4-2e1708b5