Virtualization and SAN Basics for DBAs
Upcoming SlideShare
Loading in...5

Virtualization and SAN Basics for DBAs






Total Views
Views on SlideShare
Embed Views



3 Embeds 19 10 5 4



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • How big should our guest be? How many cores should we allocate? How much memory? How much storage?
  • For a two-CPU VM, Vmware found just an 8% CPU overhead.CPUs are constantly getting fasterHow many of you believe that? Well, the reason you don’t believe it is because you’re probably not doing it right.
  • When C needs CPU power, he’s slowing down A & B.Do we allow A&B to run single-CPU operations on CPU 2 while C runs?
  • Less is more - single processor everywhere. Always easy to go up if you really need it.Good practice for SQL licensing anyway.It’s not about getting as many CPUs as you can – it’s about succeeding in the virtual environment.Every tick – remove anything that burns CPU, including screensavers
  • Freed up = balloon driver
  • It LOOKS like an array to you, but it’s really just a file on another array. Here’s a screenshot…
  • This is just one volumeProblem is exacerbated with today’s huge hard drivesGotta monitor IO 24/7It’s not just the performance of the drives – it’s also how you ACCESS the drives
  • Your guest can move from host to host at any timeOther guests can pile on to your hostHost configurations can change without you knowingCPU & memory testing is almost meaningless as long as you’re sharing hosts
  • How many of you have cable modems or DSL?How much does it cost you per month?I bet you’ve run speed tests to find out how fast it is, right?
  • Good news is that your SAN admin can change RAID methods, cache settings, all kinds of things to improve performance
  • We need something to measure with – what runs every day, and we keep a history of it?Backup job times.

Virtualization and SAN Basics for DBAs Virtualization and SAN Basics for DBAs Presentation Transcript

  • VMs, SAN, SQL:The Big Threes
    Brent OzarQuest Software
    Photo Licensed with Creative Commons From
  • I’m Your Host: Brent Ozar
    Microsoft Certified Master
    SQL Server MVP
    Quest Software
    Past Lives: DBA, SAN, VMware admin
    Twitter: @BrentO
  • Today’s Big Threes
    3 “Nevers” for VMs
    3 “Always” for SAN
    3 Metrics for Both
    Photo Licensed with Creative Commons From
  • Some Definitions
  • Our Host
    2 Sockets4 Cores Each
    64GB RAM
    1 Terabyte SAN
    Photo Licensed with Creative Commons From
  • The Brochure Says…
  • CPU Scheduling
  • CPU Scheduling
  • CPU Scheduling
  • Not So Fast!
  • Never OverallocatevCPUs
    Less is More
    Every Tick Matters
    Minimize CPU Work
    Don’t Be Strict
    Photo Licensed with Creative Commons From
  • So What About Memory?
    Host: 64GB
    Guest: 16GB
    Other Guests: 32GB
    Photo Licensed with Creative Commons From
  • So What About Memory?
    Host: 64GB
    Guest: 16GB
    Other Guests: 80GB
    Photo Licensed with Creative Commons From
  • How Hypervisors Cope
    Host page file
    Dedupe memory(page sharing)
    Keep guest OSmemory freed up
    Learn more inmy bookmarks:
    Photo Licensed with Creative Commons From
  • Never Use Automatics
    Set SQL Server’s min/max memory
    Set VMware’s reservation size
    Use locked pagescarefully
    Photo Licensed with Creative Commons From
  • Physical Storage Setup
  • In Virtualization…
  • Behind the Curtain
  • Behind the Curtain
  • Think You’re Alone?
  • Never Assume VMs are Alone
    Guests move
    Guests get created
    Competition: virus scans, scheduled tasks, backups
    Photo Licensed with Creative Commons From
  • Always Know Your Neighbors
    Same disks
    Same cache
    Same controller
    Same SAN
    Usage pattern?
    Scheduled jobs?
    Photo Licensed with Creative Commons From
  • Design Storage as a Whole
    Backup schedules
    Backup methods
    Backup targets
    Use differentials
    Stagger job times
    Reconfigure antivirus
  • Typical SAN Components
    • Drive enclosures
    • Controllers (& Cache)
    • Switch networks
    • Host Bus Adapters
    • HBA Drivers
    • Servers
  • Lots of Paths for Data
  • What Does Active/Active Mean?
    One path per LUN
    Sending vs receiving
    Network design
    Post-failover stickiness
  • Got High Speed?
  • So You Tested This Too, Right?
    Photo Licensed with Creative Commons From
  • Always Test First with SQLIO
    Doesn’t use SQL Server
    Doesn’t mimic SQL Server
    Doesn’t return SQL metrics
    Therefore: SAN guys love it!
  • The Easy Way
  • SQLIO Results
    E:Program Files (x86)SQLIO>sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat
    sqlio v1.5.SG
    using system counter for latency timings, -1361967296 counts per second
    2 threads writing for 120 secs to file M:Testfile.dat
    using 64KB random IOs
    enabling multiple I/Os per thread with 1 outstanding
    buffering set to use hardware disk cache (but not file cache)
    using current size: 24576 MB for file: M:Testfile.dat
    initialization done
    throughput metrics:
    IOs/sec: 1539.50
    MBs/sec: 96.21
    latency metrics:
    Min_Latency(ms): 0
    Avg_Latency(ms): 0
    Max_Latency(ms): 572
    ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
    %: 66 32 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  • Good Numbers, Bad News
    1GB = 125 MB/sec
    10GB = 1250 MB/sec
    Fibre Channel:
    2GB = 250 MB/sec
    4GB = 500 MB/sec
  • Which Causes An Outage?
    New neighbors
    RAID restripe
    Drive failure
    Cable change
    Firmware change
    Switch upgrade
    Controller reboot
    Photo Licensed with Creative Commons From
  • Where Will You See Changes?
    Windows event log
    SQL Server logs
    Profiler traces
    Net Send popups
    Your dreams at night
  • Always Be Checking
    Photo Licensed with Creative Commons From
  • My 3 Favorite Metrics
    Physical Disk: Avg Sec/Read and Write
    System: Processor Queue Length
    SQL Server Memory: Page Life Expectancy
  • It’s Not All Bad News!
    Easier scaling
    Less firmware outages
    No leased hardware cycles
    Easier disaster recovery
    Easier dinosaur handling
  • Wrapping It Up
    Virtualization Nevers:
    Use automatics
    Assume your VM is alone
    SAN Always’s:
    Know your neighbors
    Test first with SQLIO
    Be checking
  • Our Book
    RML Utilities
  • Our Authors
    Christian BoltonMVP, MCM, MCAFormer Microsoft PFE
    Justin LangfordFormer MS PFE
    Brent OzarMCM, MVP
    James Rowland-JonesMVP, EMC Consulting
    Steven WortMicrosoft Developer
  • Paperbacks & PDF