In-Memory Technologies Enhanced High Availability New Hybrid Scenarios In-Memory OLTP 5-25x performance gain for OLTP integrated into SQL Server In-Memory.

Slides:



Advertisements
Similar presentations
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Advertisements

Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
| Basel SQL Server 2014: In- Memory OLTP Stéphane Haby - Stéphane Savorgnano Consultant dbi services.
Les Conférences Groupe des Utilisateurs SQL Server Juin 2013 – SQL Server in-memory Alexandre Chemla – Masao Frédéric Pichaut – Microsoft.
1. SQL Server 2014 In-Memory by Design Arthur Zubarev June 21, 2014.
Big Data Working with Terabytes in SQL Server Andrew Novick
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
SQL Server 2014 – Features Drilldown Tara Shankar Jana Senior Premier Field Engineer (Microsoft)
Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server.
Dandy Weyn Sr. Technical Product Mkt.
Planning on attending PASS Summit 2014? The world’s largest gathering of SQL Server & BI professionals Take your SQL Server skills to the.
A Fast Growing Market. Interesting New Players Lyzasoft.
Dos and don’ts of Columnstore indexes The basis of xVelocity in-memory technology What’s it all about The compression methods (RLE / Dictionary encoding)
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Microsoft SQL Server x 46% 900+ For Hosting Service Providers
Evolving SQL Server for Modern Hardware Paul Larson, Eric N. Hanson, Mike Zwilling Microsoft plus to the many members of the Apollo and Hekaton teams Paul.
Jeremy Boyd Director – Mindscape MSDN Regional Director
SQL Server 2014: In In-memory OLTP for Database Developers.
SQL Server 2014: Overview Phil ssistalk.com.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server.
SQL Server 2014 adds in-memory technology to boost performance of OLTP workloads.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Meet Kevin Liu Principal Lead Program Manager Kevin Liu has been with Microsoft and the SQL Server engine team for 7 years, working on key projects like.
Moore’s Law means more transistors and therefore cores, but… CPU clock rate stalled… Meanwhile RAM cost continues to drop.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
CS 540 Database Management Systems
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
5 Trends in the Data Warehousing Space Source: TDWI Report – Next Generation DW.
In-Memory OLTP The faster is now simpler in SQL Server 2016.
PASS Virtual Chapter presentation March 27, 2014.
Vedran Kesegić. About me  M.Sc., FER, Zagreb  HRPro d.o.o. Before: Vipnet, FER  13+ years with SQL Server (since SQL 2000)  Microsoft Certified.
SQL Basics Review Reviewing what we’ve learned so far…….
Redmond Protocols Plugfest 2016 Jos de Bruijn, Borko Novakovic SQL In-Memory OLTP Senior Program Manager.
Oracle Announced New In- Memory Database G1 Emre Eftelioglu, Fen Liu [09/27/13] 1 [1]
Doing fast! Optimizing Query performance with ColumnStore Indexes in SQL Server 2012 Margarita Naumova | SQL Master Academy.
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
Enable Operational Analytics (HTAP) in SQL Server 2016 and Azure SQL Database Sunil Agarwal Principal Program Manager, SQL Server Product Tiger Team
Data Platform and Analytics Foundational Training
In-Memory Capabilities
Operational Analytics in SQL Server 2016 and Azure SQL Database
UFC #1433 In-Memory tables 2014 vs 2016
What’s New in SQL Server 2016 Master Data Services
7/17/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Couchbase Server is a NoSQL Database with a SQL-Based Query Language
SQL Server 2014 In-Memory OLTP
Introduction to SQL Server Management for the Non-DBA
SQL Server 2014 In-Memory Overview
Graeme Malcolm | Data Technology Specialist, Content Master
මොඩියුල විශ්ලේෂණය Buffer Pool Extension භාවිතය.
Blazing-Fast Performance:
Capitalize on modern technology
Super Scaling The LMAX Queue Pattern.
In-Memory OLTP (IMOLTP) What Can It Do For Me?
Real world In-Memory OLTP
SQL 2014 In-Memory OLTP What, Why, and How
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Microsoft Ignite /1/ :19 PM
Statistics for beginners – In-Memory OLTP
In-Memory OLTP for Database Developers
Sunil Agarwal | Principal Program Manager
Using Columnstore indexes in Azure DevOps Services. Lessons learned
SQL Server 2014: In-Memory OLTP Overview
Using Columnstore indexes in Azure DevOps Services. Lessons learned
SQL Server 2016 High Performance Database Offer.
Sunil Agarwal | Principal Program Manager
Presentation transcript:

In-Memory Technologies Enhanced High Availability New Hybrid Scenarios In-Memory OLTP 5-25x performance gain for OLTP integrated into SQL Server In-Memory DW 5-25x performance gain and high data compression Updatable and clustered SSD Bufferpool Extension 4-10X of RAM and up to 3X performance gain transparently for apps Always On Enhancements Increased availability and improved manageability of active secondaries Online Database Operations Increased availability for index/partition maintenance Backup to Azure Easy to implement and cost effective Disaster Recovery solution to Azure Storage HA to Azure VM Easy to implement and cost effective high availability solution with Windows Azure VM Deploy to Azure Deployment wizard to migrate database Better together with Windows Server WS2012 ReFS support Online resizing VHDx Hyper-V replica Windows “Blue” support Extending Power View Enable Power View on existing analytic models and support new multi- dimensional models. Other investments

In-Memory Technologies In-Memory OLTP 5-20X performance gain for OLTP integrated into SQL Server In-Memory DW 5-25X performance gain and high data compression Updatable and clustered SSD Bufferpool Extension 4-10X of RAM and up to 3X performance gain transparently for apps Applicable to Transactional workloads: Concurrent data entry, processing and retrieval Applicable to Decision support workloads: Large scans and aggregates Applicable to Disk-based transactional workloads: Large working (data)set

6

Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because processors would melt… New CPU won’t run a short transaction much faster

SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore Main-Memory Optimized Direct pointers to rows Indexes exist only in memory No buffer pool No write-ahead logging Stream-based storage Non-Blocking Execution Multi-version optimistic concurrency control, full ACID support Lock-free data structures No locks, latches or spinlocks, No I/O in transaction T-SQL Compiled to Native Machine Code T-SQL compiled to machine code leveraging VC compiler Procedure and its queries, becomes a C function Aggressive compile-time optimizations Architectural Pillars Results Hybrid engine and integrated experience In-memory cache speed with capabilities of a database Transactions execute to completion without blocking Queries & business logic run at native- code speed Principl es Performance- critical data fits in memory Conflicts are Rare Push decisions to compilation time Built-In

Memory-optimized Table Filegroup Data Filegroup SQL Server.exe Hekaton Engine: Memory_optimized Tables & Indexes TDS Handler and Session Management Native- Compiled SPs and Schema Buffer Pool Execution Plan cache for ad-hoc T-SQL and SPs Application Transaction Log Query Interop Non-durable Table option T1T1 T3T3 T2T2 T1T1 T3T3 T2T2 T1T1 T3T3 T2T2 T1T1 T3T3 T2T2 Table s Indexe s T-SQL Interpreter T1T1 T3T3 T2T2 T1T1 T3T3 T2T2 Access Methods Parser, Catalog, Optimizer Hekaton Compiler Hekaton Componen t Key Existing SQL Componen t Generated.dll 20-40x more efficient Real Apps see 2-30x Reduced log contention; Low latency still critical for performance Few improvements in comm layers

50, ∞ JohnParis TimestampsNameChain ptrsCity Hash index on Name Transaction 100: UPDATE City = ‘Prague’ where Name = ‘John’ No locks of any kind, no interference with transaction , ∞ JohnPrague 90, ∞ Susan Bogota f(John) 100 Transaction 99: Running compiled query SELECT City WHERE Name = ‘John’ Simple hash lookup returns direct pointer to ‘John’ row Background operation will unlink and deallocate the old ‘John’ row after transaction 99 completes.

CREATE TABLE [Customer]( [CustomerID] INT NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = ), [Name] NVARCHAR(250) NOT NULL, [CustomerSince] DATETIME NULL INDEX [ICustomerSince] NONCLUSTERED INDEX [ICustomerID-Since] NONCLUSTERED (CustomerID, CustomerSince) ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA); This table is memory optimized This table is durable. Non-durable tables: DURABILITY=SCHEMA_ONLY Indexes may be specified inline NONCLUSTERED indexes are supported Hash Index BUCKET_COUNT Use 2x # of unique index key values Multi-Column indexes are supported

CREATE PROCEDURE DATETIME WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = 'us_english') -- insert T-SQL here END This proc is natively compiled Native procs must be schema-bound Atomic blocks Create a transaction if there is none Otherwise, create a savepoint Execution context is required Session settings are fixed at create time

One of the hardest parts of a high-performance in-memory system Performance goals require in-memory format to diverge from storage format Storage format must be very efficient for checkpoint and recovery Contention on the transaction log grows High-availability remains very critical

CustomerWorkloadResults Edgenet – SaaS provider for retailers and product delivery for end consumers Provide real-time insight into product price/availability for retailers and end- consumers. Used by retailers in-stores and to end- consumers via search engines. 8x-11x in performance gains for ingestion of data Consolidated from multi-tenant, multi- server to single database/server. Removed application caching layer (additional latency) from client tier. Case Study Case Study BWin.party - Largest regulated online gaming site Running ASP.NET session state using SQL Server for repository Critical to end-user performance and interaction with the site Increase 15,000 batch requests/sec per to over 250,000 in case study Lab testing achieved over 450,000 batch requests/sec Consolidate 18 SQL Servers -> 1. Case Study Case Study SBI Liquidity Market - Japanese foreign currency exchange trading platform. Includes high volume and low latency trading. Expecting 10x volume increase 2x throughput (get over 3x in testing) with goal to reduce latency from 4 seconds to 1 per business transaction. Case study

Despite 20 years of optimizing for OLTP benchmarks – we still get 2x on a workload derived from TPC-C Apps that take full advantage: e.g. web app session state Apps with periodic bulk updates & heavy random reads Existing apps typically see 4-7x improvement

Apply to In-Memory BI (PowerPivot, PowerView) In-Memory DW (columnstore) In-Memory OLTP Apply to In-Memory BI (PowerPivot, PowerView) In-Memory DW (columnstore) In-Memory OLTP

CustomerApp Pattern SQL Common Labs Event ReportingShock Absorber BWIN - Session StateRelational Cache SaxobankRead Scale Baltika BreweriesOLTP EdgenetRead Scale DerivcoRelational Cache SBI LiquidityOLTP Plenty Of FishRead Scale CareGroupShock Absorber

Typical scenarios Data is typically written once and read many times Queries are against large amounts of data Aggregating, filtering are common Star & snowflake schemas are common using dimension and fact tables New data is typically appended to fact tables

… C1 C2 C3 C5C4 25 Benefits: Improved compression: Data from same domain compress better Reduced I/O: Fetch only columns needed Improved Performance: More data fits in memory Data stored as rows Columnstore internals Data stored as columns

OrderDateKeyProductKeyStoreKeyRegionKeyQuantitySalesAmount ColumnStore Index Example

OrderDateKeyProductKeyStoreKeyRegionKeyQuantitySalesAmount OrderDateKeyProductKeyStoreKeyRegionKeyQuantitySalesAmount Horizontally Partition (create Row Groups) ~1M rows

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount Vertically Partition (create Segments)

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount Compress Each Segment

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount Read The Data Column Elimination Segment Elimination

Table consists of column store and row store DML (update, delete, insert) operations leverage delta store INSERT Values Always lands into delta store DELETE Logical operation Data physically remove after REBUILD operation is performed. UPDATE DELETE followed by INSERT. BULK INSERT if batch < 100k, inserts go into delta store, otherwise columnstore SELECT Unifies data from Column and Row stores - internal UNION operation. “Tuple mover” converts data into columnar format once segment is full (1M of rows) REORGANIZE statement forces tuple mover to start. C1 C2 C3 C5C6C4 Column Store C1 C2 C3 C5C6C4 Delta (row) store tuple mover

In-Memory OLTP Overview Motivating trends – hardware, software, apps In-memory OLTP architecture & integration into SQL Server Performance and customer results In-Memory Data Warehousing Overview Buffer Pool Extension Overview

Use of cheaper SSD to reduce SQL memory pressure No risk of data loss – only clean pages are involved Observed up to 3x performance improvement for OLTP workloads during the internal testing Sweet spot machine size: Up to 32GB RAM High throughput and endurance SSD storage (ideally PCI-E) sized 4x-10x times of RAM size Not optimized for DW workloads * Not applicable to In-memory OLTP * DW workload data set is so large that table scan will wash out all the cached pages.

SQL Server RDBMS Column-Store Engine for DW Disk-optimized, row-store engine Memory- optimized OLTP engine AlwaysOn, Backup/Restore, Security, Admin, Deployment Transactions, Queries, Stored Procedures Batch Query Operators Native- Compiled Procedures Blobs Readable Secondaries Range + Column secondary indexes Nearly seamless across all engines Work across all engines but with limitations Work across two engines with limitations Available only in one engine Not comprehensive - only representative examples.