230 likes | 248 Views
Dive deep into monitoring architecture, tools, and differences between physical, local VMs, and hosted environments. Learn about Azure tools and what can be monitored, including MASD, Azure VMs, and Blob Storage. Receive expert recommendations on monitoring strategies, tool sets, and performance metrics to optimize your Azure environment effectively.
E N D
Monitoring Microsoft Azure SQL Server VMs and SQL Database Grant Fritchey grant@scarydba.com
Goals • Understand the different parts of the architecture that can be monitored • Learn about the tools used for monitoring • Identify the differences between monitoring a physical box, a local VM and a hosted environment
Get in touch Grant Fritchey scarydba.com grant@scarydba.com @gfritchey
Monitoring as the Basis of Knowledge • Monitoring is the ultimate example of knowledge is power • Is the server online and available • Are there errors we need to know about • What does the performance look like • Immediate performance information • Historical performance information • Ability to compare to a known state
Architectural Differences • The hardware is effectively invisible • Within Azure, you get what Microsoft gives you • Most tools are already known to you • Automation is available • It’s on the cloud
What Can Be Monitored • Azure • Microsoft Azure SQL Database (MASD) • Azure SQL Server Virtual Machine • Blob Storage
Azure: What Can You Monitor? • Azure Service • Azure applications • Various Azure components • As a SQL Server DBA • Beyond availability, not much here
Azure: Tools • Windows Azure Service Dashboard • Azure Management Portal • Service level diagnostics data (Azure Applications, outside our scope) • Azure SDK • System Center Azure Monitoring Pack • 3rd Party
Azure Monitoring Demo
MASD: What Can You Monitor • Availability • Connectivity • Core query performance • Deadlocks • Errors • Throttling • But you can’t monitor • Extended query performance • Disk I/O • Detailed performance metrics • Most internals
MASD: Tools • Azure Management Portal • Windows Azure SQL Database Portal • Dynamic Management Objects (DMOs)
Azure VM: What Can You Monitor • It’s Windows • Availability • Internally, everything you expect to see • Externally, no access to underlying hardware • It’s SQL Server • Internally, everything you expect to see • Relationship to Windows, exactly what you expect • Externally, no access to underlying hardware • It’s a VM • Internal behaviors still related to standard templates • I/O can be observed • No other external access
Azure SQL Server VM: Tools • Standard tool set • Performance Monitor • Extended Events • Trace Events • Dynamic Management Objects • Performance Monitor Counters • Additional Tools • AzureTools • Event Viewer • Logs • Azure SDK • 3rd Party
VM Monitoring Demo
Blob Storage: What Can You Monitor • Ingress/Egress • Availability • Latency • Capacity • Others
Blob Storage: Tools • Azure Management Portal • Azure SDK
Storage Monitoring Demo
General Recommendations • Retry Logic • Plan for outage • Not because Azure is bad, but because it’s the internet • Build in logging and tracing • And make that configurable • Instrument your code • Treat T-SQL the same as ever • Although MASD data collection is limited • Focus on VM internals • Surrender control over the external system • Except for I/O • That you can monitor • To speed I/O, look to put static content on a nearby Content Delivery Network (CDN) • Take regular baselines
More Recommendations • Right-size the CPU • You pay for what you use, but dedicating CPU to you is the same thing as using them. • Enable Read/Write cache • On by default • High I/O switch to none • Latency sensitive and low I/O switch to read • Create an Availability Group for your VMs
Most Important Recommendations • Don’t trust anything I’ve told you about recommendations • Don’t trust anything Microsoft tells you about recommendations • Verify everything through testing
References • Monitoring Windows Azure SQL Database Using Dynamic Management Views • SQL on Azure VM • Troubleshooting in Windows Azure • How to Monitor a Storage Account • Windows Azure – Troubleshooting & Debugging • Azure SQL Server VM Disk Configuration • Collect Logging Data by Using Windows Azure Diagnostics • Take Control of Logging and Tracing in Windows Azure • Troubleshooting and Monitoring for SQL Server in Azure Virtual Machines • Windows Azure SQL Database Performance and Elasticity Guide • Performance Guidance for SQL Server in Windows Azure Virtual Machines
Goals • Understand the different parts of the architecture that can be monitored • Learn about the tools used for monitoring • Identify the differences between monitoring a physical box, a local VM and a hosted environment