Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
-
Upload
sqlservercoil -
Category
Technology
-
view
104 -
download
0
description
Transcript of Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Data Warehousing
with
FastTrack and PDW
Assaf Fraenkel Oded Shihor
Lead Architect, MCS Senior Solution Architect, HP
?איזה מכונית כדאי לקנות !?האם זו שאלה של מחיר
Agenda
Motivation
Fast Track Offering
– Balanced Architecture Approach for DW
– Example FastTrack Reference Architectures
– Optimizing Storage, Load and Maintenance
– Case Studies
Parallel Data Warehouse Offering Overview
Some SQL Data Warehouses today
Big SAN
Big SMP Server
Connected together
What’s wrong with this picture?
Answer: system out of balance
This server can consume 16 GB/Sec of IO, but the SAN can only deliver 2 GB/Sec
– Even when the SAN is dedicated to the SQL Data Warehouse, which it often isn’t
– Lots of disks for Random IOPS BUT
– Limited controllers Limited IO bandwidth
System is typically IO bound
Queries are slow
Result: significant investment, not delivering performance
You can get more sophisticated…
Realize that queries performing complex calculations,
format conversions, multi-dimension hash joins, etc. will be
more cpu-intensive than others
– Complex queries will consume data at a slower per-core rate
than simpler queries
Alternative: Measure per-core data consumption for a
variety of queries, and take the weighted average
– A standard approach to capacity planning
Or you can leave it to us…
We’ve measured a mix of TPCH queries that reflect a
‘prototype’ Data Warehouse workload
Concluded that SQL Sever 2008 R2 on current x64 cores
consume ~200 MB/Sec per core on average for this
workload
We use this as a basis for the published reference
architectures
Your mileage will vary!
– For precise system sizing, measure your own workload
Potential Performance Bottlenecks
FC HBA
A
B
FC HBA
A
B
FC SWITCH
STORAGE CONTROLLER
A
B
A
B CA
CH
E
SERVER
CACHE
SQL SERVER
WINDOWS
CPU CORES
CPU Feed Rate HBA Port Rate Switch Port Rate SP Port Rate
A
B DISK DISK
LUN
DISK DISK
LUN
SQL Server Read Ahead Rate
LUN Read Rate Disk Feed Rate
The Alternative: A Balanced System
Design a server + storage configuration that can deliver all the IO bandwidth that CPUs can consume when executing a SQL Relational DW workload
Avoid sharing storage devices among servers
Avoid overinvesting in disk drives – Focus on scan performance, not IOPS
Layout and manage data to maximize range scan performance and minimize fragmentation
Microsoft Data Warehousing – Product Offering
Scale Complexity HA by default SW-HW integration
1
2
3
SQL Server 2008 R2 with Fast Track
Reference Architecture
PDW with Hub-and-spoke
SQL Server 2008 R2
4
PDW
1
2
3
Minimal HW tune up/optimization. Supports mixed workloads Balanced solution for mostly scan centric workloads.
Max HW tune up for most DW scenarios.
4 Most flexible Architecture for handling all DW scenarios.
Agenda
Motivation
Fast Track Offering
– Balanced Architecture Approach for DW
– Example FastTrack Reference Architectures
– Optimizing Storage, Load and Maintenance
Parallel Data Warehouse Offering Overview
SQL Server Fast Track Data Warehouse
A for designing a cost-effective, balanced system for Data
Warehouse workloads
Reference hardware developed in conjunction with
hardware partners using this method
for data layout, loading and management
Relational Database Only – Not SSAS, IS, RS
Solution to help customers and partners accelerate their data warehouse deployments
Fast Track Scope
Data
Path
Data Warehouse
Analysis Services
Cubes
PerformancePoint
SAN, Storage Array
Reporting Services
Web Analytic Tools
Integration
Services ETL
SharePoint Services
Microsoft Office SharePoint
Data Staging,
Bulk Loading
Subject Area
Data Marts
Supporting Systems BI Data Storage Systems Presentation Layer Systems
Reference Architecture Scope (dashed)
Excel Services
Pre
sen
tati
on
Data
P
resen
tati
on
Data
HP Fast Track DL785 G6 Demo
Fast Track SQL DW Architecture vs. Traditional DW
SQL 2008 Data Warehouse
4 Processor 16 + Core Server
Shared Network
Bandwidth
Enterprise Shared
SAN Storage
Dedicated Network
Bandwidth
Traditional SQL DW Architecture
Shared Infrastructure
Fast Track SQL DW Architecture
Dedicated DW Infrastructure
Architecture modeled after DW Appliances
Scalability from 4TB to 80TB
Dedicated Low Cost
SAN Arrays 1 for every
4 CPU Cores
OLTP Applications
Benefits:
-Lower TCO
-Balanced CPU to I/O Channel Optimized for DW
-Modular Building Block Approach
-Scale Out or Up within limits of Server and San
HP SQL Server Fast Track Data Warehousing
Fast Track G7 Configurations
Scales from SMB to Enterprise
– Prescriptive guidance and optimized methodology for deploying a data warehouse
– Targeted at query workloads patterned for large sequential data reads
– Balanced hardware approach
HP provides
– Configurations, tested performance, guidance and
– Best practices for deploying/operating/managing
– Packaged and custom support
Basic 8– 16TB
DL38x G7w/ MSA2000 G3
Mainstream 8 – 16TB
DL38x G7 w/ MSA P2000 G3
Mainstream 20 – 60TB
DL58x G7 w/ MSA P2000 G3
Premium 40– 80 TB
DL980 G7 w/ MSA P2000 G3
Coming soon
Server: HP ProLiant DL980 G7 with 8x 8-core Intel Xeon
Storage: HP P2000 G3
Scalability: 40 – 80TB
Server: HP ProLiant DL380 G7 with 2x 6-core Intel Xeon
Storage : HP P2000 G3
Scalability: 8 – 16TB
Small SMP:
2- Socket Processor Configuration
Server: HP ProLiant DL 580 G7 with 4x 8-core Intel Xeon
Storage : HP P2000 G3
Scalability: 20 – 40TB
Medium SMP: 4- Socket Processor
Configuration
Large SMP:
8- Socket Processor Configuration
2p; 12 core, 64-192GB RAM
8p; 64 core, 2TB RAM
4p; 32 core, 144-512GB RAM
Coming soon
HP SQL Server Fast Track Data Warehousing
Fast Track G7 configurations in test
Fast Track Component Architecture
Server
Windows Server OS
SQL Server
Sto
rag
e In
terc
on
nect
Storage Enclosure
Disk Array
Host Storage Adaptor
Storage Processor
CPU
Core Evaluation Metrics
These metrics are used to both validate and position Fast Track Reference Architectures
– Maximum Consumption Rate – Ability of SQL Server to process data for a specific CPU and Server combination and a standard SQL query.
– Benchmark Consumption Rate – Ability of SQL Server to process data for a specific CPU and Server combination and a user workload or query.
– User Data Capacity – Maximum available SQL Server storage for a specific Fast Track RA assuming 2.5:1 page compression factor.
Scaling the IO stack
Server
Fiber Switch
HBA
HBA
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
CPU Socket (4 Core)
CPU Socket (4 Core)
CPU Socket (4 Core)
CPU Socket (4 Core)
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
Storage Enclosure
Storage Processor
Storage Processor
RAID-1 RAID-1
RAID-1 RAID-1
RAID-1
CPU Socket (4 Core)
CPU Socket (4 Core)
CPU Socket (4 Core)
CPU Socket (4 Core)
HBA
HBA
HBA
HBA
HBA
HBA
User Data Capacity
UDC is the data capacity required
– Plan for projected growth • Based on your projections
• Needs to be allocated up-front
– Allocate for data management needs • Staging database requirements
• Temporary objects
– Allocate for TempDB • Typically 20-30% of primary data space
• Tempdb is not compressed
Storage Layout Implications for SQL Server
LUN16 LUN 2 LUN 3
Local Drive 1
Log LUN 1
Permanent DB Log
LUN 1
Te
mp
DB
TempDB.mdf (25GB) TempDB_02.ndf (25GB) TempDB_03ndf (25GB) TempDB_16.ndf (25GB)
Permanent FG
Permanent_1.ndf
Pe
rma
na
nt_
DB
S
tag
e
Data
ba
se
Stage FG
Stage_1.ndf Stage_2.ndf Stage_3.ndf Stage_16.ndf
Stage DB Log
Permanent_2.ndf Permanent_3.ndf Permanent_16.ndf
Sequential Scan Components
Contiguous allocation, data striping, pre-fetch, and read-ahead work to create efficient Sequential IO
– Data stripe width is balanced against read-ahead “Depth”
– Combined, these elements provide effective access to the full data stripe from a single thread
Each element is necessary to maximize efficiency
ARY01D1v01
ARY01D2v02
ARY02D1v03
ARY02D2v04
ARY03D1v05
ARY03D2v06
ARY04D1v07
ARY04D2v08
DB1-1.ndf DB1-7.ndf DB1-5.ndf DB1-3.ndf
DB1-2.ndf DB1-4.ndf DB1-6.ndf DB1-8.ndf
4MB
4MB 4MB
4MB 4MB 4MB
4MB 4MB
loading
One of the important topics
I hope you saw the session yesterday
If not – you can watch the video
OR
There is Appendix to this presentation -
Minimizing File fragmentation
Pre-allocate database files
• Size files correctly to prevent growth
• Do not shrink files
Do not use NTFS file fragmentation tools
– Rebuild table to ensure disk block level optimal organization
Writing data
– Concurrent load operations to the same file will induce fragmentation
– DML change operations (Update/Delete) may induce fragmentation
Use Filegroups and Partitioning to manage concurrent writes
for large tables
What’s next? My car is too small
•
•
Agenda
Motivation
Fast Track Offering
– Balanced Architecture Approach for DW
– Example FastTrack Reference Architectures
– Optimizing Storage, Load and Maintenance
Parallel Data Warehouse Offering Overview
– Scale Out Architecture Approach for DW
– SQL Server in Scale Out Story
HP Enterprise Data Warehouse Appliance
Transforming today’s SQL
The world’s most scalable,
easy-to-manage enterprise
data warehousing solution
BEFORE AFTER
HP Enterprise Data Warehouse Appliance
FOR ANY SCALE COMPLETE SIMPLIFIED
HP Enterprise Data Warehouse Appliance
Description
Scale-Out of SQL Server: 10s TB ►100s TB ►PB
Uses massively parallel processing (MPP)
Highly optimised for DW workload at each layer of the stack
Uses index-Light
Deliver predictable performance at low cost
Simplified deployment and maintenance via appliance model
Integration with existing SQL Server 2008 DW via Hub & Spoke Architecture
Lower total cost of ownership
HP Parallel Data Warehouse Appliance -
Hardware Architecture Database Nodes
HP ProLiant DL
Control Nodes HP ProLiant DL
Active / Passive
Landing Zone
Backup Node
Spare Database Node
Management Servers
Client Drivers
ETL Load Interface
Data Center
Monitoring
Corporate Network Private Network
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
SQL
Control node
Where clients apps connect
MPP engine runs here
Controls DMS on all nodes
Central point for all HW
monitoring
Management node
S/W upgrades and patch
deployment staging place
Holds S/W images in case a
node needs reimaging
SQL
Storage Nodes HP MSA P2000 G3
Landing Zone
Staging place for data
loading
Accessible to outside world
Corporate Backup
Solution
Backup node
Backup file storage
Accessible to outside world
Data Rack
Control Rack
Du
al F
ibe
r C
han
ne
l
Dua
l In
fin
iban
d
Compute nodes
Store user data
Perform local query processing
Run data movement service
Not accessible to outside world
SMP (SQL Server, Fast Track) MPP (PDW)
OLTP, Transactional, Data Warehousing
Parallel Data Warehousing (esp. VLDB, complex workloads)
Symmetric Multi-Processing vs. Massively
Parallel Processing
HP Enterprise Parallel Data Warehouse –
Impressive live demo
Massive parallel query processing
106 billion rows; 10 TB table
High performance report without indexing and aggregations
Agenda
Motivation
Fast Track Offering
– Balanced Architecture Approach for DW
– Example FastTrack Reference Architectures
– Optimizing Storage, Load and Maintenance
Parallel Data Warehouse Offering Overview
– Scale Out Architecture Approach for DW
– SQL Server in Scale Out Story
Date Dim D_DATE_SK D_DATE_ID D_DATE D_MONTH …
Item I_ITEM_SK I_ITEM_ID I_REC_START_DATE I_ITEM_DESC …
Store Sales Ss_sold_date_sk Ss_item_sk Ss_customer_sk Ss_cdemo_sk Ss_store_sk Ss_promo_sk Ss_quantity …
Promotion P_PROMO_SK P_PROMO_ID P_START_DATE_SK P_END_DATE_SK … Store
S_STORE_SK S_STORE_ID S_REC_START_DATE S_REC_END_DATE S_STORE_NAME …
Customer C-CUSTOMER_SK C_CUSTOMER_ID C_CURRENT_ADDR …
Customer Demographics
CD_DEMO_SK CD_GENDER CD_MARITAL_STATUS CD_EDUCATION …
Database
SS[1]
SS[2]
SS[3]
SS[4]
Data Distribution with replication
Distributed Data Warehouse Architecture
Central Enterprise
DW Hub
Regional Reporting
Departmental Reporting
ETL Tools Hub= unified EDW Spoke= Federated data marts
Enterprise data
can be maintained
on a PDW hub
MS Office 2010
Distributed Data Warehouse Approach
Hub & Spoke model
Enables DW architecture to more closely match the structure of large enterprises.
Separates user and data workloads eliminating traditional process and resource conflicts
Integrate both SMP and MPP systems with “Shared Nothing”
All systems connect via a dedicated high speed netwok
Dual high speed Infiniband
Supports multiple workloads on different systems
Microsoft Data Warehousing – Product Offering
Scale Complexity HA by default SW-HW integration
1
2
3
SQL Server 2008 R2 with Fast Track
Reference Architecture
PDW with Hub-and-spoke
SQL Server 2008 R2
4
PDW
1
2
3
Minimal HW tune up/optimization. Supports mixed workloads Balanced solution for mostly scan centric workloads.
Max HW tune up for most DW scenarios.
4 Most flexible Architecture for handling all DW scenarios.
Resources
SQL Server Fast Track DW Home Page
– http://www.microsoft.com/sqlserver/2008/en/us/fasttrack.aspx
Fast Track DW 2.0 Architecture Whitepaper
– http://msdn.microsoft.com/en-us/library/dd459178.aspx
Use minimal logged BULK operation (Trace Flag –T 610)
– http://msdn.microsoft.com/en-us/library/dd425070.aspx
Perspectives: 2010
משובים ופייסבוק
השלמה -מירב
Let’s Party!
18:30-20:30בין השעות –ארוחת ערב
20:30 -שאטלים החל מ –למסיבה תחבורה
במעטפות בקבלת החדרים מקבלים - צמידים לכניסה
Alternatives for loading
Use a heap
– Practical if queries need to scan whole partitions
or…Use a batchsize = 0
– Fine if no parallelism is needed during load
or…Use a Two-Step Load
1. Load to a Staging Table (heap) with constraint for Deltas
2. INSERT-SELECT from Staging Table into Target CI
Resulting rows are not fragmented
Can use Parallelism in step 1 – essential for large data volumes
Two-Step Load Variations
To achieve high parallelism during historical load
– Typically into a partitioned table
– Use a Staging Table (heap) that is partitioned identically to the Target
Table
– Use multiple concurrent streams to load the Staging Table with
moderate batchsize (SSIS, Bulk Insert, etc)
– INSERT-SELECT separate partitions into the Target Table –
potentially in parallel
• Use ALTER TABLE SET ( LOCK_ESCALATION = AUTO)
– Note: If memory is limited, TempDB could be heavily used for sorting
Two-Step Load Variations (cont.)
To avoid most TempDB space and TempDB IO during load
– Use a partitioned Staging Table that is also indexed identically to
Target Table
– Load Staging Table using moderate batchsize (< 1M rows)
– Final INSERT-SELECTs will avoid any sort!
• However the staging loads will be logged
– Note: Parallelism will be limited if load batches overlap
Loading Data
Goal: maximize read performance
– Minimizes Disk head movement
– Maintains high average request size (Think ~400k not 8k)
– Sustain high average scan rates
Key considerations for a Fast Track data load
– Data Architecture: Destination table, partitioning, and filegroup
– Source Data: Format & size
– System Resources: CPU & Memory
Use minimal logged BULK operation (Trace Flag –T 610)
– http://msdn.microsoft.com/en-us/library/dd425070.aspx