2

I setup Windows Azure Caching because I wanted a high performance way to share real time data between multiple web roles. I've read that with the old shared caching anything over 10ms for access times typically indicates a problem and the new Windows Azure Caching Preview is supposed to be much faster. However, it is taking over a second just to read and write a single value from the cache. I thought it might be my setup so I ran the azure latency test project and I am getting these times which are not as bad but still very slow:

1000 Add Operations
    Average cache latency/key: 104.318ms
1000 Get Operations
    Average cache latency/key: 96.881ms
1000 Put Operations
    Average cache latency/key: 105.48ms
BulkGet of 1000 Keys from Local Cache
    Average cache latency/key: 4.641ms
1000 Remove Operations
    Average cache latency/key: 254.14ms

Here is the link to the code rather than trying to post all of it which is quite large: http://code.msdn.microsoft.com/windowsazure/Windows-Azure-Cache-c3e80a1f

Here is my web.config settings:

  <dataCacheClients>
    <dataCacheClient name="default">

      <autoDiscover isEnabled="true" identifier="X" />

      <localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />


      <securityProperties mode="Message" sslEnabled="false">
        <messageSecurity authorizationInfo="X" />
      </securityProperties>
    </dataCacheClient>
  </dataCacheClients>

Am I missing something or these are the kind of dismal times I can expect?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
KingOfHypocrites
  • 9,316
  • 9
  • 47
  • 69
  • No, you shouldn't expect times like that. Is your cache and site in the same data centre/region? – knightpfhor Dec 01 '13 at 17:28
  • Yes, although I'm running the performance app locally so not sure how close I can expect the performance to be vs. running on the server. The performance app is using the emulator although I've run tests without it which yielded even slower results. – KingOfHypocrites Dec 01 '13 at 21:35
  • Have you run the tests on Azure yet as @knightpfhor suggests? I have seen similar unexpected slowness with Azure Caching Services, though still investigating. – Timm Feb 26 '14 at 14:08
  • Runs 100 times faster on the server itself. – KingOfHypocrites Feb 26 '14 at 20:02

1 Answers1

7

If I've read the sample correctly it is expected that you'll deploy this to Azure before running the tests.

The cache service is not designed to be used outside of the data centre that it's deployed in because then its performance will be constrained by the relatively high latency network connections. That average time of 100ms is likely the network latency between you and the cache service.

knightpfhor
  • 9,299
  • 3
  • 29
  • 42