views:

497

answers:

5
+2  Q: 

azure performance

I've moved my app from a dedicated server to azure (and sql azure), and have noticed substantial performance degradation.

obviously not having the database and web server on the same piece of hardware is much of it, but I'm curious what other people have found in migrating to azure, and if there is anything any of you would suggest I do to improve it. Right now I'm considering moving back to my dedicated server...

So in summary, are there any rules of thumb for this, existing research (wasn't able to find much) or other pieces of advice on improving the performance of the app? has anyone else found the same to be true, and improved their site's performance in some way? it's built in C# on asp.net mvc 2.

Thanks!

+1  A: 

We've actually had a very similar experience. We moved our app (ASP.NET 3.5) from Azure back to the dedicated sever. In the Azure land we had two web roles and and used SQL Azure for data. The SSL connectivity required for SQL Azure was probably part of the problem too, but overall the performance was really awful! Not sure if it was because the hardware is slow hosting those WebRoles or if it was doing too many network hops to get to the DB or what but we were definitely very disappointed with it. The performance degradation was bad enough that we had to switch back. May consider re-doing part of the app using Azure Tables instead but for now we're off of Azure.

Robert
thanks Robert! my guess is it's the round trip to the database - if the hardware is as advertised, with only a single instance it should be better than my dedicated server. it seems like SQL azure is just not ready for prime time yet.
Dave K
+1  A: 

after reading the responses here, this thread: http://stackoverflow.com/questions/2642923/azure-tables-or-sql-azure

and this:

http://vermorel.com/journal/2009/9/17/table-storage-or-the-100x-cost-factor.html

I've concluded that sql azure isn't a good solution for a scalable, high performance web app. i'm going to move to table storage, which will be more scalable, and hopefully faster than sql azure was.

thanks everyone!

edit: adding a second web instance seems to have sped it up considerably despite the first instance not being fully loaded. not sure why. azure's uptime guarantee only applies to 2+ instances, and our 1 instance was occasionally dropping out, so we're going with multiple from here on out regardless.

Dave K
+1  A: 

This is a rather oversimplistic assertion: "I've concluded that sql azure isn't a good solution for a scalable, high performance web app" because there are examples of highly scalable and performant solutions built on SQL Azure that contradict that assertion. (Full disclosure: I work for Microsoft, but I'm not in the SQL Azure team).

Windows Azure (and SQL Azure) won't make your app automatically scalable if it wasn't before. All the good practices and recommendations for high performance and scalability are still valid and should be used.

It is very likely that hidden issues in your app will be surfaced when you move it to the Windows Azure platform. Most notably latency and bandwidth related issues.

For example, (quoting) obviously not having the database and web server on the same piece of hardware is much of it.

In general database + web servers should be separated for higher scalability (and availability).

Also, chatty interactions are generally not recommended anyway. You might have been able to get away with it before, but that doesn't mean it was a "good practice".

This guide (which is old) is still very relevant for Win. Azure.

Eugenio Pace
not really sure that this added anything to the discussion. seems you're coming to the defense of Microsoft, when what I'm suggesting is a different Microsoft product. are you asserting that SQL Azure is a better choice for scalability than azure Table storage? If you're not, then you're just reiterating or rephrasing what's already been said here.
Dave K
+1  A: 

This is an interesting thread, because I have an app running on Windows Azure, SQL Azure, and I'm quite pleased with the performance, though to be honest, I never ran the app on a dedicated server so I can't compare directly.

Like the original poster, my app is an MVC2 app, running on two Web roles going against SQL Azure. Since my app is a reporting/analytics app for a vertical market, almost every page request involves a trip to the database. I use Linq to SQL.

Some people are recommending writing against table storage, but in my opintion that's not a viable option for tradional SQL-based apps. The table storage apis don't do joins well or other SQL niceties like count, sum, etc. so for a heavy db-app, I'd recommend SQL Azure. I started building this app using Table Storage and quickly found it would be impractical. I'd like to use Table Storage in the future for longer term storage of non-volatile data, but currently I'm only using Blob Storage.

If you are using Linq to SQL, I'd recommend looking at your queries so that you make as few trips to the database as possible for queries accross tables, but as others have said, that's good advice anytime.

ChrisW
I'm still using SQL Azure. when I bumped it up to two instances it sped the application up drastically. This is weird from the perspective that my performance counters were showing that the first instance wasn't being fully utilized, but for whatever reason the second instance sorted everything out.
Dave K
+1 for the idea about using multiple instances. I had some wierd results where my single instance would just crash. I'm a data-query heavy app, but there was nothing in the logs that would indicate why, and like yours, the perf counters didn't indicate a very heavy load. But since I added the second instance, no crashes on either of them.
ChrisW
A: 

Interesting. I've been running tests using Enzo SQL Baseline and the azure results have been terrible.

I've got data from our QA environment in azure as well and I'm running the same stored procs against both. 25 threads running 500 requests. Azure is at least 5 times slower.

I was thinking that as I upped the number of threads the two speeds would converge, but that hasn't been the case.

I'll have to try another instance and see that that does.

schulz