300 likes | 433 Views
Performance Tuning SSIS. Brian Knight, CEO Pragmatic Works bknight@pragmaticworks.com. 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
E N D
Performance Tuning SSIS Brian Knight, CEO Pragmatic Works bknight@pragmaticworks.com
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 • How 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 girls Even Kermit the Frog founded a company All 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
Mobile data GeoSpatial Components GeoSpatial Data: Semi structured Merges Data-cleansing components Data mining components Standard sources Custom source Warehouse Legacy data: binary files Reports SQL Server Integration Services Application database Integration Services in Action Integration is a seamless, manageable operation Source, prepare, & load data in single, auditable process Scale to handle heavy and complex data requirements Cube
Today’s Problems with Integration • Integration today • Increasing data volumes • Increasingly diverse sources • Requirements reached the Tipping Point • Low-impact source extraction • Efficient transformation • Bulk loading techniques
Tuning Decisions • Choose the right tool for the job • Don’t be afraid to use T-SQL • Will parallelism work?
Source Optimization • Flat files – When available, use Fast Parse • OLE DB sources – Change network packet size • Use T-SQL whenever possible in the OLE DB Source • Joining • NULL handling • Where clauses
Network Traffic • Connection Settings • Packet size defaults to 4096 • Increase to 32767 on large data sets SQL Server S W I T C H SQL Server SSIS Package Database LAN LAN LAN LAN
Impact of Compression on ETL * Not official Microsoft results.
Tuning the Source Connection manager tuning Flat file tuning OLE DB Source tuning Demo
The Pipeline presents the buffer to each downstream component Transform Components
SSIS Data Flow Architecture Synchronous vs. Non Synchronous
Case Study: Patterns 83 seconds 105 seconds
Demo Cascading lookup optimizations Cache file lookup
Data Destinations • Use “Fast Load” or SQL Server Destination • Table Lock on insert operations • Trace flags for improvement • Old principles still apply
Destination Tuning Demo
Managing Resources • Logging events to watch pipeline internals • PipelineExecutionPlan, PipelineExecutionTree, BufferSizeTuning • System Monitor to track I/O issues • Buffers In Use tracks how many buffers are presently being used • Buffers Spooled tracks how many 10 mb buffers have been spooled to disk
Measuring Performance Perfmon
SQL Server 1 SQL Server 2 Location • Consider the following configuration… Where should SSIS run? • (Licensing issues aside) SSIS Server
WSRM • Windows System Resource Manager (WSRM) can throttle CPU and memory • Creates a soft throttle • Can be scheduled so SSIS gets priority on weekends and nights • Only 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
WSRM Creating 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
Parallel Load Demo
Summary • Planning • Don’t underestimate the power of the whiteboard! • Use the right tool for the right job • Leverage the power of the engine • Patterns and Practices • Understand best practices • But don’t be afraid to experiment
The End Already? Questions http://www.bidn.com/people/brianknight @BrianKnight bknight@pragmaticworks.com http://www.youtube.com/pragmaticworks