Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how much local disk is available in an Azure Function execution context

How much LOCAL DISK is available to a single execution of an Azure Function.

According to this issue https://github.com/Azure/Azure-Functions/issues/179, the locations D:\local and the HOME environment variable should be writable.

I want to know how much space is available for each function to work with, or what the recommended strategy for using System.IO based file writes are for temporary files.

like image 239
JJS Avatar asked Jul 24 '17 16:07

JJS


People also ask

How many functions does an Azure function app have?

Azure how many functions in one function app? One Azure Function App can scales out to at max 200 instances as per Microsoft.

How many requests can an Azure function handle?

To limit the number of HTTP requests, the parameter Max Concurrent Requests have to be in the range from 1 to any number link, the default value for the Consumption plan is 100.

What is memory size in Azure function?

Azure Functions can only use 1.5GB RAM According to Microsoft, Azure Functions have a limit of one CPU and 1.5 GB of RAM per instance.


2 Answers

Just ran this code on my Function App:

foreach (DriveInfo drive in DriveInfo.GetDrives().Where(d => d.IsReady))
{
    log.Info($"{drive.Name}: {drive.TotalFreeSpace / 1024 / 1024} MB");
}

and got

C:\: 457665 MB
D:\: 1511 MB

I guess no document will tell you the exact number, but you can use mine as estimate. I'm running on Consumption plan.

like image 189
Mikhail Shilkov Avatar answered Sep 29 '22 16:09

Mikhail Shilkov


When you function app is in consumption plan, The data is d:\ comes from the file share of you associated Azure storage account. You can find the storage account information from the AzureWebJobsStorage Application Settings under the Platform features tab in portal and the file share information is preset in WEBSITE_CONTENTSHARE Application settings.

When your function app is on App Service plan it uses the default App Service Storage.

You can find the more information on Quota's and limitations at this link

  • Storage: https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#storage-limits.
  • App Service: https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#app-service-limits

From above documentation Consumption plan (Storage File Share) it is 5 TB and for App Service plan it depends on the plan under which your app is, but it ranges from 1-500 GB.

like image 20
Naren Avatar answered Sep 29 '22 17:09

Naren