Page 1 of 1
how many tasks can ESP32 handle?
Posted: Wed Jun 27, 2018 10:42 pm
by mzimmers
I know this is probably an unanswerable question, but I just need a ballpark figure. Running FreeRTOS, is there a practical limit to the number of tasks I can run?
Re: how many tasks can ESP32 handle?
Posted: Wed Jun 27, 2018 11:29 pm
by urbanze
Limit is your max ram usage. Freertos doenst apply tasks limits...
Re: how many tasks can ESP32 handle?
Posted: Thu Jun 28, 2018 2:11 am
by fly135
Just make a loop creating tasks until it fails. I did that once but forgot how many I could make. Since then I found you could free 90K of Bt memory. So I could have created a bunch more anyway.
John A
Re: how many tasks can ESP32 handle?
Posted: Thu Jun 28, 2018 2:27 am
by mikemoy
Just know, the more tasks you have the less time each one will get from the CPU.
Re: how many tasks can ESP32 handle?
Posted: Thu Jun 28, 2018 2:40 am
by mzimmers
Oh yeah, I'm aware of that. The benefit of more tasks is just easier programming for me. I'm using 4 now, and want to add at least one more. It just prompted my curiosity more than anything.
Re: how many tasks can ESP32 handle?
Posted: Thu Jun 28, 2018 3:58 am
by ESP_Sprite
Well, as has been said before, it depends on the amount of memory. I just ran a quick test, creating tasks with 8K of stack (which should be more than enough for most purposes) and I could happily create 33 of 'em... so 5 shouldn't be an issue. If anything, the limiting factor mostly is the amount of (internal) RAM you use as stack, as others already said; there's no inherent limit in place.