Page 1 of 1

Free Memory

Posted: 28 Nov 2021, 13:41
by Kornelius777
Dear all,

I am running some 20'ish devices with ESPEasy on board.
Now, I came across this page saying
"Free Mem is available memory, this should be above 20 000 (byte) for the ESP to feel happy."
Well... Out of the box (using ESP_Easy_mega_20211005_normal_ESP8266_4M1M), none of my devices gets even close to this amount of free memory.

Now, I'm wondering: If I re-compile the firmware only with those plugins required for my use case - would that raise the amount of free memory?
And - if yes - could I just kick out each and every plugin? Or are there essential plugins which are required in any case?

What is the recommended way to minimize the number of installed plugins?

Thank you for your help!

Kind regards,

Kornelius

Re: Free Memory

Posted: 28 Nov 2021, 14:01
by TD-er
Well the Wiki is quite outdated.
On old builds all web pages were rendered in memory and thus you needed to have quite a lot of memory free to serve the web pages.
Now we render all web pages while it is being transferred to your browser, thus you only need a fraction of free memory.
The reason the free memory is now quite a lot lower is caused by a lot of buffering and the queues of the controllers.
Also the core SDKs are using quite a lot more memory.

It depends on the used configuration, but in general ESPEasy may run just fine with 6 - 7k of free memory.
More is always better of course.
Disabling logging may also help if you still experience crashes due to exceptions (which are almost always related to running out of memory)

Some controllers may need quite large memory chunks per queued message, so there is room for some tweaking if needed.
But there are checks for amount of free memory in the controller queue mechanism.