SQLSaturday #251 – Paris 2013 SQL Trace vs Extended Events David Barbarin Database Architect

Slides:



Advertisements
Similar presentations
TempDB: Performance and Manageability
Advertisements

The creation of "Yaolan.com" A Site for Pre-natal and Parenting Education in Chinese by James Caldwell DAE Interactive Marketing a Web Connection Company.
© 2003 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Performance Measurements of a User-Space.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
SQL Server 2012 New Performance Tuning Tools. Who am I? Menzo Steinhorst Senior Premier Field Engineer SQLRAP, WS+ SQL Server Performance Tuning, WS+
SSIS Dataflow Performance Tuning 1 st October 2010 Jamie Thomson.
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
Rev SYBASE ASE: MDA TABLE ASSISTANT Sybase Administration Tools available at: mailto:
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
Module 12: Auditing SQL Server Environments
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
SQL Server Extended Events What, Why, How, Who?. Stuart Moore Started with SQL Server 7 in 1998, 15 years later still working with it, but newer versions.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
Loupe /loop/ noun a magnifying glass used by jewelers to reveal flaws in gems. a logging and error management tool used by.NET teams to reveal flaws in.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
SQL Server memory architecture and debugging memory Issues
© 2011 IBM Corporation 11 April 2011 IDS Architecture.
Performance Tuning SSIS. HR Departments are no fun. Don’t mention the stalking incident with Clay Aiken What happened in Vegas My prom date with a puppet.
Connect Learn Share Performance Optimization for Microsoft Dynamics CRM Presented by: Walter Grow Austin Jones.
MCTS Guide to Microsoft Windows 7
Workflow Manager and General Tuning Tips. Topics to discuss… Working with Workflows Working with Tasks General Tuning Tips.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
1 Designing a Data Exchange - Best Practices Data Exchange Scenarios –Sender vs. Receiver-initiated exchanges –Node Design Best Practices: –Handling Large.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Architecture Rajesh. Components of Database Engine.
Oracle Data Integrator Procedures, Advanced Workflows.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Agilent Technologies Copyright 1999 H7211A+221 v Capture Filters, Logging, and Subnets: Module Objectives Create capture filters that control whether.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com.
Agenda Review: XE Core Concepts Tracking what caused what What’s the holdup? A splitting headache So many locks (and not.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
CWG4 – The data model The group proposes a time frame - based data model to: – Formalize the access to data types produced by both detector FEE and data.
EOH: A Microsoft Partner INTRODUCTION TO EXTENDED EVENTS.
20 Copyright © 2008, Oracle. All rights reserved. Cache Management.
Monday, August 04, 2003Boeing - Joe Hoffert Instrumentation Overview Motivation/Vision Initial Implementation Current Functionality Usage Future Direction.
SQL SERVER AUDITING. Jean Joseph DBA/Consultant Contact Info: Blog:
REMINDER Check in on the COLLABORATE mobile app Best Practices for Oracle on VMware - Deep Dive Darryl Smith Chief Database Architect Distinguished Engineer.
© SCRIBE SOFTWARE CORPORATION 2008 Tips and Tricks for Working with Scribe Insight Trace Files.
Environment Manager Troubleshooting and Debugging.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Wednesday NI Vision Sessions
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
SQL Saturday #509 | Brisbane 2016 #509 | Brisbane 2016 Martin Catherall Moving from Profiler to Extended Events.
SQL Database Management
SQL Server Statistics and its relationship with Query Optimizer
Muen Policy & Toolchain
Extended Events
Hilary Cotter Extended Events.
SQL Server Data Collector From Every Angle
LOCO Extract – Transform - Load
Medlemsträff i Stockholm
Software Architecture in Practice
Auditing in SQL Server 2008 DBA-364-M
Troubleshooting Availability Group Failovers
Wellington, SQLSaturday#706
Moving from SQL Profiler to xEvents
SSDT and Database Project Basics
Transaction Log Internals and Performance David M Maxwell
LHC BLM Software audit June 2008.
Dell EMC SQL Server Solutions Doug Bernhardt
Advanced Database Topics
Presentation transcript:

SQLSaturday #251 – Paris 2013 SQL Trace vs Extended Events David Barbarin Database Architect

SQLSaturday #251 – Paris 2013 Summary  Extended events and architecture  Demo

SQLSaturday #251 – Paris 2013 Extended event engine

SQLSaturday #251 – Paris 2013 Pre versus Post processing  Post-processing : Collecting every event and then don't worry about reducing data set after you’ve collected the data  Pre-processing : Filtering events as part of the event generation code and therefore can “short-circuit” the event from firing. EXTENDED EVENTS

SQLSaturday #251 – Paris 2013 Extended event execution life cycle Pre-collect : Is enabled ? Pre-collect : Is enabled ? Collect Event data Collected Post-collect Predicate evalution Post-collect Predicate evalution Actions executed Synchronous target served Event data buffered for async targets Collect Publish

SQLSaturday #251 – Paris 2013 SQL traces vs Extended events SQL Traces  Deprecated since SQL Server 2012  All events share a fixed set of data columns that requiring some columns to be overloaded (different meaning for different event)  Events generate all of the data, even when the trace doesn’t require all of the data columns to be collected  Filtering is only applied after the event has fired completly when enable in the trace controller  Trace IO providers only allow for post- collection analysis of trace data SQL Traces  Deprecated since SQL Server 2012  All events share a fixed set of data columns that requiring some columns to be overloaded (different meaning for different event)  Events generate all of the data, even when the trace doesn’t require all of the data columns to be collected  Filtering is only applied after the event has fired completly when enable in the trace controller  Trace IO providers only allow for post- collection analysis of trace data Extended Events  Each event provides mimimum schema of data that is specific to the event being fired  Events are filtered early in the firing cycle, based on predicates  Events only collect the basic data and columns need for predicate evaluation  Any additionnal data required to complete event firing is collected after the predicate evaludation  Targets provide specialized aggregation of data for complex analysis or live analysis Extended Events  Each event provides mimimum schema of data that is specific to the event being fired  Events are filtered early in the firing cycle, based on predicates  Events only collect the basic data and columns need for predicate evaluation  Any additionnal data required to complete event firing is collected after the predicate evaludation  Targets provide specialized aggregation of data for complex analysis or live analysis

SQLSaturday #251 – Paris 2013 Extended events and components  Packages  Events  Actions  Target  Predicates  Maps  Types

SQLSaturday #251 – Paris 2013 Packages  Packages contain XE objects metada  Events  Actions  Predicates  Maps  Types  Targets  Messages

SQLSaturday #251 – Paris 2013 Packages  Number of packages is growing with the newer SQL Server versions  SQL 2008 (4 packages / )  SQL 2012 (9 packages / 627 events)  SQL 14 (13 packages / 763 events)  package0, sqlos, sqlserver, secAudit

SQLSaturday #251 – Paris 2013 Events  An event corresponds to a well-know point in the code ( CheckPoint, Page split, FileGrowth … )  Delivers a basic payload of information defined by a schema  Events may contain customizable (optional) data elements collected when specified  Events are defined using the ETW model (channel, keyword) to allow integration with ETW

SQLSaturday #251 – Paris 2013 Actions  Additionnal state of data to an event  Actions are executed after predicates evaluation  Execute synchronously on the thread that fires the event  Some actions can have a side effect  Use TRACK_CAUSALITY rather than perform post-collection event correlation

SQLSaturday #251 – Paris 2013 Predicates  Boolean expressions that define the conditions required for an event to fire  Predicates support short-circuit evaluation  Using of basic or textual operators (eg. >, =, < or compare_i_unint64, like_i_sql_unicode_string)  Operate to an event column or to a global field

SQLSaturday #251 – Paris 2013 Maps  Tables that provide a lookup between code values and human readable values  Maps are used as types by the SQL Server engine

SQLSaturday #251 – Paris 2013 Types  Define data type for an event, a predicate, a target or an action

SQLSaturday #251 – Paris 2013 Targets  Consumers of events  Can be synchronous or asynchronous  Targets are memory based or file based consumers  Basic targets : ring buffer, target, event file  Specialize targets : histogram, pair matching, event counter, ETW, live data viewer

SQLSaturday #251 – Paris 2013 Session options  MAX_MEMORY  MEMORY_PARTITION_MODE  EVENT_RETENTION_MODE  MAX_DISPATCH_LATENCY  MAX_EVENT_SIZE  TRACK_CAUSALITY  STARTUP_STATE

SQLSaturday #251 – Paris 2013 Session option : MAX_MEMORY  Configures the relative maximum size of the event session buffer  Correlates directly to the MEMORY_PARTITION_MODE option  Control the size of the file writes to a file target for heavily event sessions  Default is 4 MB

SQLSaturday #251 – Paris 2013 Session option : MEMORY_PARTITION_MODE  Determines the final number of buffers for an event session  NODE (default) = 3 buffers  PER_NODE = 3 buffers for each NUMA node  PER_CPU = 2.5 buffers for each scheduler

SQLSaturday #251 – Paris 2013 Session option : EVENT_RETENTION_MODE  Determines whether single event, entire buffer or no events can be lost by XE session  NO_EVENT_LOSS can impact performance under heavy event generation  NO_EVENT_LOSS can limit the number of events (eg. page_read )

SQLSaturday #251 – Paris 2013 Session option : MAX_DISPATCH_LATENCY  Configures the maximum time an event will remain in a memory buffer before being dispatch to asynchronous target  Default is 30 secondes

SQLSaturday #251 – Paris 2013 Session option : MAX_EVENT_SIZE  Etablishes the size of large buffers associated with an event for collection of events larger than the buffer standard size  MAX_EVENT_SIZE >= MAX_MEMORY  Necessary for event sessions that capture large events (collecting IOData, sql_text …)

SQLSaturday #251 – Paris 2013 Session option : TRACK_CAUSALITY  Powerfull option for events correlation  Adds the attach_activity_id and attach_activity_id_xfe r actions to every event for event to correlate events and the order they fired  Attach_activity_id_xfer is attached to events that transfer activities for end-to-end tracking of events for correlation  Default is OFF

SQLSaturday #251 – Paris 2013 Session option : STARTUP_STATE  Configures the event session to start automatically when SQL Server starts  Default is OFF

SQLSaturday #251 – Paris 2013 DMVs  sys.server_event_sessions  sys.server_event_session_events  sys.server_event_session_actions  sys.server_event_session_fields  sys.server_event_session_targets

SQLSaturday #251 – Paris 2013 DMVs  sys.dm_xe_sessions  sys.dm_xe_session_targets  sys.dm_xe_session_events  sys.dm_xe_session_event_actions  sys.dm_xe_session_object_columns

SQLSaturday #251 – Paris 2013 DMVs / DMF  sys.dm_xe_packages  sys.dm_xe_objects  sys.dm_xe_object_columns  sys.dm_xe_map_values  sys.dm_os_dispatcher_pools  sys.fn_xe_file_target_read_file()

SQLSaturday #251 – Paris 2013

Nos sponsors

SQLSaturday #251 – Paris 2013 LINKS  Les événements étendus avec SQL Server 2008 (Nicolas Souquet) Les événements étendus avec SQL Server 2008  Nouveaux événements étendus avec SQL Server 2012 (David Baffaleuf) Nouveaux événements étendus avec SQL Server 2012  An Xevent a day (Jonathan Kehayias) An Xevent a day