Hybrid Buffer Pool The Good, the Bad and the Ugly

Slides:



Advertisements
Similar presentations
Exadata Distinctives Brown Bag New features for tuning Oracle database applications.
Advertisements

Big Data Working with Terabytes in SQL Server Andrew Novick
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Low Control | Low Maintenance Shared Lower cost Dedicated Higher cost High Control | High Maintenance Hybrid On premises Off premises SQL Server Physical.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
WINDOWS XP PROFESSIONAL Bilal Munir Mughal Chapter-1 1.
DBI313. MetricOLTPDWLog Read/Write mixMostly reads, smaller # of rows at a time Scan intensive, large portions of data at a time, bulk loading Mostly.
1© Copyright 2012 EMC Corporation. All rights reserved. EMC VNX5700, EMC FAST Cache, SQL Server AlwaysOn Availability Groups Strategic Solutions Engineering.
Introduction to Exadata X5 and X6 New Features
Get the Most out of SQL Server Standard Edition Or How to be a SQL Miser.
Optimizing SQL Server and Databases for large Fact Tables =tg= Thomas Grohser, NTT Data SQL Server MVP SQL Server Performance Engineering SQL Saturday.
Establishing a Service Level Agreement SLA =tg= Thomas Grohser SQL Server MVP SQL Server Performance Engineering.
SQL Server Internals 101 AYMAN SENIOR MICROSOFT.
SQL Server High Availability Introduction to SQL Server high availability solutions.
Processing Temporal Telemetry Data -aka- Storing BigData in a Small Space =tg= Thomas H. Grohser, SQL Server MVP, Senior Director - Technical Solutions.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Sql Server Architecture for World Domination Tristan Wilson.
Exadata Distinctives 988 Bobby Durrett US Foods. What is Exadata? Complete Oracle database platform Disk storage system Unique to Exadata – intelligent.
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
Ayman El-Ghazali Senior Microsoft.
Indexing strategies and good physical designs for performance tuning Kenneth Ureña /SpanishPASSVC.
NetFlow Analyzer Best Practices, Tips, Tricks. Agenda Professional vs Enterprise Edition System Requirements Storage Settings Performance Tuning Configure.
Memory-Optimized Tables Querying at the speed of light.
sponsored by HP Enterprise
Size Matters Not =tg= Thomas Grohser, NTT Data SQL Server MVP
Get the Most out of SQL Server Standard Edition
Establishing a Service Level Agreement SLA
Optimizing SQL Server and Databases for large Fact Tables
ALWAYSON AVAILABILITY GROUPS
Establishing a Service Level Agreement SLA
Software Defined Storage
Establishing a Service Level Agreement SLA
Database Management Systems (CS 564)
Using non-volatile memory (NVDIMM-N) as block storage in Windows Server 2016 Tobias Klima Program Manager.
Sebastian Solbach Consulting Member of Technical Staff
Windows Server* 2016 & Intel® Technologies
HPE Persistent Memory Microsoft Ignite 2017
Optimizing SQL Server and Databases for large Fact Tables
Windows Azure Migrating SQL Server Workloads
# - it’s not about social media it’s about temporary tables and data
# - it’s not about social media it’s about temporary tables and data
From SLA to HA/DR solution
100% Exam Passing Guarantee & Money Back Assurance
Advanced Security Protecting Data from the DBA
Upgrading to Microsoft SQL Server 2014
Oracle Storage Performance Studies
SQL On Azure Parikshit Savjani, Sr. Premier Field Engineer.
Windows xp professional
Windows Server 2016 Software Defined Storage
Real world In-Memory OLTP
Why most candidates fail the interview in the first five minutes
What’s new in SQL Server 2016 Availability Groups
Service Level Agreement
Microsoft Virtual Academy
Shaving of Microseconds
Why most candidates fail the interview in the first minute
Optimizing SQL Server and Databases for large Fact Tables
AlwaysOn Availability Groups
Why most candidates fail the interview in the first five minutes
Transaction Log Internals and Performance David M Maxwell
Transaction Log Performance Tuning
From SLA to HA/DR solution
=tg= Thomas Grohser Column Store.
=tg= Thomas Grohser SQL Saturday Philadelphia 2019 TSQL Functions 42.
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
Why most Candidates fail the Interview in the first five Minutes
Why most Candidates fail the Interview in the first five Minutes
42 TSQL Functions =tg= Thomas Grohser SQL Saturday
Visual Studio and SQL Server Data Tools
Designing Database Solutions for SQL Server
Presentation transcript:

Hybrid Buffer Pool The Good, the Bad and the Ugly =tg= Thomas Grohser Hybrid Buffer Pool The Good, the Bad and the Ugly

select * from =tg= where topic = =tg= Thomas Grohser, NTT Data Senior Director Technical Solutions Architecture email: tg@grohser.com Focus on SQL Server Security, Performance Engineering, Infrastructure and Architecture Wrote some of Close Relationship with SQLCAT (SQL Server Customer Advisory Team) SCAN (SQL Server Customer Advisory Network) TAP (Technology Adoption Program) Product Teams in Redmond Active PASS member and PASS Summit Speaker @@Version Remark SQL 4.21 First SQL Server ever used (1994) SQL 6.0 First Log Shipping with failover SQL 6.5 First SQL Server Cluster (NT4.0 + Wolfpack) SQL 7.0 2+ billion rows / month in a single Table SQL 2000 938 days with 100% availability SQL 2000 IA64 First SQL Server on Itanium IA64 SQL 2005 IA64 First OLTP long distance database mirroring SQL 2008 IA64 First Replication into mirrored databases SQL 2008R2 IA64 SQL 2008R2 x64 First 256 CPUs & >500.000 STMT/sec First Scale out > 1.000.000 STMT/sec First time 1.2+ trillion rows in a table SQL 2012 > 220.000 Transactions per second > 1.3 Trillion Rows in a table SQL 2014 > 400.000 Transactions per second Fully automated deploy and management SQL 2016 AlwaysOn Automatic HA and DR, crossed the PB in storage SQL 2017 In production 3 minutes after RTM, HA for Replication 3+ Trillion Rows and > 1 PB of data in single DB SQL 2019 Can’t wait to push the limits even further

Shameless Plug This is my 49th SQL Saturday I am speaking at ... The 50th will be the first I am also organizing …

Agenda How SQL Server IO Works Storage Technology Over Time SQL Server Buffer Pool Features Over Time Hybrid Buffer Pool Questions

Learning How to Compare Stuff Marketing

The Bad First …. All features in this talk require Enterprise Edition

SQL Server IO - Select SELECT … Query Processor Buffer Pool Data File

SQL Server IO - Update Update … Query Processor Buffer Pool Log Buffer Log Writer Log File Data File P1 P1 P2 P2 P3 P3 P4 P4 P5 P5 P6 P6 …

SQL Server IO – Buffer Pool is Full SELECT … Query Processor Buffer Pool P1 P4 P7 P9 P1 P3 P5 P6 P13 P33 P17 P28 P21 P67 P42 P34 P54 P78 P52 P54 P88 P49 P41 P77 P99 P29 P16 P37 P94 P59 P66 P38 Data File P1 P1 P2 P2 P3 P3 P4 P4 P5 P5 P6 P6 …

Legacy Storage Technology Over Time 40 MB in about 10 minutes 40 MB 600 kb/s 27 ms 5 MB/s Hard Disk RAID SAN Storage Array 1+ PB 8 GB/s 0.2 ms 2 GB/s RAM SAN Fusion IO SSD All Flash Array 1 PB in about 1 ½ days

Current Storage Options NVMe Disk PCIe Card NVDIMM PMEM – Optane DC Persistent Memory

Current Storage Options NVMe & PCIe cards limited only by PCIe bus up to 16 TB NVMe up to 7 GB/s PCIe up to 14 GB/s PMEM up to (1…8) x (1…12) x (128…512) GB = up to 48 TB NVDIMM up to (1…8) x (1…12) x (8…16) GB = up to 1.5 TB 1 PB in about 2.5 hours 16 TB in about 40 minutes 16 TB in about 20 minutes 48 TB in about 300 seconds 1.5 TB in about 3 seconds Latency measured in µs and ns

PMEM – Two Options 6 x 512 GB = 6144 GB 6 x 128 GB = 768 GB Memory Mode OS sees: 6144 GB RAM CPU sees: 6144 GB RAM with 768 GB L4 cache Application Direct Mode OS sees: 6144 GB DAX Storage 768 GB RAM DO NOT USE FOR SQL or he will never talk to you again

Buffer Pool Features over time SQL 4.21 up to 2 GB SQL 7.0 8k instead of 2k pages, PAE up to 64 GB SQL 2000 NUMA, IA64 on Itanium (2 TB) Marry Go Round Piggyback Scan SQL 2005 x64 (2 TB) SQL2008 Large Page Allocations, up to 4 TB SQL2014 Buffer pool extensions SQL2016 NVDIMM support for tail of the log SQL2019 Hybrid Buffer Pool

Buffer Pool Extensions Data File Buffer Pool (L1) Buffer Pool Extension (L2) P1 P1 P1 Up to 32 x max server memory Up to 16 x physical RAM Unfortunate release time, during development of feature RAM and SSD price fell and made is by and large obsolete on day one

NVDIMM – Tail of the log Update … Query Processor Buffer Pool Log Buffer L1 Log Writer Log File Data File P1 P1 P2 P2 P3 P3 P4 P4 P5 P5 P6 P6 …

Hybrid Buffer Pool SELECT … Query Processor Buffer Pool Data File = If the page is modified it is still copied to RAM and then written back to PMEM during checkpoint or eager write. Data File P1 P1 P2 P2 P3 P3 P4 P4 P5 P5 P6 P6 …

Requirements for hybrid buffer pool Server with PMEM Windows Server 2019 SQL Server 2019 Volume on PMEM with Filesystem that supports DAX and formatted with 2MB cluster size Data File that is multiple of 2MB in size on the volume (create new or move existing)

TSQL Commands (SQL 2019 and up) ALTER SERVER CONFIGURATION SET MEMORY_OPTIMIZED HYBRID_BUFFER_POOL = ON; SET MEMORY_OPTIMIZED HYBRID_BUFFER_POOL = OFF; ALTER DATABASE <databaseName> SET MEMORY_OPTIMIZED = ON; ALTER DATABASE <databaseName> SET MEMORY_OPTIMIZED = OFF; SELECT * FROM sys.configurations WHERE name = 'hybrid_buffer_pool'; SELECT name, is_memory_optimized_enabled FROM sys.databases;

Hybrid Buffer Pool Speed Sorry Some Algebra and Calculus needed  If 𝑥 = speed of RAM then 4𝑥≈ speed of PMEM and 16𝑥≈ speed of NVMe Disks Size of 1st Subsequent Average becomes Data Scan Scans < Buffer Pool 16𝑥+𝑥 𝑥 16𝑥+𝑥+𝑥(𝑛−1) 𝑛 = (16+𝑛)𝑥 𝑛 →lim 𝑛→∞ (16+𝑛)𝑥 𝑛 =𝒙 > Buffer Pool 16𝑥+𝑥 16𝑥+𝑥 𝟏𝟕𝒙 < Hybrid Buffer Pool 4𝑥 4𝑥 𝟒𝒙

Conclusion If the workload does not fit into RAM but fits into PMEM it makes sense RAM RAM PMEM

tg@grohser.com Questions?