4
votes

I'm setting up an Azure Function app that has multiple timer triggers that are triggered at or around the same time. I'm confused by the wording here: https://docs.microsoft.com/fi-fi/azure/azure-functions/functions-scale

Each instance of the Functions host in the Consumption plan is limited to 1.5 GB of memory and one CPU. An instance of the host is the entire function app, meaning all functions within a function app share resource within an instance and scale at the same time.

Does that mean that each script that is executed with a timer trigger is allocated 1.5 GB of memory or does that mean that all of the scripts share 1.5 GB of memory that are running at the same time?

2
Let's answer your question another way: if you expect multiple functions in your app to execute concurrently, they will all share the 1.5GB memory limit.FoggyDay
Thanks @FoggyDay. I do expect my app to execute multiple functions concurrently and eventually exceed the 1.5GB memory limit. I think I can temporarily get around this by executing the timer triggers at different times per function, but as my data grows this will become harder. Do you recommend alternatives like an App Service plan or Azure Batch if I need more memory?ddx
plan is a virtual concept, it is basically based on virtual machines. plan provides the scale of computing resources that you can deploy. When you deploy an application or function on a plan, it will use a portion of the computing resources, and the total computing resources that you can deploy are based on how many computing resources the plan you choose provides. If you want more computing resources or memory, please choose premium plan or App Service Plan.Cindy Pau
The premium plan provides three pricing tiers: docs.microsoft.com/fi-fi/azure/azure-functions/… If you choose App Service Plan, you have more options .Cindy Pau
Hi, any more doubts? I have post an answer, if you dont have more doubts, can we end this question?Cindy Pau

2 Answers

3
votes

Plan is a virtual concept, it is basically based on virtual machines. plan provides the scale of computing resources that you can deploy. When you deploy an application or function on a plan, it will use a portion of the computing resources, and the total computing resources that you can deploy are based on how many computing resources the plan you choose provides. If you want more computing resources or memory, please choose premium plan or App Service Plan.

The premium plan provides three pricing tiers: https://docs.microsoft.com/fi-fi/azure/azure-functions/functions-premium-plan#available-instance-skus If you choose App Service Plan, you have more options

This is obviously impossible for each trigger to have 1.5gb of memory. It means that your function app can use 1.5gb. If you need more memory, you need to choose premium plan or app service plan and select the corresponding pricing tier.

2
votes

The way it is documented for Consumption Plan is a bit confusing. I ran a small test that would fill memory 10MB every min till 1GB.

Here is the result of 3 instances running at same time: https://www.screencast.com/t/F3rTyZWk

So when in azure documentation they say 1.5GB per instance, it is actually per instance and not for all the instance of the Function App.