Is the 1.5 GB memory limit in Azure Functions limited to the entire Function App or per function invocation?

Viewed 7147

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 Answers

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.

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 instances of the Function App.

Related