Gavin H
Gavin H

Reputation: 10482

High file IO activity on storage account used with Azure Function

I have a fairly simple Azure Function App w/ 3 functions (2 HTTP bound, 1 heartbeat type function that runs every 5 minutes).

When trying to figure out why this particular function app was causing higher costs than our other projects I saw that the costs were almost exclusively due to storage costs which were caused by file storage create/write transactions.

It looks like about every hour there is a spike to ~5-8k file storage transactions. The function app is pretty low usage so I am not sure to what to attribute the spikes in file transactions.

enter image description here

Previously I was seeing the spikes over 10k transactions. That was with the production slot and secondary deployment slot both configured to use the same storage account. I have since created a separate storage account for the "cert" deployment slot which is now seeing a similar hourly spike.

What I have tried:

Is this sort of usage expected behavior? Our storage costs are much higher in this case compared to other function apps we have - though most others are written in C#.

It's not a ton of money but it is surprising to see only pennies charged for the Azure Functions whereas the file transactions are costing several dollars a month.

Upvotes: 1

Views: 555

Answers (1)

suziki
suziki

Reputation: 14088

The cost of Azure Function consists of two parts, one is the cost of the Function and the other is the cost of App Insights.

According to your description, this function is not often used and you removed the AzureWebJobsDashboard, then we can rule out two situations, this will not be the cost of the operation of the Storage inside the Function, nor the cost caused by Insights.

Based on the above two points, I suspect that such a huge storage cost is from the deployment phase. When your project is deployed, the entire project information is passed to File Storage and this deployment operation has been performed multiple times. This should be the reason for this cost.

Upvotes: 2

Related Questions