dbi311. resource governor – feature overview architecture overview “what”, “why”,...

20
SQL Server 2014- Resource Governor to control I/O Tara Shankar Jana Senior Premier Field Engineer Microsoft Australia DBI311

Upload: raymond-knight

Post on 21-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

SQL Server 2014- Resource Governor to control I/O

Tara Shankar JanaSenior Premier Field EngineerMicrosoft Australia

DBI311

Agenda Resource Governor – Feature Overview Architecture Overview “What”, “Why”, “How” of IO governance What has Changed- XEvents, DMVs &

PerfMon Feature DEMO Real-Time workload- TPC DEMO Summary & Call to Action

Resource Governor was first introduced

CPU and Memory governance

Resource Governor- Feature Overview

Affinity

CPU_CAP_PERCENT

2012

SQL Server

2008

SQL Server

IO Governance

2014

SQL Server

3

Feature Goals• Minimize run-away queries• Improve predictability of query

execution

Attaining Balanced System

4

What is a balanced system?

A system where most expensive resource can be leveraged to its maximum without any other components in the system bottlenecking it

The five main components of a Balanced System

Concept:Juergen ThomasMicrosoft

Resource Governor Architecture

5

Requests

Pool 1 Pool 2 Pool 64…….

Classifier Function (UDF)

Group 1 Group 2 Group N

Group 3

Attributes

Default Pool

Internal Pool

Internal Group (DAC,

Background

Tasks)

Default Group

Why govern IOs?Importance of IO’sSuper-critical for SQL Server performanceIO: One of the three holy trinity

Isolation of resourcesIsolation of resources between workloads is very important for the following groups:• Hosters • Workload consolidation by IT

Categorization is critical for modern workloadsFlexible categorization of workloads needed for large scale deployments, performance predictability:• Rogue workloads• Throw away queries• Maintenance operations

What can be governed?

SSAS SSIS SSRS

YesRead I/OWrite I/O (some caveats)Physical ReadsData Files

NoInternal PoolLogical ReadsLog Files

Future Improvements?Network I/OBetter support for Hekaton (In-Memory)

How can we govern IOs- “Syntax”CREATE RESOURCE POOL pool_name[ WITH ( [ MIN_CPU_PERCENT = value ] [ [ , ] MAX_CPU_PERCENT = value ] [ [ , ] CAP_CPU_PERCENT = value ] [ [ , ] AFFINITY {SCHEDULER = AUTO | ( <scheduler_range_spec> ) | NUMANODE = ( <NUMA_node_range_spec> )} ] [ [ , ] MIN_MEMORY_PERCENT = value ] [ [ , ] MAX_MEMORY_PERCENT = value ] [ [ , ] MIN_IOPS_PER_VOLUME = value ] [ [ , ] MAX_IOPS_PER_VOLUME = value ] ) ][;]

How can we govern IOs- “Syntax”ALTER RESOURCE GOVERNOR { DISABLE | RECONFIGURE } | WITH ( CLASSIFIER_FUNCTION = { schema_name.function_name | NULL } ) | RESET STATISTICS | WITH ( MAX_OUTSTANDING_IO_PER_VOLUME = value) [ ; ]

What has changed- DMV changes

10

Newly added columns (sys.dm_resource_governor_resource_pools)min_iops_per_volume, Int, Nullable

The Min IOPS per Volume setting for this Pool. Null if Pool is not governed for IO, i.e. Min=0, Max=INF

max_iops_per_volume , Int, Nullable

The Max IOPS per Volume setting for this Pool. Null if unlimited.

read_ios_queued_total, Int, Nullable

The total read IOs enqueued since we reset the RG statistics.

read_ios_issued_total, Int, Nullable The total read IOs issued since we reset the RG statistics.

read_ios_completed_total, Int, NotNull

The total read IOs completed since we reset the RG statistics.

read_bytes_total, Bigint, NotNull The total bytes read since we reset the RG statistics.read_io_stall_total_ms, Bigint, Nullable

Total time between read IO issue and completion

read_io_stall_queued_ms, Bigint, Nullable

Total time between read IO arrival and completion.read_io_stall_queued_ms - read_io_stall_total_ms is the latency introduced because of IO resource governance.

What has changed- DMV changesNewly added DMV for IO Workload (sys.dm_resource_governor_resource_pool_volumes)pool_id, Int, NotNull ID of the resource pool

volume_name, String, NotNull Name of the disk volumeread_ios_queued_total, Int, Nullable

The total read IOs enqueued since we reset the RG statistics.

read_ios_issued_total, Int, Nullable The total read IOs issued since we reset the RG statistics.

read_ios_completed_total, Int, NotNull

The total read IOs completed since we reset the RG statistics.

read_bytes_total, Bigint, NotNull The total bytes read since we reset the RG statistics.read_io_stall_total_ms, Bigint, Nullable

Total time between read IO issue and completion

read_io_stall_queued_ms, Bigint, Nullable

Total time between read IO arrival and completion.read_io_stall_queued_ms - read_io_stall_total_ms is the latency introduced because of IO resource governance.

What has Changed- XEvents

12

XEvent Additions

Name Data

file_read_enqueued

mode file_handleoffsetdatabase_idfile_idfilegroup_idsizepath

Name Data

file_write_enqueued

mode file_handleoffsetdatabase_idfile_idfilegroup_idsizepathio_data

What has Changed- PerfMon

13

Disk Read IOs/sec Number of read operations from the disk in the last second

Disk Read Bytes/sec

Number of bytes read from the disk in the last second

Avg. Disk Read IO (ms)

Average time, in milliseconds, of a read operation from the disk

Disk Write IOs/sec Number of write operations to the disk in the last second

Disk Write Bytes/sec

Number of bytes written to the disk in the last second

Avg. Disk Write IO (ms)

Average time, in milliseconds, of a write operation to the disk

Demo

Feature Demo

Demo

Real time workload- TPC Demo

TricksMAX_OUTSTANDING_IO_PER_VOLUMEThere is no recommended value (max = 100). We suggest users to test the performance with different values (i.e. using SQLIO)

CLASSIFIER function• Should be in master• Triggered at connect

Tricks to efficiently utilize IO_PER_VOL

Related contentBreakout Sessions (DBI316- TSQL Code review: How MS can support customers requests for code review/improvement)

Find Me Later At “Hub Happy Hour” (5:30-6:30 PM)”

Hands-on Labs (DBI-H306 What's New in Microsoft SQL Server 2014 for DBAs)

Resources

TechNet & MSDN FlashSubscribe to our fortnightly newsletter

http://aka.ms/technetnz http://aka.ms/msdnnz

TechNet Virtual LabsFree Virtual Hands-on Labs

http://aka.ms/ch9nz

Microsoft Virtual AcademyFree Online Learning

http://aka.ms/mva http://aka.ms/technetlabs

Sessions on Demand

Complete your session evaluation now and win!

© 2014 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.