Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability



Similar documents
SQL Server Transaction Log from A to Z

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

Outline. Failure Types

Accelerate SQL Server 2014 AlwaysOn Availability Groups with Seagate. Nytro Flash Accelerator Cards

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

Solving Performance Problems In SQL Server by Michal Tinthofer

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Accelerating Server Storage Performance on Lenovo ThinkServer

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

Using Synology SSD Technology to Enhance System Performance Synology Inc.

Best Practices for Optimizing SQL Server Database Performance with the LSI WarpDrive Acceleration Card

Designing a Data Solution with Microsoft SQL Server 2014

Microsoft SQL Server OLTP Best Practice

SQL Server on Azure An e2e Overview. Nosheen Syed Principal Group Program Manager Microsoft

Critical SQL Server Databases:

SQL Server AlwaysOn (HADRON)

SharePoint 2010 Performance and Capacity Planning Best Practices

Configuring Apache Derby for Performance and Durability Olav Sandstå

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

Transaction Log Internals and Troubleshooting. Andrey Zavadskiy

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Eloquence Training What s new in Eloquence B.08.00

Using Synology SSD Technology to Enhance System Performance Synology Inc.

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

High Availability Solutions for the MariaDB and MySQL Database

On- Prem MongoDB- as- a- Service Powered by the CumuLogic DBaaS Platform

SQL Server Virtualization

Virtualizing Microsoft SQL Server on Dell XC Series Web-scale Converged Appliances Powered by Nutanix Software. Dell XC Series Tech Note

CONSOLIDATING MICROSOFT SQL SERVER OLTP WORKLOADS ON THE EMC XtremIO ALL FLASH ARRAY

Microsoft SQL Server Security and Auditing Clay Risenhoover ISACA North Texas April 14,

A Study of Application Performance with Non-Volatile Main Memory

Deep Dive: Maximizing EC2 & EBS Performance

Using Synology SSD Technology to Enhance System Performance. Based on DSM 5.2

Lab Evaluation of NetApp Hybrid Array with Flash Pool Technology

Accelerating Enterprise Applications and Reducing TCO with SanDisk ZetaScale Software

SQL Server 2014 Optimization with Intel SSDs

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

EZManage V4.0 Release Notes. Document revision 1.08 ( )

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

MS 20465C: Designing a Data Solution with Microsoft SQL Server

<Insert Picture Here> Oracle NoSQL Database A Distributed Key-Value Store

The Data Placement Challenge

SQL diagnostic manager Management Pack for Microsoft System Center. Overview

Microsoft SQL Server Always On Technologies

SQL Server 2014 In-Memory Tables (Extreme Transaction Processing)

SQL Server What s New? Christopher Speer. Technology Solution Specialist (SQL Server, BizTalk Server, Power BI, Azure) v-cspeer@microsoft.

Recovery Principles in MySQL Cluster 5.1

vrops Microsoft SQL Server MANAGEMENT PACK User Guide

Mission-Critical Availability

MIRRORING: START TO FINISH. Ryan Adams Blog - Twitter

Appendix A Core Concepts in SQL Server High Availability and Replication

Remote Copy Technology of ETERNUS6000 and ETERNUS3000 Disk Arrays

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Condusiv s V-locity Server Boosts Performance of SQL Server 2012 by 55%

Deploying Affordable, High Performance Hybrid Flash Storage for Clustered SQL Server

CS3210: Crash consistency. Taesoo Kim

Extending Your Availability Group for Disaster Recovery

Dell High Availability and Disaster Recovery Solutions Using Microsoft SQL Server 2012 AlwaysOn Availability Groups

IS IN-MEMORY COMPUTING MAKING THE MOVE TO PRIME TIME?

Optimizing SQL Server Storage Performance with the PowerEdge R720

Mind Q Systems Private Limited

In Memory Accelerator for MongoDB

ACCELERATING SQL SERVER WITH XTREMIO

SQL Server 2012/2014 AlwaysOn Availability Group

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

Samsung Magician v.4.5 Introduction and Installation Guide

GoGrid Implement.com Configuring a SQL Server 2012 AlwaysOn Cluster

Azure VM Performance Considerations Running SQL Server

Flash for Databases. September 22, 2015 Peter Zaitsev Percona

Everything a DBA Needs to Know About Storage

With each new release of SQL Server, Microsoft continues to improve

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

NIMSOFT SLM DATABASE

Database Hardware Selection Guidelines

Performance Tuning and Optimizing SQL Databases 2016

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

COS 318: Operating Systems

HP ProLiant BL660c Gen9 and Microsoft SQL Server 2014 technical brief

Distributed File Systems

MySQL Replication. openark.org

Optimizing SQL Server AlwaysOn Implementations with OCZ s ZD-XL SQL Accelerator

<Insert Picture Here> RMAN Configuration and Performance Tuning Best Practices

Exploring In-Memory OLTP

Squeezing The Most Performance from your VMware-based SQL Server

The 5-minute SQL Server Health Check

Atlantis USX Hyper- Converged Solution for Microsoft SQL 2014

High Frequency Trading and NoSQL. Peter Lawrey CEO, Principal Consultant Higher Frequency Trading

SQL 2016 and SQL Azure

Distribution One Server Requirements

Agenda. Transaction Manager Concepts ACID. DO-UNDO-REDO Protocol DB101

Parallels Cloud Server 6.0

Lessons Learned while Pushing the Limits of SecureFile LOBs. by Jacco H. Landlust. zondag 3 maart 13

In-memory databases and innovations in Business Intelligence

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

SQL Server Version. Supported for SC2012 RTM*** Not supported for SC2012 SP1*** SQL Server 2008 SP1, SP2, SP3

Scaling Analysis Services in the Cloud

Safe Harbor Statement

Data Management in the Cloud

Transcription:

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability Manohar Punna President - SQLServerGeeks #509 Brisbane 2016

Agenda SQL Server Memory Buffer Pool Extensions Delayed Durability Analysis - DD with SSDs Dependencies Summary

SQL Server - Reserve Memory VAS Reservation aka MTL Memory To Leave 32 bit MTL = (MaxWorkerThreads * StackSize) + DefaultReservationSize MaxWorkerThreads = ((#Schedulers 4) * 8) + BaseThreadCount StackSize = 512 KB, DefaultReservationSize = 256 MB BaseThreadCount = 256 64 bit MaxWorkerThreads = ((#Schedulers 4) * 16) + BaseThreadCount StackSize = 2048 KB, BaseReservationSize = 256 MB BaseThreadCount = 512 64 bit version has enough VAS No Reservation. Windows Server 2012 R2, Windows 8.1 supports 256 TB of VAS. Let me show

SQL Server Memory Starts with minimum required memory. Grows beyond Min Server Memory Does not release this space Grows up to Max Server Memory Can be trimmed when OS under memory pressure Memory allocations outside Max Server Memory Thread stack, Extended Procedures etc. From SQL 2012 all pages (Large and multi) are done in Buffer Pool. Move to 64 bit NOW AWE is deprecated MTL is not needed

SQL Server More complicated SQL Server 2014 and beyond In-Memory OLTP Buffer Pool Extension Delayed Durability

SQL Server Buffer Pool SQL Server is memory intensive application Works on data Hot dirty pages - small random IOs to disk Physical I/O has limitations Memory has limitations Everyone doesn t have a fortune

BPE Buffer Pool Extension Expand the Buffer Pool cache to nonvolatile storage (usually SSDs) Larger database working set Force paging of IO between RAM and SSDs Offload small random IOs from mechanical disk to SSDs. Significantly improves IO performance. Increased Random IO throughput Reduced IO latency Increased Transaction throughput

BPE Buffer Pool Extension Ref: MSDN

BPE Buffer Pool Extension Can be 32 times of the Max Server Memory Microsoft recommends 1:16 ratio between physical memory and BPE 1:4 or 1:8 may be optimal. Test before you implement in production. Tracking: DMVs: sys.dm_os_buffer_pool_extension sys.dm_os_buffer_descriptors (is_in_bpool_extension) ExtendedEvents: sqlserver.buffer_pool_extension_pages_evicted sqlserver.buffer_pool_extension_pages_read sqlserver.buffer_pool_extension_pages_written sqlserver.buffer_pool_eviction_thresholds_recalculated

DEMO Buffer Pool Extension Configure Test Results

BPE Points to Remember Works best for OLTP workloads, not for OLAP. Feature available only in 64 bit. SQL Server 2014 Standard, BI and Enterprise editions. Altering BPE configuration needs disable and enable the feature. BPE value once set cannot be reduced without restart. Your responsibility to check performance of disk subsystem used for BPE.

All the best with BPE Delayed Durability Let us first thank Jim Grey Image curtesy: Computerworld.com

A C I Durability? W A L Write Ahead Logging Transaction Commit Write Log Client Ack to client Server Write Ack Storage Achieved by logging transactions to disk before commit Committed data will never be lost during server crash Log backups, HA (Replication, Log shipping) have high guarantee of sync

Log Manager Log Buffer (128*60KB = 7.5 MB) Log Manager Asynchronous Log flush COMMIT or ABORT 60 KB of log records IO Requests (512 bytes up to 60KB)

Log Manager Outstanding IO Size limit Prior to 2008: 480 KB SQL Server 2008 and above: 3840 KB Outstanding IO limit: Prior to 2005 SP1: 8 outstanding IOs SQL Server 2005-2008: x86-8 outstanding IOs, x64-32 outstanding IOs SQL Server 2012 and above: 112 outstanding IOs

Demo Log Manager

Delaying the D Delayed Durability Delaying the log writes asynchronous transactions Reduces both latency and contention Control is returned to client skipping Log IO Less log IO contention Increased throughput

Demo Delayed-Durability

What is the Cost? Transaction Commit Write Log Ack to client Write Ack Client Server Storage No Pain, No Gain Data durability is not guaranteed Transactions committed can be lost during a crash or server shutdown Log dependent features are not synchronous Replication, Log shipping, etc.

Use Cases and Feasibility Tolerate some data loss High wait times for WRITELOG wait type Workloads having high contention rate Loads of blocking due to heavy concurrent processing Queries taking longer time waiting on WRITELOG and holding locks on resources for longer duration

Controlling Delayed Durability Database Level ALTER DATABASE SET DELAYED_DURABILITY = DISABLED (Default) Cannot enable Delayed Durability ALLOWED Can be controlled at Transaction Level FORCED Forced and overrides any Transaction level option Atomic Block Level Natively Compiled Stored Procedures CREATE PROCEDURE <ProcName> WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH ( DELAYED_DURABILITY = ON OFF ) Commit Level Transact-SQL COMMIT TRAN <tranname> WITH DELAYED_DURABILITY = OFF ON

BONUS - Loopholes Log buffer is flushed into disk periodically when the buffer limit is hit Can we control it... Yes How? By forcing a transaction log flush Execute a fully durable transaction that will flush the log buffer to the disk Database level delayed durability setting overrides transaction level durable transaction Cross Database or Distributed transactions are always Durable sp_flush_log Forces all committed delayed durable transaction log records to disk

Demo Delayed-Durability with SSDs

Analysis DD on SSDs Small Transactions Large Transactions HDD More writes More io_stalls High duration Less writes More io_stalls Moderate duration Moderate writes More io_stalls Moderate duration Moderate writes More io_stalls Moderate duration SSD More writes Less io_stalls Moderate duration Less writes Less io_stalls Low duration Moderate writes Less io_stalls Moderate duration Moderate writes Less io_stalls Moderate duration Delayed Durability Disabled Enabled Disabled Enabled

Analysis DD on SSDs Small Transactions Large Transactions HDD SSD More writes More io_stalls High duration IO_Stalls More writes Less io_stalls Moderate duration Writes Less writes More io_stalls Moderate duration Less writes Less io_stalls Low duration Moderate writes More io_stalls Moderate duration IO_Stalls Writes Moderate writes Less io_stalls Moderate duration Moderate writes More io_stalls Moderate duration Moderate writes Less io_stalls Moderate duration Delayed Durability Disabled Enabled Disabled Enabled

Dependencies Data loss Crash recovery, Restart and Failover Clustering Replication, Log Shipping and Log Backups Always-ON Secondaries not in Sync in Synchronous mode No Effect Change Tracking and Change Data Capture are fully durable Cross-database transactions and Distributed transactions are fully durable

Summary SQL Server has improved, expanded and improving its Memory. With 2014 more new features added BPE Buffer Pool Extension and Delayed Durability Increased IO performance with increased buffer pool to faster nonvolatile storage A C I Durability WAL Improved performance at a cost Controlling Delayed Durability DD with SSDs Dependencies of other features

Questions Please make sure you visit our fantastic sponsors. #509 Brisbane 2016

Thank You @ManuSQLGeek #sqlsat509 #509 SQL Saturday Brisbane #509 2016 Brisbane 2016