Understand Azure Files performance (2024)

  • Article

Azure Files can satisfy performance requirements for most applications and use cases. This article explains the different factors that can affect file share performance and how to optimize the performance of Azure file shares for your workload.

Applies to

File share typeSMBNFS
Standard file shares (GPv2), LRS/ZRSUnderstand Azure Files performance (1)Understand Azure Files performance (2)
Standard file shares (GPv2), GRS/GZRSUnderstand Azure Files performance (3)Understand Azure Files performance (4)
Premium file shares (FileStorage), LRS/ZRSUnderstand Azure Files performance (5)Understand Azure Files performance (6)

Glossary

Before reading this article, it's helpful to understand some key terms relating to storage performance:

  • IO operations per second (IOPS)

    IOPS, or input/output operations per second, measures the number of file system operations per second. The term "IO" is interchangable with the terms "operation" and "transaction" in the Azure Files documentation.

  • I/O size

    I/O size, sometimes referred to as block size, is the size of the request that an application uses to perform a single input/output (I/O) operation on storage. Depending on the application, I/O size can range from very small sizes such as 4 KiB to much larger sizes. I/O size plays a major role in achievable throughput.

  • Throughput

    Throughput measures the number of bits read from or written to the storage per second, and is measured in mebibytes per second (MiB/s). To calculate throughput, multiply IOPS by I/O size. For example, 10,000 IOPS * 1 MiB I/O size = 10 GiB/s, while 10,000 IOPS * 4 KiB I/O size = 38 MiB/s.

  • Latency

    Latency is a synonym for delay and is usually measured in milliseconds (ms). There are two types of latency: end-to-end latency and service latency. For more information, see Latency.

  • Queue depth

    Queue depth is the number of pending I/O requests that a storage resource can handle at any one time. For more information, see Queue depth.

Choosing a performance tier based on usage patterns

Azure Files provides a range of storage tiers that help reduce costs by allowing you to store data at the appropriate level of performance and price. At the highest level, Azure Files offers two performance tiers: standard and premium. Standard file shares are hosted on a storage system backed by hard disk drives (HDD), while premium file shares are backed by solid-state drives (SSD) for better performance. Standard file shares have several storage tiers (transaction optimized, hot, and cool) that you can seamlessly move between to maximize the data at-rest storage and transaction prices. However, you can't move between standard and premium tiers without physically migrating your data between different storage accounts.

When choosing between standard and premium file shares, it's important to understand the requirements of the expected usage pattern you're planning to run on Azure Files. If you require large amounts of IOPS, extremely fast data transfer speeds, or very low latency, then you should choose premium Azure file shares.

The following table summarizes the expected performance targets between standard and premium. For details, see Azure Files scalability and performance targets.

Usage pattern requirementsStandardPremium
Write latency (single-digit milliseconds)YesYes
Read latency (single-digit milliseconds)NoYes

Premium file shares offer a provisioning model that guarantees the following performance profile based on share size. For more information, see Provisioned model. Burst credits accumulate in a burst bucket whenever traffic for your file share is below baseline IOPS. Earned credits are used later to enable bursting when operations would exceed the baseline IOPS.

Capacity (GiB)Baseline IOPSBurst IOPSBurst creditsThroughput (ingress + egress)
1003,100Up to 10,00024,840,000110 MiB/s
5003,500Up to 10,00023,400,000150 MiB/s
1,0244,024Up to 10,00021,513,600203 MiB/s
5,1208,120Up to 15,36026,064,000613 MiB/s
10,24013,240Up to 30,72062,928,0001,125 MiB/s
33,79236,792Up to 100,000227,548,8003,480 MiB/s
51,20054,200Up to 100,000164,880,0005,220 MiB/s
102,400100,000Up to 100,000010,340 MiB/s

Performance checklist

Whether you're assessing performance requirements for a new or existing workload, understanding your usage patterns will help you achieve predictable performance. Consult with your storage admin or application developer to determine the following usage patterns.

  • Latency sensitivity: Are users opening files or interacting with virtual desktops that run on Azure Files? These are examples of workloads that are sensitive to read latency and also have high visibility to end users. These types of workloads are more suitable for premium Azure file shares, which can provide single-millisecond latency for both read and write operations (< 2 ms for small I/O size).

  • IOPS and throughput requirements: Premium file shares support larger IOPS and throughput limits than standard file shares. See file share scale targets for more information.

  • Workload duration and frequency: Short (minutes) and infrequent (hourly) workloads will be less likely to achieve the upper performance limits of standard file shares compared to long-running, frequently occurring workloads. On premium file shares, workload duration is helpful when determining the correct performance profile to use based on the provisioning size. Depending on how long the workload needs to burst for and how long it spends below the baseline IOPS, you can determine if you're accumulating enough bursting credits to consistently satisfy your workload at peak times. Finding the right balance will reduce costs compared to over-provisioning the file share. A common mistake is to run performance tests for only a few minutes, which is often misleading. To get a realistic view of performance, be sure to test at a sufficiently high frequency and duration.

  • Workload parallelization: For workloads that perform operations in parallel, such as through multiple threads, processes, or application instances on the same client, premium file shares provide a clear advantage over standard file shares: SMB Multichannel. See Improve SMB Azure file share performance for more information.

  • API operation distribution: Is the workload metadata heavy with file open/close operations? This is common for workloads that are performing read operations against a large number of files. See Metadata or namespace heavy workload.

Latency

When thinking about latency, it's important to first understand how latency is determined with Azure Files. The most common measurements are the latency associated with end-to-end latency and service latency metrics. Using these transaction metrics can help identify client-side latency and/or networking issues by determining how much time your application traffic spends in transit to and from the client.

  • End-to-end latency (SuccessE2ELatency) is the total time it takes for a transaction to perform a complete round trip from the client, across the network, to the Azure Files service, and back to the client.

  • Service Latency (SuccessServerLatency) is the time it takes for a transaction to round-trip only within the Azure Files service. This doesn't include any client or network latency.

    Understand Azure Files performance (7)

The difference between SuccessE2ELatency and SuccessServerLatency values is the latency likely caused by the network and/or the client.

It's common to confuse client latency with service latency (in this case, Azure Files performance). For example, if the service latency is reporting low latency and the end-to-end is reporting very high latency for requests, that suggests that all the time is spent in transit to and from the client, and not in the Azure Files service.

Furthermore, as the diagram illustrates, the farther you are away from the service, the slower the latency experience will be, and the more difficult it will be to achieve performance scale limits with any cloud service. This is especially true when accessing Azure Files from on premises. While options like ExpressRoute are ideal for on-premises, they still don't match the performance of an application (compute + storage) that's running exclusively in the same Azure region.

Tip

Using a VM in Azure to test performance between on-premises and Azure is an effective and practical way to baseline the networking capabilities of the connection to Azure. Often a workload can be slowed down by an undersized or incorrectly routed ExpressRoute circuit or VPN gateway.

Queue depth

Queue depth is the number of outstanding I/O requests that a storage resource can service. As the disks used by storage systems have evolved from HDD spindles (IDE, SATA, SAS) to solid state devices (SSD, NVMe), they've also evolved to support higher queue depth. A workload consisting of a single client that serially interacts with a single file within a large dataset is an example of low queue depth. In contrast, a workload that supports parallelism with multiple threads and multiple files can easily achieve high queue depth. Because Azure Files is a distributed file service that spans thousands of Azure cluster nodes and is designed to run workloads at scale, we recommend building and testing workloads with high queue depth.

High queue depth can be achieved in several different ways in combination with clients, files, and threads. To determine the queue depth for your workload, multiply the number of clients by the number of files by the number of threads (clients * files * threads = queue depth).

The table below illustrates the various combinations you can use to achieve higher queue depth. While you can exceed the optimal queue depth of 64, we don't recommend it. You won't see any more performance gains if you do, and you risk increasing latency due to TCP saturation.

ClientsFilesThreadsQueue depth
1111
1122
1224
2228
22416
24432
18864
44264

Tip

To achieve upper performance limits, make sure that your workload or benchmarking test is multi-threaded with multiple files.

Single versus multi-thread applications

Azure Files is best suited for multi-threaded applications. The easiest way to understand the performance impact that multi-threading has on a workload is to walk through the scenario by I/O. In the following example, we have a workload that needs to copy 10,000 small files as quickly as possible to or from an Azure file share.

This table breaks down the time needed (in milliseconds) to create a single 16 KiB file on an Azure file share, based on a single-thread application that's writing in 4 KiB block sizes.

I/O operationCreate4 KiB write4 KiB write4 KiB write4 KiB writeCloseTotal
Thread 13 ms2 ms2 ms2 ms2 ms3 ms14 ms

In this example, it would take approximately 14 ms to create a single 16 KiB file from the six operations. If a single-threaded application wants to move 10,000 files to an Azure file share, that translates to 140,000 ms (14 ms * 10,000) or 140 seconds because each file is moved sequentially one at a time. Keep in mind that the time to service each request is primarily determined by how close the compute and storage are located to each other, as discussed in the previous section.

By using eight threads instead of one, the above workload can be reduced from 140,000 ms (140 seconds) down to 17,500 ms (17.5 seconds). As the table below shows, when you're moving eight files in parallel instead of one file at a time, you can move the same amount of data in 87.5% less time.

I/O operationCreate4 KiB write4 KiB write4 KiB write4 KiB writeCloseTotal
Thread 13 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 23 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 33 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 43 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 53 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 63 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 73 ms2 ms2 ms2 ms2 ms3 ms14 ms
Thread 83 ms2 ms2 ms2 ms2 ms3 ms14 ms

See also

  • Troubleshoot Azure file shares performance issues
  • Monitoring Azure Files
  • Planning for an Azure Files deployment
  • Understanding Azure Files billing
  • Azure Files pricing

As an expert in Azure Files and storage performance optimization, I have extensive knowledge of the key concepts and strategies outlined in the provided article. My expertise is based on hands-on experience and a deep understanding of the technical nuances involved in optimizing file share performance on the Azure platform.

Factors Affecting File Share Performance:

  1. IO Operations per Second (IOPS):

    • Definition: Measures the number of file system operations per second.
    • Importance: Crucial for understanding the workload's operational intensity.
  2. I/O Size (Block Size):

    • Definition: The size of the request an application uses for a single input/output operation on storage.
    • Role: Influences achievable throughput; varies from small (4 KiB) to larger sizes.
  3. Throughput:

    • Definition: Measures the number of bits read from or written to storage per second (measured in MiB/s).
    • Calculation: Multiply IOPS by I/O size to determine throughput.
  4. Latency:

    • Definition: Synonymous with delay, measured in milliseconds (ms).
    • Types: End-to-end latency and service latency.
    • Significance: Critical for assessing the responsiveness of the storage system.
  5. Queue Depth:

    • Definition: The number of pending I/O requests a storage resource can handle simultaneously.
    • Importance: Influences system responsiveness and workload scalability.

Choosing a Performance Tier:

  • Azure Files offers standard and premium performance tiers.
  • Standard uses hard disk drives (HDD), while premium uses solid-state drives (SSD).
  • Performance targets differ, with premium offering lower latency and higher throughput.

Performance Checklist:

  • Assessing usage patterns for latency sensitivity, IOPS, throughput, workload duration, frequency, workload parallelization, and API operation distribution.

Understanding Latency:

  • Distinguishing between end-to-end latency and service latency.
  • Analyzing client-side latency and network issues.
  • Considerations for accessing Azure Files from on-premises locations.

Queue Depth Strategies:

  • Recommending high queue depth for distributed file services like Azure Files.
  • Calculating queue depth based on the number of clients, files, and threads.

Single vs. Multi-Thread Applications:

  • Advocating for multi-threaded applications for optimal Azure Files performance.
  • Highlighting the impact of multi-threading on workload efficiency and time savings.

Performance Testing Tips:

  • Emphasizing the need for realistic performance tests with sufficient duration and frequency.
  • Using Azure VMs to test on-premises and Azure connections for accurate baselining.

This comprehensive knowledge positions me to provide valuable insights and guidance on optimizing Azure Files performance for diverse workloads, ensuring efficient utilization of resources and cost-effectiveness.

Understand Azure Files performance (2024)
Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5877

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.