Azure Files Transactions Part 2

In part one I explained what transactions are and the different types of transactions. In part 2 we are going to see how you can view the various transactions and add some folders and files and try determine how may transactions are produced per action.

Before viewing the number of transactions lets start with a new storage container without provisioning file storage.

Once created, we can see there are no transactions by viewing the Insights, under the monitoring section.

After waiting a few mins and before creating a file share we can see there are already few transactions.

What we would like to do is to capture these transactions, in order to do this let enabled diagnostics and send the logs to a Log Analytics Workspace.

Fist enabled diagnostics for files:

Click “Add Diagnostics Setting”

Select to send all logs and metrics to a log Analytics Workspace.

Now that we have logging enabled create a File share on the storage account. In my environment, I have created a file share on the hot tier.

Going back to the viewing the logs we can see the total has increased to 32 without adding any data to the file share.

Lets add some data.

I’ve attached the fileshare to an empty volume, and added one empty folder.

Reviewing the number of transactions after a few minutes, we notice the number of transactions have increased to just under 200.

Next I copied the same empty folder 9 time, for a total of 10 Empty folders.

Reviewing the transactions again we can see they have increased to just under 1000.

Lastly, before reviewing the details of each transaction, I have added 10 txt files each 562KB into each folder. In total, we have 10 folders each containing 10 txt files, which has increased the total count to 2,637.

To view the trasactions go to the logs (preview) section under monitor and clear the screen in the righthand section.

Close the Query editor.

Enter “StorageFileLogs” in the new query Editor and click run.

Teh results can either be viewed in the portal or exported as a CSV, there is a limit on the ammount of transactions which can be viewed at anytime which is 30000.

The following information can be gathered from the transactions logs

  • Time Generated
  • Accunt Name
  • Location
  • Protocol
  • OperationNmae
  • AuthenticationType
  • StatusCode
  • StatusText
  • DurationMS
  • ServerLatencyMS
  • Uri
  • CallerIPAddress (You may see multiple IP addresses as some transactions will be internal to Azure)
  • SchemaVersion
  • OperationVersion
  • AuthenticationHash
  • etag
  • ServiceType
  • OperationCount
  • RequestHeaderSize

Unfortunately there is no way to estimate how may transactions each storage account will generate as there are numerous factors involved such as:

  • Amount of data (Folder and files)
  • Size of data
  • Amount of Churn on the data
  • Azure background transactions (these are normally run once a day depending on the size of the share)

If we were to have some guesstimates, I would say we would be looking at 15-25 transactions per create file/folder operation.

If you consider we had 2600 transactions for only a few small folders and files, you can see how large this could be defendant on the environment, especially with thousands of objects.

I have see customers with millions of transactions per day, and with that amount of transactions there is obviously an increase in the initial storage price.

So how do we estimate the storage costs?

This is a very good question. and with all of the factors involved its impossible to give a definitive answer, however my general rule of thumb would be that the overall costs would be around 2-3 times the costs of the base storage.

Hopefully the above helps explain the transactions, what they are and how they are charged.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.