Very slow Azure File volume mount on Azure Container Instance

Matthias Denu 21 Reputation points
2021-11-08T13:36:58.163+00:00

We are using an ARM template to deploy a container instance that has a file share as a volume mount.

We have a process that runs on the container that makes many file operations to the mounted share. We have noticed that the performance of this process has decreased significantly since changing it to use the file share, rather than doing it locally, in volatile memory that will be deleted with the container instance. We want to use the Azure file share so that we have persistent storage, even after the container instance is deleted, but we would like to reduce the performance hit.

I've looked at https://learn.microsoft.com/en-us/azure/storage/files/storage-troubleshooting-files-performance#high-latencies-for-metadata-heavy-workloads-involving-extensive-openclose-operations but wasn't able to solve the problem.

It does not appear that we can change the options sent to the mount command for the container image through the ARM template https://learn.microsoft.com/en-us/azure/templates/microsoft.containerinstance/containergroups?tabs=json#volume.

Attached is a screen shot of some metrics.

147441-screen-shot-2021-11-08-at-82953-am.png

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,161 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ayomide Oluwaga 946 Reputation points
    2023-04-22T13:31:09.8766667+00:00

    Hello Matthias, Have you considered using Azure Premium Files instead of standard Azure Files. Premium Files provide higher performance and lower latency than standard Azure Files, but come at a higher cost. Unfortunately, as you noted, the options sent to the mount command for the container image cannot be changed through the ARM template. However, you can manually mount the file share with custom options inside your container by modifying the container image itself or using an entry point script that runs when the container starts. If you need more information on this, let me know.

    0 comments No comments