Skip to content
Snippets Groups Projects

Resolve L2SS-188 "2021 05 27 branched from master udp recv sst client"

Merged Resolve L2SS-188 "2021 05 27 branched from master udp recv sst client"
All threads resolved!
All threads resolved!

Closes L2SS-188 adds sst client capable of receiving udp packets as well as a 'statistics_device' that uses said client. currently just tracks a the timestamp when the packet was received and the packet count.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • The statistics device is also missing from CDB/LOFAR_ConfigDb.json, preventing us from starting it, unfortunately.

  • Jan David Mol added 1 commit

    added 1 commit

    Compare with previous version

  • Jan David Mol added 1 commit

    added 1 commit

    • 2ce885bf - L2SS-188: Renamed statistics_device -> Statistics, as it's a name, and it's a...

    Compare with previous version

  • Jan David Mol
  • Jan David Mol
  • Jan David Mol
  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    Compare with previous version

  • Taya Snijder resolved all threads

    resolved all threads

  • Author Reporter

    @mol @jurges Replaced deque qith Queue and tested it. My main concern is now wether to use the put or put_nowait function. For now I've assumed that the put function works best, since we're dealing with UDP.

  • Good point, @snijder I am making an exception and read the Queue doc. :smile:

    class queue.Queue(maxsize=0)
    Constructor for a FIFO queue. maxsize is an integer that sets the upperbound limit on the number of items that can be placed in the queue. Insertion will block once this size has been reached, until queue items are consumed. If maxsize is less than or equal to zero, the queue size is infinite.

    OK. Understood. This tells me that, if the Queue happens to be full, the put will block regardless. But there's the option that you, @snijder , mention:

    Queue.put(item, block=True, timeout=None)
    Put item into the queue. If optional args block is true and timeout is None (the default), block if necessary until a free slot is available. If timeout is a positive number, it blocks at most timeout seconds and raises the Full exception if no free slot was available within that time. Otherwise (block is false), put an item on the queue if a free slot is immediately available, else raise the Full exception (timeout is ignored in that case).
    
    Queue.put_nowait(item)
    Equivalent to put(item, False).

    Considreing this and - as I already did yesterday - assuming that this is the blue print for all of our fututre "receive this data over UDP from that IP:PORT"-devices, I would immediately opt for the non-blocking put. But in addition I would then want to have an MP in the device that indicates the "fullness" of the queue, i.e. occupancy of the Queue in 0%-100%. Set the warning/alarm values accordingly (warning >=90%, alarm 100%) which will allow Tango to automatically send out an alarm event to interested parties.

    Here's my reasoning: We run this software on an multiuser/multiclient/multiprocess system and we do not have full control over what the system does behind the scenes. Therefore I actually expect that the system cannot keep up with storing the content of an incoming data stream. Why my software actually is not able to keep up is for the handling of the new situation without significance. If it is due to my software not being able to clear the queue of the imcoming stuff fast enough or because the OS is busy doing some system maintenance, ragrdless my software cannot keep up. Is it then smart to block the incoming stream to slow down the rate at which we need to store data? No because we cannot reconfigure how often the SSTs/XSTs/whatever are computed. Does it make sense to speed up the computation thread? Yes, but at the time of the incident, there is nothing that can actually speed up the computations. We can only make code faster after it showed that it is too slow. This leaves the storing of the received data as the only place where a proper action can take place. Long story made short: queue full? discard the packet, the alarm is already active since it got triggered during the last cycle when the last empty space in the queue was used up and the queue's occupancy reached 100%. This will keep the system stable under unexpected but unavoidable high load.

  • Taya Snijder added 1 commit

    added 1 commit

    • 94945a28 - changed back to put_nowait and added queue percentage MP

    Compare with previous version

  • Taya Snijder added 1 commit

    added 1 commit

    • 65c8c87d - exposes buffersize and queuesize to the sst_client init function with default parameters

    Compare with previous version

  • merged

  • Jan David Mol mentioned in commit d0b217f5

    mentioned in commit d0b217f5

  • Please register or sign in to reply
    Loading