Troubleshooting Techniques(*)

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

Troubleshooting Dennis Shasha and Philippe Bonnet, 2013.
AOBD 07/08H. Galhardas DBMS Performance Monitoring.
1 Overview of Storage and Indexing Chapter 8 (part 1)
Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
1 Overview of Storage and Indexing Yanlei Diao UMass Amherst Feb 13, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
CSCI 5708: Query Processing I Pusheng Zhang University of Minnesota Feb 3, 2004.
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
Computer Organization and Architecture
CSCI 5708: Query Processing I Pusheng Zhang University of Minnesota Feb 3, 2004.
1 External Sorting for Query Processing Yanlei Diao UMass Amherst Feb 27, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
1 Lecture 7: Data structures for databases I Jose M. Peña
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Key Perf considerations & bottlenecks Windows Azure VM characteristics Monitoring TroubleshootingBest practices.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
1 Physical Data Organization and Indexing Lecture 14.
Review of Memory Management, Virtual Memory CS448.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
©Silberschatz, Korth and Sudarshan13.1Database System Concepts Chapter 13: Query Processing Overview Measures of Query Cost Selection Operation Sorting.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
© Dennis Shasha, Alberto Lerner, Philippe Bonnet 2004 DBMS Performance Monitoring.
DBI313. MetricOLTPDWLog Read/Write mixMostly reads, smaller # of rows at a time Scan intensive, large portions of data at a time, bulk loading Mostly.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
CPSC 404, Laks V.S. Lakshmanan1 External Sorting Chapter 13: Ramakrishnan & Gherke and Chapter 2.3: Garcia-Molina et al.
© Dennis Shasha, Alberto Lerner, Philippe Bonnet 2004 DBMS Performance Monitoring.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
CS 540 Database Management Systems
File Processing : Query Processing 2008, Spring Pusan National University Ki-Joune Li.
Chapter 13: Query Processing
Troubleshooting Dennis Shasha and Philippe Bonnet, 2013.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Oracle Database Architectural Components
© Dennis Shasha, Alberto Lerner, Philippe Bonnet 2004 DBMS Performance Monitoring.
Virtual Memory.
CS222: Principles of Data Management Lecture #4 Catalogs, Buffer Manager, File Organizations Instructor: Chen Li.
CS 540 Database Management Systems
Table General Guidelines for Better System Performance
Chapter 2 Memory and process management
Chapter 11: File System Implementation
Database Management System
Lecture 16: Data Storage Wednesday, November 6, 2006.
FileSystems.
Database Management Systems (CS 564)
Database Management Systems (CS 564)
Operating Systems (CS 340 D)
Chapter 12: Query Processing
Database Performance Tuning and Query Optimization
Virtual Memory Chapter 8.
Lecture 11: DMBS Internals
Lecture 10: Buffer Manager and File Organization
Database Applications (15-415) DBMS Internals- Part III Lecture 15, March 11, 2018 Mohammad Hammoud.
External Sorting The slides for this text are organized into chapters. This lecture covers Chapter 11. Chapter 1: Introduction to Database Systems Chapter.
Computer Architecture
Selected Topics: External Sorting, Join Algorithms, …
Table General Guidelines for Better System Performance
CS222/CS122C: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
File Storage and Indexing
Chapter 12 Query Processing (1)
Chapter 11 Database Performance Tuning and Query Optimization
CS222p: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
External Sorting.
Lecture 3: Main Memory.
Database Systems (資料庫系統)
Operating Systems: Internals and Design Principles, 6/E
Using wait stats to determine why my server is slow
Presentation transcript:

Troubleshooting Techniques(*) Extraction and Analysis of Performance Indicators Consumer-producer chain framework Tools Query plan monitors Performance monitors Event monitors (*) From Alberto Lerner’s chapter 9 - Troubleshooting

Event Monitors to Identify Critical Queries If no user complains... Capture usage measurements at specific events (eg, end of each query) and then sort by usage Less overhead than other type of tools because indicators are usually by-product of events monitored Typical measures include CPU used, IO used, locks obtained etc. 9 - Troubleshooting

Non-clustering indexes can be trouble For a low selectivity predicate, each access to the index generates a random access to the table – possibly duplicate! It ends up that the number of pages read from the table is greater than its size, i.e., a table scan is way better Table Scan Index Scan CPU time data logical reads data physical reads index logical reads index physical reads 5 sec 143,075 pages 6,777 pages 136,319 pages 7 pages 76 sec 272,618 pages 131,425 pages 273,173 pages 552 pages 9 - Troubleshooting

An example Performance Monitor (query level) Statement number: 1 select C_NAME, N_NAME from DBA.CUSTOMER join DBA.NATION on C_NATIONKEY = N_NATIONKEY where C_ACCTBAL > 0 Number of rows retrieved is: 136308 Number of rows sent to output is: 0 Elapsed Time is: 76.349 seconds … Buffer pool data logical reads = 272618 Buffer pool data physical reads = 131425 Buffer pool data writes = 0 Buffer pool index logical reads = 273173 Buffer pool index physical reads = 552 Buffer pool index writes = 0 Total buffer pool read time (ms) = 71352 Total buffer pool write time (ms) = 0 Summary of Results ================== Elapsed Agent CPU Rows Rows Statement # Time (s) Time (s) Fetched Printed 1 76.349 6.670 136308 0 Buffer and CPU consumption for a query according to DB2’s Benchmark tool Similar tools: MSSQL’s SET STATISTICS switch and Oracle’s SQL Analyze Tool

Investigating Primary Resources Answer question 3: “Are there enough primary resources available for a DBMS to consume?” Primary resources are: CPU, disk & controllers, memory, and network Analyze specific OS-level indicators to discover bottlenecks. A system-level Performance Monitor is the right tool here 9 - Troubleshooting

Disk Performance Indicators at the OS Level Should be close to zero Average Queue Size New requests Wait queue Disk Transfers /second Wait times should also be close to zero Idle disk with pending requests? Check controller contention. Also, transfers should be balanced among disks/controllers

Memory Consumption Indicators at the OS Level Page faults/time should be close to zero. If paging happens, at least not DB cache pages. virtual memory real memory % of pagefile in use (it’s used a fixed file/partition) will tell you how much memory is “lacking.” pagefile 9 - Troubleshooting

Disk Manager Performance Indicators Row displacement: should be kept under 5% of rows rows Free space fragmentation: pages with few space should not be in the free list page Storage Hierarchy (simplified) extent Data fragmentation: ideally files that store DB objects (table, index) should be in one or few (<5) contiguous extents file File position: should balance workload evenly among all disks disk 9 - Troubleshooting