High lpwork CPU % at v1.6.0

Hello
I done few short test flight for version 1.6.0, at first all seems ok, but on some flights there was very bad position estimation, the position had very fast position drift. (it was lloked like it lost GPS, but there was 18 sats)
looking at the logs showed me strange thing, the lpwork thread sometimes goes to ~30%, at the post flight log.
I looked over old logs and at that logs the thread is ~0.1%.
Could that be a bug that takes the CPU and might cause the bad position estimation?

LOAD POST-FLIGHT

PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE) STATE
0 Idle Task 169734 11.818 652/ 748 0 ( 0) READY
1 hpwork 26216 5.000 992/ 1780 192 (192) w:sig
2 lpwork 2699 28.909 784/ 1780 50 ( 50) READY
3 init 17810 0.000 1672/ 2484 100 (100) w:sem
95 gps 1369 0.272 1080/ 1524 220 (220) w:sem
103 dataman 153 0.000 704/ 1180 90 ( 90) w:sem
148 sensors 33552 6.545 1328/ 1980 250 (250) w:sem
150 commander 11785 2.272 2768/ 3652 140 (140) READY
157 px4io 17907 3.272 968/ 1380 240 (240) w:sem
171 mavlink_if0 8648 1.818 1736/ 2436 100 (100) READY
172 mavlink_rcv_if0 2797 0.545 1504/ 2140 175 (175) READY
183 mavlink_if1 5864 1.090 1720/ 2388 100 (100) READY
184 mavlink_rcv_if1 2737 0.454 1672/ 2140 175 (175) w:sem
304 commander_low_prio 20 0.000 592/ 2996 50 ( 50) READY
233 sdlog2 47074 0.181 2368/ 3316 177 (177) RUN
273 ekf2 106001 19.090 5048/ 5780 250 (250) w:sem
275 mc_att_control 23274 4.272 1256/ 1676 250 (250) w:sem
282 mc_pos_control 18108 4.727 1240/ 1876 250 (250) w:sem
292 navigator 1247 0.363 1200/ 1772 105 (105) READY

Processes: 19 total, 9 running, 10 sleeping
CPU usage: 78.82% tasks, 9.36% sched, 11.82% idle
DMA Memory: 5120 total, 2048 used 2560 peak
Uptime: 497.585s total, 169.734s idle

Hi

We moved the parameter saving to the lpwork thread and after a flight, the total flight duration parameter is saved, which explains the high load you see. It should be lower during flight.

The log will show if the CPU load is generally high or not. Alternatively you can monitor the CPU load in-flight with the mavlink shell in daily QGC with top.

Hi
Thank for the replay,
now its make sense. because also looking at the CPU % at the plot seems ok (about 70%).
Does it make sense to you that it goes to 30%?
what about changing parameters on air? can that cause to such %?
I do think that logging the lpwork at the exact moment of the parameter change confuse abit…

Yes 30% looks reasonable. The same happens for mid-air param changes. But it’s not a problem, the system is designed for that. The lp work thread does not delay the real-time tasks, such as the rate controller.