Strangely high load on the ESP

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
masterds
New user
Posts: 4
Joined: 27 Jul 2023, 16:05

Strangely high load on the ESP

#1 Post by masterds » 08 Aug 2024, 01:24

Hello everyone.

I connected the following to my ESP32 with the latest espeasy firmware: an 8-channel relay board, three switches and an LED. So there are 12 tasks active (switch input - switch).

Now I noticed strange behavior. On the overview page I see a sustained load of 50% or more. Is that normal? If I deactivate all tasks I have a load of around 10%. Activating one task after the other increases the load by around 4-7% per task. The interval for all tasks is set to 0.
There are no rules active and no controllers or anything similar.

Weblog doesn't show anything unusual (for me).

I think that's unusual high load. Or is this normal behavior? :shock:

Maybe you can enlighten me.

Greetings.

TD-er
Core team member
Posts: 9884
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Strangely high load on the ESP

#2 Post by TD-er » 08 Aug 2024, 01:37

Please note that the CPU load isn't actually a very good indicator of how busy the CPU is.
ESPEasy is using a scheduler, which is essentially a list of things to do at a specific point in time.
On each loop() call, the scheduler is queried to see what has to be done.

whenever nothing is to be done at that time, that loop() call is considered an idle call.

The CPU load is essentially based on how much time is spent in those idle calls.
However if in lots of 'non-idle' calls the CPU is waiting, then the CPU load will be shown as high.

What build are you using? I have tried to lower the CPU load in the latest code merges.
See for example: https://td-er.nl/ESPEasy/latest/

masterds
New user
Posts: 4
Joined: 27 Jul 2023, 16:05

Re: Strangely high load on the ESP

#3 Post by masterds » 08 Aug 2024, 01:50

Thanks for info. So I don't have to worry about the high load?

I am using Build: ESP_Easy_mega_20240414_normal_ESP32_4M316k Apr 14 2024 from github.

TD-er
Core team member
Posts: 9884
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Strangely high load on the ESP

#4 Post by TD-er » 08 Aug 2024, 08:58

The load will probably be ~10 percent-point lower on the latest builds via the link I gave you.

I mainly use the load indicator to predict whether things will be done "on time" in ESPEasy.
If the load approaches 100% then the scheduler will not get things done at the scheduled intervals.
It is by no means an indicator the CPU will get warmer or consume more energy.

N.B. the energy consumption can be lowered by enabling "ECO" mode.
This will lower the clock frequency (on ESP32) and make more "delay()" calls when idle.
This will result in a higher reported "load" and may affect WiFi connectivity as it will turn off WiFi more often.

masterds
New user
Posts: 4
Joined: 27 Jul 2023, 16:05

Re: Strangely high load on the ESP

#5 Post by masterds » 08 Aug 2024, 12:17

I installed the newest build.
And yes, the load dropped to about 32%! ;)

Now I see the newly showing internal temperature. It shows about 75°C. Is this the core-temperature? I can touch the board without burning myself, so it must be less. :D

Thanks for your help!

User avatar
Ath
Normal user
Posts: 4330
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Strangely high load on the ESP

#6 Post by Ath » 08 Aug 2024, 12:19

masterds wrote: 08 Aug 2024, 12:17 Now I see the newly showing internal temperature. It shows about 75°C. Is this the core-temperature? I can touch the board without burning myself, so it must be less. :D
That internal temperature sensor isn't very accurate, but its accuracy also depends on the processor family...
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9884
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Strangely high load on the ESP

#7 Post by TD-er » 08 Aug 2024, 14:07

On ESP32-classic, the internal temperature sensor is not officially supported and for sure not calibrated at all.

On other ESP32's (ESP32-C2/C3/C6/S2/S3) it should be calibrated by Espressif, unless you have some engineering sample (I do have several without calibration, so not impossible to have)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests