Aadith Ramia
Aadith Ramia

Reputation: 10339

Azure web role with co-located cache giving slow response

I have a web role with co-located cache. there are two instances of this role.

Even when there is a cache-hit, the turn-around time for our request measures to a few seconds. Upon analysis we found that the time taken by cache to get back with data is 1 second on average. However, IIS logs suggest that the overall servicing of the request takes about 4 seconds. there is no intermediate operation before or after data retrieval from cache.

What could be wrong here? What would be a good way to analyse the problem?

Upvotes: 0

Views: 341

Answers (2)

Anurag Sharma
Anurag Sharma

Reputation: 1

You really should increase the log level for client and server refer In-Role Cache Troubleshooting and Diagnostics (Windows Azure Cache) and take a look at the performance counters. If read operations (GET) is taking long time then there can be paging in one of the instances or may be there is overload on the server. If you see any performance issue on the cache instances then you should take reassess the capacity using Capacity Planning Considerations for In-Role Cache (Windows Azure Cache) .

If this doesn't help then please open a support ticket.

Upvotes: 0

ryan1234
ryan1234

Reputation: 7275

For what it's worth we were having a similar problem with caching in Redis in Azure and a RESTful API.

The problem turned out to be the serialization of data.

Some ways to debug the problem:

  1. Download ANTS profile (it has a free trial) and profile your worker role locally.
  2. Enable profiling for your worker role, deploy it, run it for a bit, then download the profile file in Visual Studio. (You can use Server Explorer to find your instance and download the log).
  3. Download the Azure tool kit (http://blogs.msdn.com/b/kwill/archive/2013/08/26/azuretools-the-diagnostic-utility-used-by-the-windows-azure-developer-support-team.aspx) on your instance. It has things like Process Explorer that can tell you how much memory your role is taking, how much CPU, what it's doing on the network etc.
  4. You can contact Azure support and have them help you profile your application. We did that and got absolutely amazing support. They talked with us on the phone for hours and helped us profile our code.

Upvotes: 1

Related Questions