Micrsft SQL Server Cnfiguratin Guide fr HP IO Acceleratrs Part Number 647096-001 December 2010 (First Editin)
Cpyright 2010 Hewlett-Packard Develpment Cmpany, L.P. The infrmatin cntained herein is subject t change withut ntice. The nly warranties fr HP prducts and services are set frth in the express warranty statements accmpanying such prducts and services. Nthing herein shuld be cnstrued as cnstituting an additinal warranty. HP shall nt be liable fr technical r editrial errrs r missins cntained herein. Cnfidential cmputer sftware. Valid license frm HP required fr pssessin, use r cpying. Cnsistent with FAR 12.211 and 12.212, Cmmercial Cmputer Sftware, Cmputer Sftware Dcumentatin, and Technical Data fr Cmmercial Items are licensed t the U.S. Gvernment under vendr s standard cmmercial license. Micrsft, Windws, and Windws Server are U.S. registered trademarks f Micrsft Crpratin. Intended audience This dcument is fr the persn wh installs, administers, and trubleshts servers and strage systems. HP assumes yu are qualified in the servicing f cmputer equipment and trained in recgnizing hazards in prducts with hazardus energy levels.
Cntents Installing and preparing the IO Acceleratr fr Micrsft Windws SQL Server... 4 Initial setup... 4 Installing Micrsft SQL Server... 4 Additinal perfrmance tips... 4 RAID ptins... 5 RAID 0... 5 RAID 1... 5 RAID 5... 5 RAID 10... 5 High availability cnsideratins... 6 Database mirrring... 6 Multi-site clustering... 6 Backup cnsideratins... 8 General recmmendatins... 8 Testing IO Acceleratr-pwered SQL perfrmance... 9 Methdlgy... 9 Wrklad examples... 9 Architectural scenaris... 11 Scenari 1: The entire database fits n the IO Acceleratrs... 11 Scenari 2: The database is t big t fit n the IO Acceleratrs... 11 tempdb cnsideratins... 11 Index cnsideratins... 12 Frequently accessed tables... 12 Large tables... 12 Lg files... 12 Partitin tables... 12 Acrnyms and abbreviatins... 14 Cntents 3
Installing and preparing the IO Acceleratr fr Micrsft Windws SQL Server Initial setup After the IO Acceleratr is installed, fllw these steps t prepare it fr use with Micrsft SQL Server: 1. Start the HP IO Acceleratr Management Tl. 2. In the Device Tree, select the IO Acceleratr. 3. Click Frmat Lw-level. 4. In the dialg bx, select Advertised Capacity, and select a 4K blck size. 5. Select Disk Management in Windws. 6. If yu are using a RAID cnfiguratin n multiple IO Acceleratrs, cnvert the drives t Dynamic. 7. Frmat the drive fr a filesystem, setting the File Allcatin Unit Size t 64K. Installing Micrsft SQL Server NOTE: When yu install Micrsft SQL Server, install the executables, usually fund in the Prgram Files flder, t yur lcal drive rather than t the IO Acceleratr drive. Install the fllwing system databases n the IO Acceleratr: Master Tempdb MSDB Mdel If heavy paging ccurs, install the page files n the IO Acceleratr, which prvides a significant increase in perfrmance (when DRAM is available). Fr mre infrmatin, see the latest Windws user guide. Additinal perfrmance tips Have as many user database data files as there are prcessr cres in the server. This rati enables multiple threads t perate at the same time and significantly imprves the IO Acceleratr perfrmance. Keep all the data files the same size. Allw the database t use nly ne lg file. Installing and preparing the IO Acceleratr fr Micrsft Windws SQL Server 4
RAID ptins RAID 0 RAID 0 ffers the full capacity f the IO Acceleratr withut any disk-level redundancy. NOTE: Windws Sftware RAID cnfiguratins with IO Acceleratrs have nt demnstrated perfrmance deteriratin. Due t the high perfrmance ptential f the IO Acceleratrs, physical RAID cntrllers are discuraged since they might becme a perfrmance bttleneck. RAID 1 RAID 5 RAID 10 RAID 1 ffers half the raw capacity with disk-level redundancy. HP des nt recmmend cnfiguring IO Acceleratrs in RAID 5 because f the parity calculatins required t manage the RAID 5 array. Yu can use Symantec Strage Fundatin t cnfigure RAID 10 with IO Acceleratrs. Yu must have a minimum f fur IO Acceleratrs. Fr mre details, request the Symantec Strage Fundatin Cnfiguratin Guide frm yur HP representative. RAID ptins 5
High availability cnsideratins Database mirrring NOTE: Database mirrring requires Windws SQL Server 2005 r 2008. T mirrr the servers n the same lcal netwrk, HP recmmends synchrnus mirrring fr best data lss prtectin. If the servers are n different netwrks, HP recmmends asynchrnus mirrring t reduce the perfrmance impact n the primary server. NOTE: The perfrmance impact n the primary server is nt due t any IO Acceleratr inadequacy. In a synchrnus mirrring, every transactin must be cmmitted first n the mirrr server befre it is cmmitted n the primary server. This requirement can add high latency if the primary and the mirrr servers are separated by a nn-dedicated public Internet. Database mirrring ccurs at the database level s yu can chse which databases t mirrr. System databases cannt be mirrred, s yu must create scripts using SSIS t autmate the syncing f these databases. With SQL Server 2008, the transactin lg stream is autmatically cmpressed befre being sent t the mirrr server. Database mirrring als autmatically fixes any crrupted pages withut user interventin. Yu can use a witness server t keep a heartbeat and create an autmatic failver scenari. Yu can even use SQL Server Express (free versin) t act as the witness server. If an envirnment cnsists entirely f a.net cdebase, then add the fllwing cmmand t the cnnectin string t make the failver cmpletely autmatic: Failver Partner=myMirrrServerAddress; When the failver ccurs, the clients (Web servers, applicatin servers, and s n) autmatically re-pint t the mirrr server. If an envirnment cnsists f different Web servers, applicatin servers, and s n, that cannt take advantage f the cnnectin string feature, a script can be used t push alternate versins f hst files and re-map the IP address t name mapping. This script makes the mirrr server the primary server in the event f a failver. The enterprise editin f SQL Server 2005/2008 enables yu t create a read-nly snapsht n the mirrr server t be used as a standalne reprting server in additin t being a failver server. This creates an efficient SQL Server infrastructure. Multi-site clustering With Windws 2008, Micrsft ffers multi-site clustering that des nt require shared strage. As lng as the perating system is Windws 2008, the SQL Server versin can be 2005 r 2008. This feature prvides an autmatic and seamless failver framewrk. Clients talk t a virtual IP address. When ne nde ges dwn, anther ne starts. High availability cnsideratins 6
Third-party sftware is required t keep the data in sync between the different cluster ndes. HP recmmends the fllwing: DataKeeper by Steel Eye (http://www.steeleye.cm/datakeeper_cluster_editin_144.htm) Clustering Fr Mere Mrtals, Step-by-Step: Cnfiguring a 2-nde multi-site cluster n Windws Server 2008 R2 Part 1 (http://clusteringfrmeremrtals.cm/2009/09/15/step-by-stepcnfiguring-a-2-nde-multi-site-cluster-n-windws-server-2008-r2- -part-1/) Duble Take Availability (http://www.dubletake.cm/english/prducts/duble-takeavailability/pages/default.aspx) Neverfail (http://www.neverfailgrup.cm/windws-apps/sql-server-high-availability.html) The different cluster ndes can be in the same r separate lcatins. High availability cnsideratins 7
Backup cnsideratins General recmmendatins Backing up large SQL Server databases ften takes a lng time and ends up affecting the perfrmance f the primary systems. HP recmmends the fllwing fr perfrmance imprvement: If yu are using SQL Server 2008, use the built-in feature t cmpress backups. If yu are using SQL Server 2005, varius third-party tls are available t cmpress backups: LiteSpeed (http://www.quest.cm/litespeed-fr-sql-server/) SQL Backup (http://www.red-gate.cm/prducts/sql_backup/index.htm) SQL Safe Backup (http://www.idera.cm/prducts/sql-server/sql-safe-backup/) Using cmpressin fr backups has the fllwing advantages, especially when using IO Acceleratrs: Significantly reduces cmpletin time Significantly reduces drive capacity needs Blcks databases fr much smaller perids f time T realize the full perfrmance benefit f the IO Acceleratrs fr backup peratins, lad the databases n IO Acceleratrs and, at the same time, create the backup file n the IO Acceleratrs. This feature accelerates bth read and write peratins. Backup cnsideratins 8
Testing IO Acceleratr-pwered SQL perfrmance Methdlgy Generally, benchmarks such as SQLIO and imeter are used t measure the I/O prfile f the strage sub-systems. Hwever, with IO Acceleratrs, these tests ften give false results since the tests were designed fr measuring spinning disk media and d nt cmpletely prvide the perfrmance f the IO Acceleratrs. Wrklad examples HP recmmends that yu use a realistic a lad when testing the IO Acceleratr-pwered SQL Server. Fr example: 1. Restre a cpy f the prductin database nt the test IO Acceleratr server. 2. Create a prfiler trace n the prductin server fr apprximately ne hur. 3. Replay this trace n the test server. Fr the baseline frm prductin and the baseline frm test, perfrm the fllwing steps: 1. Calculate the average duratin fr SQL Statements cmpleted using the SQL Prfiler. 2. Observe the fllwing cunters using PERFMON: Prcessr % Prcessr Time Paging file % Usage [Page file Activity] SQLServer:Databases Data File(s) size (kb) [Database Activity fr tempdb] SQLServer:Databases Lg File(s) size (kb) [Database Activity fr tempdb] Physical Disk Avg. Disk sec/read [Read Latency] Physical Disk Avg. Disk sec/write [Write Latency] Physical Disk Disk Reads/sec [Read IOPS] Physical Disk Disk Writes/sec [Write IOPS] Physical Disk Disk Read Bytes/sec [Read thrughput] Physical Disk Disk Write Bytes/sec [Write thrughput] Physical Disk % Disk Read Time Physical Disk % Disk Write Time Physical Disk % Disk Time Physical Disk % Idle Time Physical Disk Average Disk Read Queue Length Physical Disk Average Disk Write Queue Length Testing IO Acceleratr-pwered SQL perfrmance 9
Physical Disk Average Disk queue Length Lgical Disk Avg. Disk sec/read [Read Latency] Lgical Disk Avg. Disk sec/write [Write Latency] Lgical Disk Disk Reads/sec [Read IOPS] Lgical Disk Disk Writes/sec [Write IOPS] Lgical Disk Disk Read Bytes/sec [Read thrughput] Lgical Disk Disk Write Bytes/sec [Write thrughput] Lgical Disk % Disk Read Time Lgical Disk % Disk Write Time Lgical Disk % Disk Time Lgical Disk % Idle Time Lgical Disk Average Disk Read Queue Length Lgical Disk Average Disk Write Queue Length Lgical Disk Average Disk queue Length These data pints prvide infrmatin n hw yur SQL Server is perfrming. If yu cannt restre yur entire database, yu can evaluate perfrmance by creating a sample database and ding the fllwing: Cnduct index maintenance. Cnduct DBCC maintenance. Cnduct full backups. Cnduct full restres. Mnitr the PERFMON cunters previusly stated while these peratins ccur. The cunters prvide a prfile f yur SQL Server perfrmance. Testing IO Acceleratr-pwered SQL perfrmance 10
Architectural scenaris Scenari 1: The entire database fits n the IO Acceleratrs 1. Place the data files n ne IO Acceleratr. NOTE: Yu can use ne IO Acceleratr r a RAID 0 set f multiple IO Acceleratrs. 2. Place the tempdb file fr bth data files and lg files, the lg files, and backup files n anther IO Acceleratr. 3. If available, give the tempdb file its wn dedicated IO Acceleratr. Scenari 2: The database is t big t fit n the IO Acceleratrs 1. If the database is t large t fit the entire database n the IO Acceleratrs, then place specific database elements that use the mst I/O resurces n the IO Acceleratrs. 2. Query the sysprcesses system table. If the waitresurce file appears as 2:1:1 (PFS Page) r 2:1:3 (SGAM Page), then yu can successfully mve the tempdb file t the IO Acceleratr. tempdb cnsideratins The fllwing SQL peratins require high perfrmance frm the tempdb file: Repeated create and drp f temprary tables (lcal r glbal). Table variables that use the tempdb file fr strage purpses. Wrk tables assciated with CURSORS. Wrk tables assciated with an ORDER BY clause. Wrk tables assciated with an GROUP BY clause. Wrk files assciated with HASH PLANS. Fr ptimal tempdb file perfrmance, use these guidelines: Dedicate a separate IO Acceleratr t the tempdb file. Create multiple tempdb data files. The number f files must be equal t the CPU cres (nt hyperthreaded). Fr example, tw Quad Cre CPUs must use eight data files, even if the CPUs are hyperthreaded. Yu must have nly ne tempdb lg file. Architectural scenaris 11
Determine the maximum size f the tempdb file yu need and then create each tempdb data file t be the same size. Turn ff aut-grw n the tempdb file. Fr mre detailed infrmatin, see the Micrsft website (http://supprt.micrsft.cm/default.aspx?scid=kb;en-us;328551). Index cnsideratins Indexes help retrieve data frm the tables, s cnsider mving all indexes t a separate file grup and then placing the file grup n an IO Acceleratr. Fr mre infrmatin, see the fllwing article n creating file grups fr indexes (http://deepakrangarajan.blgspt.cm/2008/12/mving-index-tseperate-filegrup.html). HP recmmends that yu delete indexes that are nt being used. They cause unnecessary I/O verhead. Fr mre infrmatin, see the fllwing article n detecting which indexes are being used by the database (http://blgs.msdn.cm/b/sqlserverstrageengine/archive/2007/04/20/hw-can-yu-tell-ifan-index-is-being-used.aspx). Frequently accessed tables Placing frequently accessed tables in individual file grups and then placing the file grups n yur IO Acceleratr can greatly imprve perfrmance. T identify the mst frequently accessed tables: 1. Run a prfile trace. 2. Review the stred prcedures and statements that run mst frequently. Optimize the tables accessed by these stred prcedures and statements. Large tables Lg files Large tables create an I/O bttleneck fr mst activities. Index maintenance and reads n large tables can be time-cnsuming. T relieve stress, mve large tables t a separate file grup and then place the file grup n IO Acceleratrs. Fr a methd f listing all the tables and sizes, see the fllwing article (http://searchsqlserver.techtarget.cm/tip/find-size-f-sql-server-tables-and-ther-bjects-with-stredprcedure ). Lg files cnsume a lt f write perfrmance. Every cmmitted transactin results in date being written t the lg file. IO Acceleratrs imprve sequential write perfrmance cmpared t traditinal media, s putting lg files n IO Acceleratrs imprves the speeds f cmmitting data transactins. Partitin tables Micrsft added partitin tables t SQL Server 2005 and enhanced them in SQL Server 2008. This feature enables yu t split the data in ne large table int many small tables based n certain criteria. Fr example, yu can split rder data, based n data ranges. Fr example, yu can devte ne table t Architectural scenaris 12
data fr each year. In this scenari, yu can keep the mst recent data n IO Acceleratrs and keep lder data n mre traditinal media. Architectural scenaris 13
Acrnyms and abbreviatins CPU central prcessing unit DBCC database cnsle cmmands IOPS input/utput peratins per secnd IP Internet Prtcl SQL structured query language SSIS SQL Server Integratin Services Acrnyms and abbreviatins 14