We have also started to use the datahub application in legato, one problem we have noticed that under frequent updating to the datahub (around 200 calls per second) we have around 20% CPU usage in the client application and 20% load in the datahub. It seems the problem is related to the interface. Legato framework version is 20.04. Is it a known limitation? Is there any suggestion for improvements? We have not investigate deeply yet, we thought maybe we could ask in forum first.
root@swi-mdm9x28-wp:~# cm info
Device: WP7605
IMEI: 353532100020465
IMEISV: 6
FSN: 2A917285070404
Firmware Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
Bootloader Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
MCU Version:
PRI Part Number (PN): 9908705
PRI Revision: 002.006
Carrier PRI Name: SIERRA
Carrier PRI Revision: 001.032_000
SKU: 1104208
Last Reset Cause: Power Down
Resets Count: Expected: 59 Unexpected: 0
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# legato version
19.02.0_a2f3e0fd302634e5deaac258dcf9b3fd
Thanks for the quick response, sorry for my belated answer!
The test application is writing around 200x times in one second with PushBoolean, PushNumeric etc functions to the DataHub. DataHub does not do any observations.
dhub line from top command
“1017 root 20 0 4996 1868 1116 R 19.6 1.2 1:04.46 hubd”
test application has around the same ~20%. CPU usage.
I think it must be something related to interface api. Is there a limit/recommendations on the number of API calls?
Hi, thanks for the feedback.
There is no sleep() or similar anywhere. And as the CPU consumption seems to be symmetrics ~20% on Datahub, ~20% on the client application I think it is something related to interface.
Do we have some performance details on the interface API calls?
I will check the helloIPC sample and try out different legato versions, but probably I can only do it next week.
We have performed some test cases with a dedicated application. It shows us that there is indeed a performance issue dedicated probably to the legato IPC API calls. We are using Legato 20.04 on WP76xx. I don’t think limiting the CPU power should be a good solution. Is this issue with the API is known? Maybe that is one of the reason the Legato RPC is being developed?Please find our test application here:dataHubTest.zip (382.2 KB) ?
One test result:
Here is the slightly modified HelloIPC sample which sends 10 calls per every 100 msec. Which is not that many.HelloIpcLoop.zip (31.7 KB)
We already have 1-2% CPU usage per applications:
Are you suggesting this should be normal for the legato API call to cause this kind of CPU load? I would not consider 10 calls per 100 ms too many on a powerful processor like this. If it is a known and expected behaviour I presume we have to live with this or try to improve it somehow.
Thx for suggesting limiting the CPU usage but it won’t really solve the root cause and might add unneeded delays.