I have experimented with Azure File Service as a form of network file system that can be mounted by several VMs simultaneously -- something that regular Azure virtual hard disks are not capable of. An Azure VHD can only be attached to a single VM at a time.
However, when mounting an Azure File share via the SMB protocol, I observe some really poor write performance.
The set up is as follows, I've started a
Canonical:UbuntuServer:16.04-LTS:latest VM on a
When the boot process completes I follow the official instructions to mount the Azure File Share via SMB.
sudo apt-get install cifs-utils sudo mkdir -p /mnt/azure sudo mount -t cifs //<storageaccount>.file.core.windows.net/<file-share-name> /mnt/azure/ -o vers=3.0,username=<storageaccount>,password=<base64-encoded>,dir_mode=0777,file_mode=0777,serverino
Then I run this simple write performance test:
time for i in $(seq 1 500); do echo "hello!" > /mnt/azure/hello.txt; done real 0m20.673s user 0m0.032s sys 0m0.124s
As can be seen, it takes over 20 seconds to complete. As a comparison, running the same test on my local machine (with SSD drive), I see the following numbers:
time for i in $(seq 1 500); do echo "hello!" > hello.txt; done real 0m0.031s user 0m0.004s sys 0m0.024s
That is is completes in about 30 milli seconds. So there is almost a performance penalty factor of 1000 when running against the Azure File Share.
Are such performance numbers to be expected or am I missing something?