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.

Azure Files Transactions Part 1

There is not a lot of information on Azure Files Transactions, so I thought id try my best to explain my understanding of the transactions, the costs and some other useful information.

This will be a 2 part blog, the first part covering the transactions and how they are broken down. The 2nd part will include how to view all the transactions.

What are Azure File Transactions?

Microsoft defines transactions as:

“Transactions are operations or requests against Azure Files to upload, download, or otherwise manipulate the contents of the file share. Every action taken on a file share translates to one or more transactions, and on standard shares that use the pay-as-you-go billing model, that translates to transaction costs.”

Looking at the Azure Price Calculator, selecting File Storage you will notice a little drop down section under “Transactions and data transfer”, which lists the following transactions:

  • Write transactions
  • List transactions
  • Read transactions
  • All other operations except for delete

Prices above are for UK South region.

Looking at the above, the Azure charges for transactions appear very reasonable at £0.0572 per 10 0000 write transactions. However we need to uderstand what is considered a Write, Read, and Other transaction.

Below we can see each of these transactions broken down into there various sections. Currently delete transactions are not charged.

Operation typeWrite transactionsList transactionsRead transactionsOther transactionsDelete transactions
Management operationsCreateShare SetFileServiceProperties SetShareMetadata SetSharePropertiesListSharesGetFileServiceProperties GetShareAcl GetShareMetadata GetShareProperties GetShareStats DeleteShare  
Data operationsCopyFile Create CreateDirectory CreateFile PutRange PutRangeFromURL SetDirectoryMetadata SetFileMetadata SetFileProperties SetInfo SetShareACL Write PutFilePermission  ListFileRanges ListFiles ListHandles  FilePreflightRequest GetDirectoryMetadata GetDirectoryProperties GetFile GetFileCopyInformation GetFileMetadata GetFileProperties QueryDirectory QueryInfo Read GetFilePermission  AbortCopyFile Cancel ChangeNotify Close Echo Ioctl Lock Logoff Negotiate OplockBreak SessionSetup TreeConnect TreeDisconnect CloseHandles AcquireFileLease BreakFileLease ChangeFileLease ReleaseFileLease  ClearRange DeleteDirectoryDeleteFile  

In part 2 ill create some files, and upload some data and show you how we can view the transactions that are created, and try