Using Correlated Tracing to Diagnose Query Level Performance What’s slowing down my app? Jerome Halmans Senior Software Development Engineer Microsoft.

Slides:



Advertisements
Similar presentations
DBI402. SQL Server Specialist, Financial Industry Boston, MA Conference and INETA Speaker Connections, PASS, TechEd, DevTeach, etc. Author SQL Server.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Network+ Guide to Networks, Fourth Edition
Module 20 Troubleshooting Common SQL Server 2008 R2 Administrative Issues.
Process Description and Control Module 1.0. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
1 Audit-Enhanced Authentication in Kerberos Shuo Chen, Daniel R. Simon (mentor) (Shuo’s Internship Project in Microsoft Research) 9/15/2003 CRHC UIUC.
(Remote Access Security) AAA. 2 Authentication User named "flannery" dials into an access server that is configured with CHAP. The access server will.
Client State Management & Application Security  Client State Management  Concept  ASP Examples  Application Security  Database Based Approach 
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
Network+ Guide to Networks, Fourth Edition Chapter 1 An Introduction to Networking.
Process Description and Control A process is sometimes called a task, it is a program in execution.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Module 1: Database and Instance. Overview Defining a Database and an Instance Introduce Microsoft’s and Oracle’s Implementations of a Database and an.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
CH 13 Server and Network Monitoring. Hands-On Microsoft Windows Server Objectives Understand the importance of server monitoring Monitor server.
Windows Server 2008 Chapter 11 Last Update
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Task Scheduler Pro Managing scheduled tasks across the enterprise Joe Vachon Sales Engineer.
Network and Active Directory Performance Monitoring and Troubleshooting NETW4008 Lecture 8.
Ch 11 Managing System Reliability and Availability 1.
Network+ Guide to Networks, Fourth Edition Chapter 1 An Introduction to Networking.
思科网络技术学院理事会. 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
SOS EGEE ‘06 GGF Security Auditing Service: Draft Architecture Brian Tierney Dan Gunter Lawrence Berkeley National Laboratory Marty Humphrey University.
Module 7: Fundamentals of Administering Windows Server 2008.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
1 Maryland ColdFusion User Group Session Management December 2001 Michael Schuler
Optimizer Deployment Centralized Database module on Optimizer hub server Each monitored server has an instance of optimizer installed.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Chapter 10 System Monitoring Issues Performance Benchmarks NT Server Services Users and Server Access Information Task Manager for Applications Ram and.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlConnection Object ADO.NET - Lesson 02  Training time: 10 minutes 
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Troubleshooting 11i issues Adam Janbolat
FitnessGram® 2015 Student Information System (SIS) Extract Import Training for Georgia School Year.
Distributed File Systems 11.2Process SaiRaj Bharath Yalamanchili.
Presented by Vishy Grandhi.  Lesson 1: AX Overview  Lesson 2: Role based security  Lesson 3: Monitoring  Troubleshooting.
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
1 Chapter Overview Monitoring Access to Shared Folders Creating and Sharing Local and Remote Folders Monitoring Network Users Using Offline Folders and.
SQL Server 2012 Session: 1 Session: 4 SQL Azure Data Management Using Microsoft SQL Server.
Em Spatiotemporal Database Laboratory Pusan National University File Processing : Database Management System Architecture 2004, Spring Pusan National University.
Diagnosing Performance with Wait Statistics Robert L Davis Principal Database
C:\Users\> t An affair with SQL Server for nearly a decade Was part of SQL Escalation Services and Premier Field Engineering team.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
+ CIW LESSON 4 Web Browsers. + Basic Functions of Web Browsers Provide a way for users to access and navigate Web pages Display Web pages properly Provide.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Redmond Protocols Plugfest 2016 Andrew Davidoff Mail, Calendar, and Contacts Graph API Demonstration Senior Software Engineer.
SQL Database Management
Understand Names Resolution
An introduction to Wait Statistics
Munix Fitness Centers Customer Profiling, Attendance Management, SMS Alerts, Workout Schedule, Diet Management, and much more …. Internet Gateway & Business.
Chapter 2: System Structures
SQL Server Monitoring Overview
Process Description and Control
THE STEPS TO MANAGE THE GRID
Senior Software Engineering Student Robertas Sys
File Transfer and access
#01 Client/Server Computing
Troubleshooting SQL Server Connection Issues
Microsoft Build /20/2018 5:17 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
A tool for locating QoS failures on an Internet path
Network+ Guide to Networks, Fourth Edition
Chapter 2: The Linux System Part 5
Kerberos Part of project Athena (MIT).
Jean Joseph DBA\DEVELOPER
FitnessGram® 2015 Student Information System (SIS) Extract Import Training for Georgia School Year.
Using wait stats to determine why my server is slow
#01 Client/Server Computing
SharePoint 2013 Best Practices
Presentation transcript:

Using Correlated Tracing to Diagnose Query Level Performance What’s slowing down my app? Jerome Halmans Senior Software Development Engineer Microsoft

Opcode: Begin Exploring the problem space Connection and Batch identifiers Use connection identifiers to find performance problems during login Locate server activity corresponding to client activity Use wait information to find concurrency issues

Problem Space –Performance problems are typically reported by app users –App performance problems involve at least 2 tiers Client Server –The problem is finding the queries most important to a particular piece of app functionality and then finding why it is slow –No direct methods to tie app functionality to queries on the server

(A few) Sources of Performance Problems Client App code Drivers Network SQL Server Query Plan Blocking CPU Memory Disk Network

Help in finding where to start Client App code Drivers Network SQL Server Query Plan Blocking CPU Memory Disk Network Trace Connection Id Activity Id Diagnostics

Connection Id and Activity Id Explained –Connection Id A single Guid Created by the client Assigned at connection open time Sent to the server at pre-login Bound to the lifetime of the physical connection –Activity Id Tuple of guid, sequence number Maintained per thread Sent at pre-login and with each batch or rpc request Used to track cross thread transfers and maintain ordering –Both are new provisions to the TDS protocol and require new drivers/providers

Login Process Open Socket/Pipe Basic connection Connid Assigned New physical connection gets a unique id Prelogin Connection id and activity id sent Send Login Packet Authentication information sent Server Login Process Server assigns thread to process login, authenticates credentials and enters requested database

Using ConnectionId to troubleshoot connection failures Open Socket/Pipe No entry in client trace Connid Assigned Cannot fail Prelogin Connection id and activity id present in client trace, present in server extended events trace Send Login Packet Client trace contains entries pertaining to login Server Login Process Server extended events log will report numerous events with matching client_connection_id

Demo: Using Client Diagnostics and server traces to resolve login failure

Activity Id Usage for Causality Tracking Process 1 Event A: 1.1 P: NULL Process 2 Event A: 2.1 P: 1.2 Event A: 1.2 P: NULL Event A: 2.2 P: NULL Event A: 1.3 P: NULL Event A: 1.4 P: NULL Event A: 1.5 P: NULL Event A: 1.6 P: NULL Event A: 2.3 P: NULL Event A: 2.4 P: NULL Event A: 2.5 P: NULL Process 1 requests work on new thread.

Demo: Using Client and server traces to resolve application performance problem

Analyzing waits within a query –At a high level a query can be in 2 states Working Waiting –Working means the query is actively producing data –Waiting means the query has stopped to wait for a resource (Disk, Memory, Locks, Latches, Scheduler) –Wait time generally accounts for the majority of execution time

Demo: Diving into waits

Opcode: end Explored Problem Space of client/server performance issues Explained Connection and Batch identifiers Used connection identifiers to find performance problems during login Located server activity corresponding to client activity Used wait information to find concurrency issues

Resources Setting up Data Access Trace us/library/cc765421(SQL.100).aspxhttp://msdn.microsoft.com/en- us/library/cc765421(SQL.100).aspx Microsoft SQL Server Code Named “Denali” Data Access Trace us/library/hh213095(SQL.110).aspxhttp://msdn.microsoft.com/en- us/library/hh213095(SQL.110).aspx

THANK YOU! For attending this session and PASS SQLRally Nordic 2011, Stockholm