Tales from the Trenches About Me @shawsql .

30

Transcript of Tales from the Trenches About Me @shawsql .

Page 1: Tales from the Trenches About Me @shawsql .
Page 2: Tales from the Trenches About Me @shawsql .

Virtualizing SQL ServerTales from the Trenches

Page 3: Tales from the Trenches About Me @shawsql .

About Me

@shawsql

www.dbaexperience.wordpress.com

Page 4: Tales from the Trenches About Me @shawsql .

What We’ll Talk About

• How Did We Get Here?

• Problems

• Questions to Ask

• Myths

Page 5: Tales from the Trenches About Me @shawsql .

Pre-Virtualization

Includes TIER 1, TIER 2 and TIER 3 Servers

• Large Healthcare Company

• Multiple Hospitals and Clinics

• Small Datacenter

• New Datacenter

• 40,000 + Users

• 350+ Physical Servers

• 2500+ Windows Servers

Page 6: Tales from the Trenches About Me @shawsql .

Pre-Virtualization

Mood was skeptical and moral was low

• Timeline: < 6 Months

• Input: 0

• Outsourced P2V

Page 7: Tales from the Trenches About Me @shawsql .

What is Virtualization

Hardware AbstractionPooled Resources

Page 8: Tales from the Trenches About Me @shawsql .

Virtualization Effects

Resources Significantly ReducedNo Customer or Vendor Buy-inFear, Skepticism, ParanoiaStruggle to Handle DR and HA Environment

We scrambled to understand the environment

Page 9: Tales from the Trenches About Me @shawsql .

What Did We Do?

Page 10: Tales from the Trenches About Me @shawsql .

Performance Monitoring

It is all about looking at the BIG picture

SANNetwork

VM SQL

vCPU

pCPU

vRAM

pRAM Host

%RDY

%USED

deviceLatency

RDM

Page 11: Tales from the Trenches About Me @shawsql .

Performance Monitoring“When SQL Server is running in a virtual environment, any time-based measurements reported with SQL Server monitoring tools or Windows Perfmon may be inaccurate if the host machine resources are over-committed” Wanda He http://blogs.vmware.com/apps/2011/03/monitor-sql-server-performance-on-vmware.html

1.Identify bottleneck using standard SQL Server tools2.Correlate bottleneck issues using VM specific tools

Page 12: Tales from the Trenches About Me @shawsql .

Performance Monitoring

• Swapped Memory• Ballooned Memory• Reservation• Configured• Consumed (Touched)• Active

Memory

CPU• Ready Time

Page 13: Tales from the Trenches About Me @shawsql .

WARNING!!!!

Hardware vendors will want to sell you their SQL Server backup products.

REALITY?

Backup and Recovery

Page 14: Tales from the Trenches About Me @shawsql .

Backup and Recovery• Defend the Backup Solution Easiest

for Your Team to Manage• Work with the SAN Team to Optimize

Storage• Realize Backup Times Can be Longer• Understand Your Backup Retention

Plan (and Explain this to your Customer)

Page 15: Tales from the Trenches About Me @shawsql .

Responsibilities• SAN

• Servers

• Virtual Infrastructure

• Backup and Recovery

• Storage

• Operations

• Architecture

WHO DO I GO TO FOR HELP?

Page 16: Tales from the Trenches About Me @shawsql .

ResponsibilitiesDon’t Hesitate to Ask for Help in the Following Areas

• Storage and IO provisioning• VM Host monitoring• SAN latency issues• Server provisioning and template design• Backup and Recovery implementation• Licensing

Page 17: Tales from the Trenches About Me @shawsql .

Licensing

• SQL 2008 DO count hyper-threading. • SQL 2012 DO NOT count hyper-

threading• License physical sockets or VMs• License mobility• Software Assurance• Disaster recovery (90 day rule)• Cloud licensing is different (EAP)

Page 18: Tales from the Trenches About Me @shawsql .

What Would We Do Differently?

Page 19: Tales from the Trenches About Me @shawsql .

Questions: Pre-Virtualization

Who is in charge of conversion. Who are the contacts when things go wrong?

Who is responsible for user testing after conversion?

What will be the policy concerning existing physical clusters?

Are there any systems which will NOT be converted?

Physical to Virtual Conversion

Page 20: Tales from the Trenches About Me @shawsql .

Questions: Pre-Virtualization

Will our normal backup routines change? Will new hardware vendor products be introduced for backing up SQL Server (SnapManager, Avamar, Syncsort)?

Can the SAN handle our current backup processes? Will there be enough space for backups?

How long will backups be kept? Will backups be stored offsite?

Will the DBA team still be responsible for SQL Server backups?

Backup and Recovery

Page 21: Tales from the Trenches About Me @shawsql .

Backup and Recovery

You will have options

Questions: Pre-Virtualization

• Snapshots?• NAS?• Local Drives?• Full Backups or Differential Backups?• 3rd Party or Native?

Page 22: Tales from the Trenches About Me @shawsql .

Performance Monitoring

DON’T LET THE SAN BECOME A BLACK BOX

Questions: Pre-Virtualization

• Will the DBA team have access to VM monitoring tools?

• Will there be a budget to add VM monitoring tools for the DBA team (Ignite VM)?

• How is the SAN configured (disk speed, array configuration, tiering?)

• What options will be used in VM? Thin provisioning? Ballooning? Reserved space?

Page 23: Tales from the Trenches About Me @shawsql .

Questions: Pre-VirtualizationResponsibilities

Don’t get blamed for performance problems caused by infrastructure you have no control over.

• What are the SAN storage constraints? Will I be given more storage if needed?

• Who do I contact for additional vCPU or vRAM allocations?

• Who do I contact for questions concerning VM performance?

• Who is responsible for communicating to the customer questions about the VM architecture?

• Think about test environments. Will these change?

Page 24: Tales from the Trenches About Me @shawsql .

Virtualization MythsMYTH 1: You are guaranteed to have worse performance

FALSE. Snapshots and templates tend to increase the amountof storage necessary in a VM environment.

FALSE. VM does cause a slight performance overhead (8-15%) but thisis usually offset by faster hardware.

MYTH 2: Virtualization will make your job easier

FALSE. VM will make some parts of your job easier but complicatesother parts.

MYTH 3: Virtualization results in storage savings

Page 25: Tales from the Trenches About Me @shawsql .

Virtualization MythsMYTH 4: All applications will work on VM

TRUE. Windows clusters tend to be redundant in a virtual environment.

PARTIALLY. I know of no application that would specifically fail becauseit is virtualized. Still, large systems like DW may not function to expectations

MYTH 5: Performance monitor and other tools are useless in VM

FALSE. They are not useless. Just be more skeptical of the results and comparethem with VM monitoring tools.

MYTH 6: Windows clustering is largely unnecessary in VM

Page 26: Tales from the Trenches About Me @shawsql .

Virtualization Myths

MYTH 7: Adding additional vCPU will make your vm proportionally faster

FALSE. 1-2 vCPU performs at 92% of native, 4 and 8 vCPU performs at88% to 86% of native.

MYTH 8: Virtualization changes your backup strategy

PARTIALLY. Some of these choices are based on your SAN. Some are based on your recovery requirements. None of them are based off virtualization.

Page 27: Tales from the Trenches About Me @shawsql .

Best Practices Use latest version of vSphere (4+). Be aware

of licensing changes in vSphere 5 Group databases with same access patterns

onto the same host. Make sure physical memory on the host is

adequate to meet the needs of all virtual machines

If using the balloon driver and locked pages in memory, be sure to set the reservation equal to the amount of memory set in the virtual machine

Use iSCSI 10GB or Fibre Channel. Do not use SATA or 1 GB iSCSI

Understand licensing in a virtual environment

Page 28: Tales from the Trenches About Me @shawsql .

Other Thoughts

Server SprawlVendorsResources – More is NOT BetterLicensing, licensing, licensing

Page 29: Tales from the Trenches About Me @shawsql .

References

Microsoft SQL Server on VMWare Best Practices Guide (good section on RDM vs. VMFS) http://www.vmware.com/files/pdf/sql_server_best_practices_guide.pdf

DBA Guide to Databases on VMWare http://www.vmware.com/files/pdf/solutions/VMware-DBA-Guide-to-Databases-03-11.pdf

Microsoft Licensing Guide for SQL Server http://download.microsoft.com/download/6/F/8/6F84A9FE-1E5C-44CC-87BB-C236BFCBA4DF/SQLServer2008_LicensingGuide.pdf

Page 30: Tales from the Trenches About Me @shawsql .

QUESTIONS?