+ All Categories
Home > Documents > 6231B_02

6231B_02

Date post: 05-Jul-2018
Category:
Upload: isinkaye-akin
View: 214 times
Download: 0 times
Share this document with a friend

of 27

Transcript
  • 8/16/2019 6231B_02

    1/27

    Module 2

    Preparing Systems for

    SQL Server 2008 R2

  • 8/16/2019 6231B_02

    2/27

    Module Overview

    • Overview of SQL Server Architecture

    • Planning Server Resource Requirements

    • Pre-installation Testing for SQL Server

  • 8/16/2019 6231B_02

    3/27

    Lesson 1 Overview of SQL Server Architecture

    • SQL Server Architecture

    • !P" "sage #$ SQL Server

    • Parallelism

    • %& #it vs' () #it Servers

    • Overview of SQL Server Memor$

    • Ph$sical vs' Logical *+O

    • ,emonstration 1A !P" and Memor$ !onfigurations inSSMS

  • 8/16/2019 6231B_02

    4/27

    SQL Server Architecture

    • Quer$ .ecution La$er

    Parses and o/timi0es thequeries and manages thecaching and e.ecution ofquer$ e.ecution /lans

    • Storage ngine La$er

    Manages #uffer /ages *+Oto the /h$sical files loc2ingand transactions

    • SQL OS La$er

    Provides an a#straction la$erover common OS functions/roviding tas2 and memor$management

    SQL OS

    Query Execution

    Storage Engine

    Users

          C

         o     n      f      i     g     u     r     a      t      i     o     n

  • 8/16/2019 6231B_02

    5/27

    !P" "sage #$ SQL Server

    • 3indows uses /reem/tive scheduling of threads

    • One scheduler for ever$ logical !P" created in SQL OS

    Manages the threads retrieved from 3indows and assignstas2s to threads

    Minimi0es conte.t switches through coo/erative scheduling

    • !P" availa#ilit$ can #e configured without restart

    Schedulers can #e ena#led or disa#led

    !P" affinit$ mas2 can #e set

    Tas2s waiting on a resource are moved to a waiting list 3ait t$/e and time are recorded

    ,etails are useful for monitoring and trou#leshooting

  • 8/16/2019 6231B_02

    6/27

    Parallelism

    • SQL Server can decide to distri#ute queries to more thanone tas2

    Tas2s can run in /arallel

    Overall e.ecution is faster

    S$nchroni0ation overhead is incurred

    Parallelism is onl$ considered for e./ensive /lans

    Max degree of parallelism defines how man$ !P"s can#e used for e.ecution of a /arallel quer$

    !an #e overridden using the MA4,OP quer$ hint

    • Cost threshold for parallelism defines minimal cost forconsidering /arallel /lans

    Parallelism refers to multiple processors cooperating to execute

    a single query at the same time.

  • 8/16/2019 6231B_02

    7/27

    %& #it vs' () #it Servers

    • 5irtual Address S/ace is the memor$ that can #e allocatedto a//lications such as SQL Server

    )67 on %& #it s$stems 8&-%67 availa#le for the a//lication9

    :T7 on 4() s$stems and ;T7 on *A() s$stems

    )67 for %& #it a//lications running on 3O3 on ()#it OS

    A3 e.tension can #e used to access additional memor$on %it s$stems

    Additional memor$ can onl$ #e used for data /age caching

    • SQL Server /erformance strongl$ de/ends on memor$

    *nstalling () #it versions is /referred () #it o/tions availa#le for all editions of SQL Server

  • 8/16/2019 6231B_02

    8/27

  • 8/16/2019 6231B_02

    9/27

    Ph$sical vs' Logical *+O

    !O "ype #escription

    Ph$sical *+O

    Ph$sical *+O occurs when the requested /ageis not availa#le in 7uffer !ache and must #eread from the data file into the 7uffer !ache#efore the requested /age can #e su//lied or

    when a changed /age is written to the datafile

    Logical *+OLogical *+O occurs when the requested /ageis availa#le in the 7uffer !ache

  • 8/16/2019 6231B_02

    10/27

    ,emonstration 1A !P" and Memor$ !onfigurationsin SSMS

    • *n this demonstration $ou will see

    =ow to configure SQL Server !P" and Memor$ using SSMS

    =ow to review configuration o/tions using T-SQL

  • 8/16/2019 6231B_02

    11/27

    Lesson & Planning Server Resource Requirements

    • *ntroduction to Planning Server Resource Requirements

    ,iscussion Previous ./osure to Resource Planning• Planning !P" Requirements

    • Planning Memor$ Requirements

    • Planning ?etwor2 Requirements

    • Planning Storage and *+O Requirements

  • 8/16/2019 6231B_02

    12/27

    *ntroduction to Planning Server Resource Requirements

    • ?o eas$ formula for calculating resource requirements e.ists

    Planning involves !hec2ing with *S5 or develo/ers

    • As2 for reference installations and case studies

    • Request details of /revious e./eriences with the a//lication

    Performing tests with real live wor2loads

    Setting goals and evaluating results against them

    Planning and /redicting further grow of the wor2load and data#ase

    • Monitor the outcome after release into /roduction

  • 8/16/2019 6231B_02

    13/27

    ,iscussion Previous ./osure to Resource Planning

    • Resource Planning is an im/ortant /art of newinstallations

    3hat is $our /revious e./erience with /lanning of news$stems@

    =ow successful was the /lanning@

  • 8/16/2019 6231B_02

    14/27

    Planning !P" Requirements

    • Processor /lanning is relativel$ straightforward

    Test on a t$/ical wor2load and monitor !P" usage !P" should #e #elow % /ercent in average

    Pea2s can occur #ut should not last too long

    • More /rocessors /rovide #etter /arallelism o/tions

    Assists with large num#ers of concurrent connections

    Assists with high data warehouse loads

    • ,edicated data#ase server should use all availa#le !P"s

    Man$ new s$stems use ?"MA architecture !hec2 with hardware vendor for o/timal SQL Server configuration

  • 8/16/2019 6231B_02

    15/27

    Planning Memor$ Requirements

    • SQL Server is highl$ de/endent on memor$

    !aches hel/ to reduce *+O and !P"• ,ata cache reduces *+O

    • Plan cache reduces the need for recom/iling queries

    Memor$ to store and /rocess data is required during quer$

    e.ecution Memor$ shortage can lead to !P" and *+O /ressure

    • Plan to have enough memor$

    A#le to cache frequentl$ accessed data

    !onsider memor$ consum/tion of other services running onthe s$stem

  • 8/16/2019 6231B_02

    16/27

    Planning ?etwor2 Requirements

    • Plan and test the through/ut needed for the a//lication

    !onsider using several networ2 ada/ters

    • !onsider dedicating a networ2 connection to administrative/ur/oses

    3riting 7ac2u/s to networ2 devices

    Transferring data to other instances using SS*S

    • "se a dedicated networ2 connection when using data#asemirroring

    • !hoose and configure the networ2 /rotocols used

    !hec2 firewall configurations

    Test in a networ2 environment similar to the target /roductions$stem

  • 8/16/2019 6231B_02

    17/27

    Planning Storage and *+O Requirements

    • *+O requirements need to #e determined and tested

    !onsiderations for storage ,edicated vs' SA? #ased storage

    RA*, s$stems used

    ?um#er of s/indles involved 8often more im/ortant than dis2

    si0e9 *+O caching configuration 8dis2 and write caching9

  • 8/16/2019 6231B_02

    18/27

    Lesson % Pre-installation Testing for SQL Server

    • Overview of Pre-installation Testing

    Perform Pre-chec2s of *+O su#s$stems• *ntroducing SQL*OS*M

    • *ntroducing SQL*O

    • ,emonstration %A "sing SQL*OS*M B SQL*O

  • 8/16/2019 6231B_02

    19/27

    Overview of Pre-installation Testing

    • Planning and testing is strongl$ cou/led

    • After the first /lanning /hase tests must #e /erformed

    !hec2 if the /redictions made are met

    !hange the /redictions #ased on the results

    !hec2 if the goals set in the /lanning /hase are fulfilled

    • Test different configurations involving

    Storage and *+O la$out

    Memor$ !P" and ?etwor2 configurations

    • ,ocument ever$ test run for later use

  • 8/16/2019 6231B_02

    20/27

    Perform Pre-chec2s of *+O su#s$stems

    • Test different *+O t$/es and si0es

    Small random reads and write on data files for OLTP s$stems

    Larger sequential reads and writes for OLAP s$stems

    Sequential writes for log storage

    • Test with different num#ers of files involved

    "se test files that are similar to $our target configuration

    • ,etermine the saturation /oint of an *+O su#s$stem #$ graduall$increasing the load

    5alidate results against e./ected outcome 7ased on the goals $ou set

    !hec2ed against the /otential *+O ca/a#ilities of the s$stem

  • 8/16/2019 6231B_02

    21/27

    *ntroducing SQL*OS*M

    • "nsu//orted tool /rovided #$ Microsoft to test the functionalcorrectness of storage s$stems'

    • !an #e run through command line and and 6"*

  • 8/16/2019 6231B_02

    22/27

    *ntroducing SQL*O

    • "nsu//orted tool /rovided #$ Microsoft to test the /erformanceof storage s$stems'

    • !ommand line tool that can #e configured to s/ecific *+O Pattern

  • 8/16/2019 6231B_02

    23/27

    ,emonstration %A "sing SQL*OS*M B SQL*O

    • *n this demonstration $ou will see how to

    !onfigure SQL*OSim to stress test a server Test different *+O /atterns using the SQL*O utilit$

  • 8/16/2019 6231B_02

    24/27

    La# & Pre/aring S$stems for SQL Server

    • .ercise 1 Ad

  • 8/16/2019 6231B_02

    25/27

    La# Scenario

    Eou have reviewed the additional instance of SQL Server' As$stem administrator at Adventure3or2s has e./ressedsome concerns that the e.isting server ma$ not haveenough memor$ or *+O ca/acit$ to su//ort this new SQLServer instance and is reviewing a new *+O su#s$stem' Asthe data#ase administrator $ou need to review theavaila#le server memor$ and the memor$ allocated to each

    of the e.isting SQL Server instances' Eou need to ensurethat the *+O su#s$stem of the new server is ca/a#le ofrunning SQL Server and the required wor2load correctl$'

  • 8/16/2019 6231B_02

    26/27

    La# Review

    • 3h$ is running SQL*OSim on the 5M difficult@

    Should $ou use SQL*OS*M or SQL*O to test the/erformance of a s$stem with :>7 random reads@

  • 8/16/2019 6231B_02

    27/27

    Module Review and Ta2eawa$s

    • Review Questions

    7est Practices