Windows Azure Diagnostics enables you to collect diagnostic data from an application running in Windows Azure. This data can be used for debugging and troubleshooting, measuring performance, monitoring resource usage, traffic analysis and capacity planning, and auditing. In this blog post, I will share some optimizations that I have learned while working with Windows Azure Diagnostics during my time at Aditi Technologies.
- Keep separate storage accounts – Keep your Azure data storage in a different storage account than your application data. There is no additional cost to do this. If for some reason you need to work with Microsoft support and have them muck through your diagnostics storage locations you don’t have to allow them access to potentially sensitive application data.
- Locality of storage and application – Make sure and keep your storage account in the same affinity group (data center) as the application that is writing to it. If for some reason you can’t do so, use a longer transfer interval so data is transferred less frequently but more of it is moved at once.
- Transfer interval – For most applications I have found that a transfer once every 5 minutes is a very useful rate.
- Sample interval – For most applications setting the sample rate to once per 1-2 minutes provides a good yet frugal sampling of data. Remember that when your sampled data is move to Azure storage you pay for all you store. So you want to store enough information to help you get a true window into that performance counter, but not too much that you pay unnecessarily for data you won’t need.
- Trace logging level – While using the Verbose logging filter for tracing may give you lots of good information, it is also very chatty and your logs will grow quickly. Since you pay for what you use In Azure only use the Verbose trace level when you are actively working on a problem. Once it is solved scale back to Warning, Error, or Critical levels which are less common and smaller amounts of messages written to the logs.
Stay tuned for my next post where I will write about the six additional ways to optimize the use of Windows Azure Diagnostics.