Currently when I create a deployment using Windows Azure Management Portal it takes about 9 (nine!) minutes to have the code in my role OnStart()
being run. I feel something is wrong there - nine minutes is ridiculously long.
I have a small startup task that I expect to finish in few seconds (and it finishes in few seconds when run under Compute Emulator), so looks like the Azure infrastructure is doing something big in there all that time.
Is there a way to speed the process up?
When you deploy an application to Windows Azure depend on your VM size and instance count this is what happens:
You provide VM Type (small, medium, large, ex-large) and instance count (ex. N)
Depend on VM type setting, if you have chosen small then Fabric Controller (FC) needs to find a slot where a single core VM can be started for you or if you chosen ex-large, then FC needs to find a host machine to host 8 cores guest VM. In this step, 2 possibilities could occur (there are more but for simplicity I am quoting 2 only):
2.1 FC could find a ready node (or rack) which already have 1 or more core free to host your VM 2.2 FC may not find any empty core(s) in all running Host nodes and for you a new nodes need to be restarted to host your guest VM
If your VM got selected for path 2.1, in that case the host VM is already ON and host machine just need to provision a guest VM for you depend on your size. This may take less time because the system just need to provision and start your VM only.
IF your VM got selected for path 2.2, in that case first the host machine will start (if it is not running and which is very common*) and then your guest VM needs to be provisioned and start. And this path will take longer then path 2.1.
Note: With 2.1 and 2.2, it is possible that you may have to separate experience when deploying the same application.
So inside the system there is a lot going on than simply turning a Windows Server 2008 machine on. Because multiple VM are running on one single host security is primary so when a guest VM is provisioned, lots of things are done to keep things work in order.
About your comment on "small fleet of servers readily available at all times", that is good comment but when there a data center serving to whole world "Small" is very "huge" number and just to keep thousands of machine running without any guest is not logical. Also you just deploy once in a while, this is not what you will do on daily basis so having under 10 minutes is still comprehensible.
Windows Azure generally takes 5-15 minutes to deploy. What it's doing is spinning up servers, VMs, booting Windows, etc. It's getting faster over time, but nine minutes is certainly not out of the ordinary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With