Dev VM hosted in Azure - How to optimize its performance

I blogged about my first try to host my development environment here and here

 

But at the event "On Cloud Nine - the developer roadshow" (find my wrap up here) of Microsoft Austria I got some tips on how to improve the performance of the VM in the cloud. 

 

1) Affinity Groups & Regions

By default, this should be configured correctly anyway, but its good to know: Windows Azure Data Centers consist of Containers that have racks inside. On this hardware you find the typical services running (compute, storage, access control etc). The Affinity Group now tells Windows Azure to put objects next to each other (e.g. compute and storage) so latency is minimised and also you don't pay for any traffic (traffic inside a data center is free). This means: make sure, your VM and your hard disc share the same Affinity Group. 

Of course, the region should be the same as well ...

 

2) Availability Sets

When talking about hosting a VM, Availability Sets are a bit tricky: if you have configured them, they enable the 99.995% SLA. Good. but this requires that the VM is kept redundant and is basically running twice (so you get a fast fail-over in case of a problem). But you also get charged twice

 

3) I/O Performance

Since Azure has some limits on the Max IOPS that are also bound to the size of the VM, make sure you have different disks to work with. I have my sources and the compilation on separate disk.

 

4) Optimise Performance of the VM

Windows Azure VMs can not host Client operating systems (only a Server OS). But you can install the Desktop Experience to get the Windows 8 experience on your Windows Server 2012 R2 machine (and do this as early as possible).

Chose "Advanced System Settings" on the screen System window in the Control Panel

Chose "Advanced System Settings" on the screen System window in the Control Panel

There is a couple of settings you can optimise:

Visual Effects

Configure this to your liking, the less effects, the less settings enabled, the less performance and RDP data transfer you will get.

Disable all Visual Effects for best performance of your VM

Disable all Visual Effects for best performance of your VM

Some Visual Effects interfere with the settings you can specify in your RDP connection. E.g. "Show window contents while dragging":

server config: show
rdp-config: do not show
effecteive: not shown

 

server config: do not show
rdp-config: show
effective: not shown

 

 

Processor Scheduling

Change the setting to "Allow best performance for Programs" since we work interactively with the VM most of the time.

Make sure, you have selected "Programs" as Processor scheduling settings

Make sure, you have selected "Programs" as Processor scheduling settings

 

If I change these settings on my local Windows PC it requires me to restart. The Windows Azure hosted VM does not require this - but just to be sure, I suggest to restart (to honour the old days ;)

 

4) Optimise Performance on RDP connection

Many of the advanced settings you can chose in RDP (Text Cursor blinking etc) don't have any effect if you have overwritten them in the Advanced Settings I showed unter topic 3)

Nevertheless check, if you have set the right  

Reduce the Color Depth to 15 bit (using Royal TS)

Reduce the Color Depth to 15 bit (using Royal TS)

Some WLANs restrict your ports - so I configured my VM to listen to port 80

Some WLANs restrict your ports - so I configured my VM to listen to port 80

 

Is it fast now?

I still don't get the performance I have on my local dev machine - what i hate most is the slight lag between my input (e.g. when typing in an editor) and other UI related changes/actions. Compiling or CPU intensive work is not an issue - thats fast enough.

 

But this might have something to do with the desktop resolution for a 30" monitor that I use ;)

 

Posted on December 16, 2013 and filed under development, productivity, Royal TS, Windows Azure.