Windows Azure virtual machine is slow to access network when scaling

user2520968 picture user2520968 · Jun 25, 2013 · Viewed 11.8k times · Source

I'm running some startup scripts (cmd/bat) on my small azure VM which include a file-transfer operation from a mounted VHD, and normally it finishes in about 3 minutes (copying files and extracting ~500Mb zip file with command-line 7z).

When I scale out to ~150 instances, the same operation is very slow (up to 15 minutes in total, most of which is used by 7z). Also, the nodes which are the slowest to complete the bootup procedure are very hard to access at first using mstsc(animation is lagging and takes a lot of time to log in), but that might not be related.

What could be the problem?

We had the idea to examine the cache, but it would be nice to know of any other potential bottleneck which may be present in the following situation.

UPDATE: I tried extracting on the D:\ drive instead of extracting it on the C:\ and while scaling to 200, the unzip takes about a minute! So it seems like the problem is that C:\ might be on the blob. But again, I have 3GB of data in 40 files, so 60MB/s per blob should be enough to handle it. Or - can it be the case that we have a cap for the all blobs?

Answer

richstep picture richstep · Jun 25, 2013

The VM sizes each have their own bandwidth limitations.

| VM Size       | Bandwidth     |
| ------------- |:-------------:|
| Extra Small   | 5 (Mbps)      |
| Small         | 100 (Mbps)    |
| Medium        | 200 (Mbps)    |
| Large         | 400 (Mbps)    |
| Extra Large   | 800 (Mbps)    |

I suspect you always have one copy of your mounted VHD and have ~150 instances hitting it. Increasing the VM size of the VM hosting the VHD would be a good test but an expensive solution. Longer term put the files in blob storage. That means modifying your scripts to access RESTful endpoints.

It might be easiest to create 2-3 drives on 2-3 different VMs and write a script that ensures they have the same files. Your scripts could randomly hit one of the 2-3 mounted VHDs to spread out the load.

Here are the most recent limitations per VM size. Unfortunately this table doesn't include network bandwidth: http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx

-Rich

p.s. I got the bandwidths from a PowerPoint slide in the Microsoft provided Azure Training Kit dated January 2013.