Is there a way to shorten the time between starting an Azure deployment and calling the OnStart () executable code?

Currently, when I create a deployment using the Windows Azure Management Portal, it takes 9 (nine!) Minutes to execute the code in my OnStart() role). I feel that something is wrong there - nine minutes is ridiculously long.

I have a small launch task that I expect to finish in a few seconds (and it ends in a few seconds when running under Compute Emulator), so it looks like the Azure infrastructure has been doing something big there all this time.

Is there a way to speed up the process?

+4
source share
3 answers

Windows Azure typically takes 5-15 minutes to deploy. What he does is deploying servers, virtual machines, loading Windows, etc. It gets faster over time, but nine minutes, of course, is not ordinary.

+7
source

When you deploy an application to Windows Azure, it depends on the size of the virtual machine and the number of instances that occurs:

  • You provide the type of virtual machine (small, medium, large, fast-large) and instance counter (e.g. N)

  • Depending on the VM type setting, if you selected a small one, then Fabric Controller (FC) should find a slot in which one main virtual virtual machine can be started for you, or if you selected an ex-large one, then FC should find a host machine for host an 8-wire guest virtual machine. Two possibilities may arise at this stage (there are more, but for simplicity, I quote only 2):

    2.1 FC can find a ready-made node (or rack) that already has 1 or more kernels to host your virtual machine 2.2 FC cannot find empty kernel (s) in all host hosts and you need to restart new ones nodes for hosting a guest virtual machine

  • If your virtual machine was selected for path 2.1, in this case the host virtual machine is already turned on, and the host just needs to provide a guest virtual machine, since you depend on your size. This may take less time because the system just needs to provide and run only your virtual machine.

  • If your virtual machine is selected for path 2.2, in this case, the host machine will start first (if it is not running and which is very common *), and then your guest virtual machine should be prepared and started. And this path will take longer than path 2.1.

Note. In versions 2.1 and 2.2, you may have to share the experience of deploying the same application.

  • The same thing happens if you find N instances for your service, however this process will occur in parallel with 2.1 / 2.2, but the time will be approximately the same. In addition, FC also needs to find different error areas for each instance, so if one instance does not work, the rest are still active.

Thus, much more than just turning on Windows Server 2008 happens inside the system. Since several virtual machines are running on the same security on the same host, this is primary, so when a guest virtual machine is provided, many things are done to ensure that everything is in order.

About your commentary on the "small fleet of servers that are easily accessible at any time", this is a good comment, but when the data center serving the whole Small World is working there, this is a very "huge" number and just to save thousands machines without any guest is not logical. Also, you just deploy from time to time, this is not what you will do daily, so up to 10 minutes is still acceptable.

+12
source

If you reference existing virtual machines in Azure, you stop (release) and start once in a while, then yes - there is a way to make it very fast, but you pay for it. You must move your virtual machines to use premium storage.

The main difference is that premium memory is not only on much faster SSDs, but it is not archived when not in use, so you pay for it even when your virtual machine is offline. Look, a normal virtual virtual machine, when you start it, they copy it to VHD to another storage, where it runs from, when you finish, it is archived and you do not pay for this disk.

But with premium storage, your VHD will always be ready to run, so when you start your virtual machine, it is not copied anywhere. this makes it much faster. Disadvantage: you pay for VHD even when the VM is free.

So, it’s up to you if you want to pay it or not, but there is a way to do it.

(I’m not an azure specialist, but I asked several MVP colleagues about this and what they explained. I would like to hear if this is not accurate).

0
source

Source: https://habr.com/ru/post/1411923/


All Articles