I compile with Arduino IDE 1.8.7
After upgrading from 2018.09.30 to the latest 2018.10.23 I noticed than a normal LOAD of ca. 3-5% increased to 35-100%
I have 1 Controler (Domoticz MQTT) and 5 system values and a BH1750
If I disable all of them the load is 35% and if I enable all of them the load is continue 100%
What might be wrong?
Load of the ESP8266
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Load of the ESP8266
The way it's being computed is change I think.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Load of the ESP8266
The load was previously computed by simply counting the number of times the loop() function was called.
The highest value seen was set as 0% and the lowest count seen was 100%.
This was very inaccurate, since its scale could change over time and you cannot compare loads among other nodes.
So a node running a simple switch could have a higher reported load compared to one with 10+ plugins active.
The current implementation uses a scheduler to determine when things should be done.
This scheduler also keeps track of how many micro seconds no tasks have been performed.
This counter determines the 'idle time' and is used to compute the load.
The scheduler has been in use for over a month, so it doesn't explain why you suddenly see an increase in CPU load.
You stated you're using Arduino to compile the firmware.
Can you see in the sysinfo page what version of the core library is being used? And what LWIP version?
Is only the BH1750 used?
What interval is set for the active plugins?
The highest value seen was set as 0% and the lowest count seen was 100%.
This was very inaccurate, since its scale could change over time and you cannot compare loads among other nodes.
So a node running a simple switch could have a higher reported load compared to one with 10+ plugins active.
The current implementation uses a scheduler to determine when things should be done.
This scheduler also keeps track of how many micro seconds no tasks have been performed.
This counter determines the 'idle time' and is used to compute the load.
The scheduler has been in use for over a month, so it doesn't explain why you suddenly see an increase in CPU load.
You stated you're using Arduino to compile the firmware.
Can you see in the sysinfo page what version of the core library is being used? And what LWIP version?
Is only the BH1750 used?
What interval is set for the active plugins?
Re: Load of the ESP8266
Both esp8266 use: Libraries:⋄ ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3
I tried on the ESP with 100% also 2.4.1 and all other possiblities of the LwIP
None of the combination works with less then 100% load.
Devices Uptime, FreeRAM, Vcc, and WifiRSSI use interval of 300 sec. and Load and BH1750 use 60 sec. interval.
And yes only the BH 1750 is used, besides sysinfo.
This the output of the debug log, hope this helps.
I tried on the ESP with 100% also 2.4.1 and all other possiblities of the LwIP
None of the combination works with less then 100% load.
Devices Uptime, FreeRAM, Vcc, and WifiRSSI use interval of 300 sec. and Load and BH1750 use 60 sec. interval.
And yes only the BH 1750 is used, besides sysinfo.
This the output of the debug log, hope this helps.
Code: Select all
10292002: WD : Uptime 172 ConnectFailures 0 FreeMem 16976
10292939: PluginStats P_25_Generic - System Info FIFTY_PER_SECOND Count: 181880 Avg/min/max 6.11/2/46 usec
10292942: Load File stats: Count: 224 Avg/min/max 9730.98/3670/24181 usec
10292944: Save File stats: Count: 2 Avg/min/max 76867.50/76610/77125 usec
10292947: Plugin call 50 p/s stats: Count: 36376 Avg/min/max 24108.94/23699/30585 usec
10292949: Plugin call 10 p/s stats: Count: 14633 Avg/min/max 24099.27/23713/30305 usec
10292951: Plugin call 10 p/s U stats: Count: 14633 Avg/min/max 4682.64/4448/6015 usec
10292954: Plugin call 1 p/s stats: Count: 1506 Avg/min/max 25148.28/24204/144464 usec
10292956: SensorSendTask() stats: Count: 72 Avg/min/max 287258.22/115634/602026 usec
10292958: sendData() stats: Count: 72 Avg/min/max 81571.91/78712/95484 usec
10292961: Compute formula stats: Count: 72 Avg/min/max 533.81/14/7605 usec
10292963: setNewTimerAt() stats: Count: 60326 Avg/min/max 676.00/620/1381 usec
10292965: Delay queue MQTT stats: Count: 72 Avg/min/max 5796.31/4591/7268 usec
10292967: timeDiff() stats: Count: 4122399 - CPU cycles per call: 10.32
10292969: Scheduler stats: (called/tasks/max_length/idle%) 60136/60136/13/0.00
Re: Load of the ESP8266
I must have to take a look at the BH1750 then.
It looks like something is blocking here.
The SensorSendTask line in your stats is also showing high values of 280 msec on average.
What are your Domoticz controller settings?
It looks like something is blocking here.
The SensorSendTask line in your stats is also showing high values of 280 msec on average.
What are your Domoticz controller settings?
Re: Load of the ESP8266
I just tried the "ESP_Easy_mega-20181023_normal_ESP8266_4096.bin" from the zip file. (Is OTA complied in that bin file???)
I now have a load of 18,5 %, so it seems that my Arduino setup is the problem. Altough it was a fresh install of the Arduino with the included libraries.
Have to investigate further.
I see that that bin is compiled with: ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2
That LwIP I did not try.
I also noticed that there was a 'lag' on the webpages, slow load compared to this last bin.
These are the controler settings:
I now have a load of 18,5 %, so it seems that my Arduino setup is the problem. Altough it was a fresh install of the Arduino with the included libraries.
Have to investigate further.
I see that that bin is compiled with: ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2
That LwIP I did not try.
I also noticed that there was a 'lag' on the webpages, slow load compared to this last bin.
These are the controler settings:
Code: Select all
Protocol: Domoticz MQTT
Locate Controller:
Controller IP: 192.168.2.xxx
Controller Port: 1883
Minimum Send Interval: 100[ms]
Max Queue Depth: 10
Max Retries: 10
Full Queue Action:
Check Reply:
Client Timeout: 300 [ms]
Controller User:
Controller Password:
Controller Subscribe: domoticz/out
Controller Publish: domoticz/in
Controller lwl topic:
LWT Connect Message:
LWT Disconnect Message:
Re: Load of the ESP8266
I just did everything from scratch. Deleted everything (libs) and unstalled Arduino IDE.
Reinstalled the Arduino IDE and nothing else but for the ESP_EASY libs and source.
I complied again and voila a load of 25%.
B.t.w. the default "ESP_Easy_mega-20181023_normal_ESP8266_4096.bin" gave a load of 18%.
So now I have to search for any conflicting libraries.
Besides the normal 4 warnings when compiling, I did not receive any other warning or errors.
Initial problem solved.
Reinstalled the Arduino IDE and nothing else but for the ESP_EASY libs and source.
I complied again and voila a load of 25%.
B.t.w. the default "ESP_Easy_mega-20181023_normal_ESP8266_4096.bin" gave a load of 18%.
So now I have to search for any conflicting libraries.
Besides the normal 4 warnings when compiling, I did not receive any other warning or errors.
Initial problem solved.
Who is online
Users browsing this forum: No registered users and 109 guests