VMs, SAN, SQL:The Big Threes<br />Brent OzarQuest Software<br />Photo Licensed with Creative Commons From http://www.flick...
I’m Your Host: Brent Ozar<br />Microsoft Certified Master<br />SQL Server MVP<br />Quest Software<br />Past Lives: DBA, SA...
Today’s Big Threes<br />3 “Nevers” for VMs<br />3 “Always” for SAN<br />3 Metrics for Both<br />Photo Licensed with Creati...
Some Definitions<br />
Our Host<br />2 Sockets4 Cores Each<br />64GB RAM<br />1 Terabyte SAN<br />Photo Licensed with Creative Commons From http:...
The Brochure Says…<br />
CPU Scheduling<br />
CPU Scheduling<br />
CPU Scheduling<br />
Not So Fast!<br />
Never OverallocatevCPUs<br />Less is More<br />Every Tick Matters<br />Minimize CPU Work<br />Don’t Be Strict<br />Photo L...
So What About Memory?<br />Host: 64GB<br />Guest: 16GB<br />Other Guests: 32GB<br />Photo Licensed with Creative Commons F...
So What About Memory?<br />Host: 64GB<br />Guest: 16GB<br />Other Guests: 80GB<br />Photo Licensed with Creative Commons F...
How Hypervisors Cope<br />Host page file<br />Dedupe memory(page sharing)<br />Keep guest OSmemory freed up<br />Learn mor...
Never Use Automatics<br />Set SQL Server’s min/max memory<br />Set VMware’s reservation size<br />Use locked pagescarefull...
Physical Storage Setup<br />
In Virtualization…<br />
Behind the Curtain<br />
Behind the Curtain<br />
Think You’re Alone?<br />
Never Assume VMs are Alone <br />Guests move<br />Guests get created<br />Competition: virus scans, scheduled tasks, backu...
Always Know Your Neighbors<br />Same disks<br />Same cache<br />Same controller<br />Same SAN<br />Ask:<br />Usage pattern...
Design Storage as a Whole<br />Backup schedules<br />Backup methods<br />Backup targets<br />Use differentials<br />Stagge...
Typical SAN Components<br /><ul><li>Drive enclosures
Controllers (& Cache)
Switch networks
Host Bus Adapters
HBA Drivers
Servers</li></li></ul><li>Lots of Paths for Data<br />
What Does Active/Active Mean?<br />One path per LUN<br />Sending vs receiving<br />Network design<br />Post-failover stick...
Got High Speed?<br />
So You Tested This Too, Right?<br />Photo Licensed with Creative Commons From http://www.flickr.com/photos/tophost/2247031...
Always Test First with SQLIO<br />Doesn’t use SQL Server<br />Doesn’t mimic SQL Server<br />Doesn’t return SQL metrics<br ...
The Easy Way<br />
SQLIO Results<br />E:Program Files (x86)SQLIO>sqlio -kW -t2 -s120 -dM -o1 -frandom -b64 -BH -LS Testfile.dat<br />sqlio v1...
Good Numbers, Bad News<br />iSCSI<br />1GB = 125 MB/sec<br />10GB = 1250 MB/sec<br />Fibre Channel:<br />2GB = 250 MB/sec<...
Which Causes An Outage?<br />New neighbors<br />RAID restripe<br />Drive failure<br />Cable change<br />Firmware change<br...
Where Will You See Changes?<br />Windows event log<br />SQL Server logs<br />Profiler traces<br />Net Send popups<br />You...
Always Be Checking<br />Photo Licensed with Creative Commons From http://www.flickr.com/photos/buro9/298998173/<br />
My 3 Favorite Metrics<br />Physical Disk: Avg Sec/Read and Write<br />System: Processor Queue Length<br />SQL Server Memor...
It’s Not All Bad News!<br />Easier scaling<br />Less firmware outages<br />No leased hardware cycles<br />Easier disaster ...
Wrapping It Up<br />Virtualization Nevers:<br />OverallocatevCPUs<br />Use automatics<br />Assume your VM is alone<br />SA...
Upcoming SlideShare
Loading in …5
×

Virtualization and SAN Basics for DBAs

1,939 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,939
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
84
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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 &amp; B.Do we allow A&amp;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 &amp; 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

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

    ×