performance tuning ssis
DESCRIPTION
Performance Tuning SSIS. Brian Knight, CEO Pragmatic Works [email protected]. HR Departments are no fun. Don’t mention the stalking incident with Clay Aiken What happened in Vegas My prom date with a puppet Most unfortunate incident with a turtle My fear of bounce houses - PowerPoint PPT PresentationTRANSCRIPT
Performance Tuning SSIS
Brian Knight, CEO Pragmatic [email protected]
HR Departments are no fun.
Don’t mention the stalking incident with Clay AikenWhat happened in VegasMy prom date with a puppetMost unfortunate incident with a turtleMy fear of bounce housesHow to sexually harass the HR rep
• What I did to a fish when I was 8
• Any talk about my college years
• The surgery I had last summer
• The stint I had as a traveling gypsy
• Why am I still not allowed back Texas
• How what I did in Vegas truly can’t stay in Vegas
About Brian
Wasn’t very good with girlsEven Kermit the Frog founded a companyAll 15 still awaiting a publisher.Where he writes about his miniature donkey collection.
• SQL Server MVP• Founder of Pragmatic
Works• Author of 15 books• Blogs at BIDN.com
Twitter: @BrianKnight
4
GeoSpatial Data:Semi structured
Legacy data: binary files
Application database
Integration is a seamless, manageable operationSource, prepare, & load data in single, auditable processScale to handle heavy and complex data requirements
SQL Server Integration Services
GeoSpatialComponents
Customsource
Standardsources
Data-cleansingcomponents
Merges
Data miningcomponents
Warehouse
Reports
Mobiledata
Integration Services in Action
Cube
5
Advanced Session
6
Today’s Problems with Integration
Integration todayIncreasing data volumesIncreasingly diverse sources
Requirements reached the Tipping PointLow-impact source extractionEfficient transformationBulk loading techniques
7
Tuning DecisionsChoose the right tool for the jobDon’t be afraid to use T-SQLWill parallelism work?
8
Source OptimizationFlat files – When available, use Fast ParseOLE DB sources – Change network packet sizeUse T-SQL whenever possible in the OLE DB Source
JoiningNULL handlingWhere clauses
SQL ServerSQL Server
Network TrafficConnection Settings
Packet size defaults to 4096Increase to 32767 on large data sets
Database
SSISPackage S
WITCH
LAN LAN
LAN LAN
10
Impact of Compression on ETL
NONE ROW PAGE05
101520253035
0123456
BULK INSERT into a Heap with and without Data Compression
Time to BULK INSERT 50M rows (min)Table Size after Load (GB)
Compression Type
Tim
e (m
inut
es)
Tabl
e Si
ze a
fter L
oad
(GB)
* Not official Microsoft results.
Tuning the Source
Connection manager tuningFlat file tuningOLE DB Source tuning
Demo
12
Transform Components
x x xThe Pipeline presents the buffer to each downstream component
x x xx x xx x xx x xx x x
13
SSIS Data Flow Architecture
Synchronous vs. Non Synchronous
14
Case Study: Patterns
105 seconds 83 seconds
DemoCascading lookup optimizationsCache file lookup
21
Data DestinationsUse “Fast Load” or SQL Server DestinationTable Lock on insert operationsTrace flags for improvementOld principles still apply
Destination Tuning
Demo
23
Managing Resources
Logging events to watch pipeline internalsPipelineExecutionPlan, PipelineExecutionTree, BufferSizeTuning
System Monitor to track I/O issuesBuffers In Use tracks how many buffers are presently being usedBuffers Spooled tracks how many 10 mb buffers have been spooled to disk
Measuring PerformancePerfmon
25
Location
Consider the following configuration…
Where should SSIS run? (Licensing issues aside)
SQL Server 1 SQL Server 2
SSIS Server
26
WSRMWindows System Resource Manager (WSRM) can throttle CPU and memory
Creates a soft throttleCan be scheduled so SSIS gets priority on weekends and nightsOnly activates policy if resources begin to become constrained (about 70%)WSRM is free with Windows Server 2003 Enterprise Edition and included in Windows Server 2008
WSRMCreating a soft schedule cap
Demo
Building a Work Queue System
Create a work queue table.
Create a loop to shift over the work queue constantly checking out work
Spawn x times with a batch file
Demo Results
1 2 3 4 5 6 7 800:00.0
00:08.6
00:17.3
00:25.9
00:34.6
00:43.2
00:51.8
01:00.5
01:09.1
1 Process finishes in 64 seconds
Elap
sed
Tim
e
1 2 3 4 5 6 7 800:00.0
00:08.6
00:17.3
00:25.9
00:34.6
00:43.2
00:51.8
01:00.5
01:09.1
2 Processes finish in 36 seconds
Elap
sed
Tim
e
Demo Results
1 2 3 4 5 6 7 800:00.0
00:08.6
00:17.3
00:25.9
00:34.6
00:43.2
00:51.8
01:00.5
01:09.1
4 Processes finish in 28 seconds
Elap
sed
Tim
e
Demo Results
1 2 3 4 5 6 7 800:00.0
00:08.6
00:17.3
00:25.9
00:34.6
00:43.2
00:51.8
01:00.5
01:09.1
8 Processes finish in 27 seconds
Elap
sed
Tim
e
Demo Results
Parallel Load
Demo
SummaryPlanning
Don’t underestimate the power of the whiteboard!Use the right tool for the right job
Leverage the power of the enginePatterns and Practices
Understand best practicesBut don’t be afraid to experiment
35
The End Already?
Questions
http://www.bidn.com/people/brianknight
@BrianKnight
http://www.youtube.com/pragmaticworks