-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very high cpu usage with >1 instance running #1022
Comments
which Values or Current were shown by your Jkbms at the same time? |
Can't tell since the app can't connect as long as the cerbo has them grabbed. |
One instance already take like 17% CPU, which is IMMENSE .. !! We already reported those but ... well ... those has been closed. |
We optimized it the best we could. If you compare with a EM* it gets much more data and processes it. Feel free to open a PR to increase performance. |
Maybe a reduction of the polling frequency could imrpove the situation? 1sec is great to have but not always needed. |
Or poll one battery every second, in a round-robin fashion. For 3+ batteries maybe give the one that is set as the controlling BMS some preference. |
That will not work. You need to poll the battery at the same moment, else you have a snapshot of different moments. This will result in wrong data and wrong system behaviour. |
Consistancy in time is good, but not having an overloaded CPU is more important. And with 5 Batteries a consistent set of data from 5 sec ago doesn't seem better than having the 'average' state from 2.5s ago. Do you have an example scenario that would cause problems in the round robin reading scheme but would work with low frequency all at the same time scenario? |
for my 3 batteries, I'd use a poll scheme like |
Reduced poling, as you said .. it will crash the drivers once a day (if i remember correctly) maybe this crash is specific to Jkbms. |
Try to disable the "VRM 2-way-communication" in "VRM online portal" settings page I had that crash/reboot once/twice a day too, it went away when I disabled this setting. |
Some months ago we switched the Bluetooth connections from polling to callback, since the driver crashed after some hours without reason. |
Hello @mr-manuel , Can you please explain your proposed solution ? installing Venus OS on a raspberry, configuring the 3 bms and use an aggregation of course is no problem. Thank you a lot for your help :) |
|
There are different threads that act as watchdog and restart the driver in case of failure. |
Just seen htop screenshots from users that use RS485 ... it's something like 3% per BMS (i asked which one he is using) while it's 14% with bluetooth on jkbms. |
Bluetooth don't poll the data, but elaborates all what the BMS sends over. I'm modifying the driver right now to let the user choose, if it should be used in the normal way or as passthough only. In passthrough mode only the data is fetched and no calculations are made. In this case the calculations for CVL, CCL and DCL are not done anymore and it is not recommended to select the battery as battery monitor. You will need a battery aggregator or something else that make these calculations and then select it as battery monitor. This way the data is calculated only once and not per battery. |
that sounds great! I toyed with the idea of introducing a "battery count" parameter: i.e. calculate the charge/discharge current limit for one battery and multiply it with the "battery count" parameter. This would work great for my 3 identical parallel units (i.e. right now charge limit is 150A, while the 3 units could easily sustain the >300A of the MP2s, with dbus-serialbattery still connected to just one bms). Thanks! |
Could you all please install |
in config.ini: DRIVER_MODE = 0:
DRIVER_MODE = 1:
and I changed the poll interval to 5000 in the heltec BMS driver, to avoid watchdog resets:
I have the impression that a configuration option for the poll_interval (or even a dynamic reduction on overload) would be more effective than tweaking the calculations. |
I had the same impression that the load did not change, but it would be good to have multiple feedbacks. |
Since there are not many willing to test but only concerning I will close this. Meanwhile I added an option to change the polling interval. |
This is also a great feature, thanks a lot! |
Describe the problem
I have 3 instances of jkbms-ble connected; cpu usage on the cerbo gx is basically 100%, GUI is really slow, and the display of the battery states in the device list is lagging about 2 minutes behind the lynx shunt and the pv inverter display (both update still in realtime though). For instance when PV power drops below the baseline, the lynx shunt current becomes negative, while the 3 batteries still show positive values for about 2 minutes, then they rapidly drop, as if the displayed values are simply 2 minutes behind.
Also, the Multis once or twice a day complain about "BMS: connection lost" and the EM24 RS485 connection also dies for a few minutes.
"ps" on the cerbo shows each dbus-serialbattery process consuming about 10% cpu.
I've now disabled all but one battery, and since then the cpu usage of the whole system has dropped considerably, to 55% idle, the GUI updates much much smoother, and also the state and currentflow reading of the one battery are in line with the readings of the lynx shunt; the "bms connection lost" messages are gone and the em24 reading is also more stable.
Any ideas on what to do here?
Thanks!
Manuel
Driver version
v1.1.20240121
Venus OS device type
Cerbo GX
Venus OS version
3.30
BMS type
JKBMS / Heltec BMS
Cell count
12
Battery count
3
Connection type
Bluetooth
Config file
Relevant log output
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: