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.
Very slow Azure File volume mount on Azure Container Instance
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.