Question

I installed SQL Server in Azure Virtual Machine. Open port 1433, create rule in the firewall.

After that, I created Web-role and connect to SQL Server via Azure Connect.

All works. But performance is very bad: ping 500-900 ms between Virtual Machine and Web-role, simple stored procedures worked 5-7 seconds.

  • How increase performance?
  • Will performance increase if I will use virtual network?

SOLUTION

I created virtual netwotk and result is the BEST!

Was it helpful?

Solution

A virtual network should certainly improve performance because you will cut out the latency between the two cloud services (your VM and your Web Role). This will also be more secure.

OTHER TIPS

One simple test you can do is execute a query while in SQL Server Management Studio on the VM. Then execute the same query from the web server and measure the differences. This way you can see if it's an inefficient query plan or a latency problem.

Latency will always be a much bigger consideration in Azure as your hardware is spread out over a large data center. If you're application is very chatty with the database the latency problem starts to compound. It is therefore good practice to batch up queries, reducing the number of distinct calls to the DB and spool data in asynchronously if you can. This will speed up your application and deliver a smoother user experience.

Don't worry if network latency is causing the poor performance, there's much you can do. The following guide will give you a good overview on Azure Performance best practices to get you started:

http://www.windowsazure.com/en-us/develop/net/best-practices/performance/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top