Excessive memory consumption while NCMD/DCMD command

mtolmatsky
2023-05-31
2024-01-19
  • mtolmatsky - 2023-05-31

    Hello,
    We are using for CodeSys project libraries: co⚡e - Sparkplug™ MQTT edge, co⚡e - Sparkplug™ MQTT stack and co🔗e - Linked List.
    Project consists of the controller running CodeSys runtime SP18.4 communicating with Mosquitto broker and Host application running on Windows 10 computer. During the test we discover extensive memory consumption of the Codesyscontrol process.
    To test this issue we restore Example project (coâš¡e: Sparkplugâ„¢ MQTT Example for Edge and Host from Download page of this site) and adapted this project for the standard Beaglebone Black (BBB) controller running Debian with Codesys runtime system. Application1 from the example has been loaded to BBB controller (project attached
    During the test it's appeared that there are no any additional memory consumption while publishing data. Unfortunately during consecutive writing of the same parameter: data topic: 'spBv1.0/co5e112/NCMD/Edge1' with following payload: {"timestamp":1685458065207,"metrics":[{"name":"Float/F3","alias":3,"timestamp":1685458065207,"dataType":"Float","value":11.0}],"seq":0}.

    During consecutive writing, top (table of procecesses) data for Codesyscontrol in the controller been captured.
    Results shown in the attached "BBB-project example.txt file. As you can see consumed memory gradually increasing.
    Could you please comment on this: is this expectable behavior or missed some configuration parameters or something else?
    Thank you very much,
    Michael Tolmatsky


    Talk Topic about project #mtolmatsky

     
  • i-campbell

    i-campbell - 2023-06-04

    I suspect the messages are being sent too quickly to be processed. Suggest either speeding up the task that runs the Edge FBs, Slowing down the rate of xCMD, or, fix the library so it handles cmd flooding better (and submit a pull request).

     

Log in to post a comment.