how many tasks can ESP32 handle?

User avatar
mzimmers
Posts: 534
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

how many tasks can ESP32 handle?

Postby mzimmers » Wed Jun 27, 2018 10:42 pm

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?

User avatar
urbanze
Posts: 272
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: how many tasks can ESP32 handle?

Postby urbanze » Wed Jun 27, 2018 11:29 pm

Limit is your max ram usage. Freertos doenst apply tasks limits...

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: how many tasks can ESP32 handle?

Postby fly135 » Thu Jun 28, 2018 2:11 am

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

mikemoy
Posts: 494
Joined: Fri Jan 12, 2018 9:10 pm

Re: how many tasks can ESP32 handle?

Postby mikemoy » Thu Jun 28, 2018 2:27 am

Just know, the more tasks you have the less time each one will get from the CPU.

User avatar
mzimmers
Posts: 534
Joined: Wed Mar 07, 2018 11:54 pm
Location: USA

Re: how many tasks can ESP32 handle?

Postby mzimmers » Thu Jun 28, 2018 2:40 am

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.

ESP_Sprite
Posts: 4396
Joined: Thu Nov 26, 2015 4:08 am

Re: how many tasks can ESP32 handle?

Postby ESP_Sprite » Thu Jun 28, 2018 3:58 am

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.

Who is online

Users browsing this forum: No registered users and 81 guests