Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Virtualization for DBA


Published on

Presentation the the Northern Virginia SQL Server Users group on June 25, 2012

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Virtualization for DBA

  1. 1. Virtualization for DBAsJoey D’AntoniJune 27, 2012Northern Virginia SQL Users Group
  2. 2. About Me  Senior SQL Server DBA at Comcast  Blog:  Twitter @jdanton  Email 6/26/20122 | Footer Goes Here |
  3. 3. Virtualization Major Players Terms Costs and Benefits Technology Optimizing SQL for a Virtual Environment Summary
  4. 4. Major Virtualization Players
  5. 5. It seemed like a good idea at the time…
  6. 6. Server Room Sprawl Server sprawl SQL sprawl Power and Cooling Issues in DCs Broader availability of SAN storage
  7. 7. Terminology Guest—The virtual server running underneath the physical host and hypervisor (instance of an Operating System) Host—The physical server that your virtual machines run on Hypervisor—The underlying software that performs the load balancing and sharing of resources between guest operating systems
  8. 8. Terminology (cont’d) Thin Provisioning—Allowance in virtual environments to overallocate physical resources (more to come later) Deduplication—Process of compressing memory/disk space by saving only one copy of common bits vMotion/LiveMigration—Process which moves guest OS’s from host with high resource utilization to lower. Also an HA function with the hypervisor
  9. 9. Terminology (cont’d) Snapshot—A full point in time backup of your guest OS (very handy for upgrades/patches/code releases) Cloning—The process of building a gold guest image in order to rapid deployment
  10. 10. Costs VMWare isn’t cheap  Licensing about $25k per server for a Enterprise plus on a decent sized server  Licensing changed from CPU—to CPU with memory grants, allowed 96 GB per CPU license Hyper-V  Included with your Windows Server Licenses (amount of VMs vary based on edition)  SCOM, while not required is recommended
  11. 11. Benefits of Virtualization Lower cooling and power Higher utilization of hardware Can be used for HA configurations Rapid Deployment of new environments Use Gold Standard servers and rollout SQL Server Licensing Snapshots
  12. 12. How this works… HostOne Physical Server Hypervisor Guest Guest Guest
  13. 13. What does the hypervisor do? Manages resources between guest O/S Memory management Backups Failover and DR
  14. 14. VMWare Architecture
  15. 15. Snapshots
  16. 16. HA and DR
  17. 17. Typical Hardware Virtualization hosts are the typical servers you might run SQL Server on. 2 x 4-6 core processors (Dual socket servers represent 80% of install base) A Lot of RAM
  18. 18. Thin Provisioning Allows over allocation of resources Increases storage provisioning Management console allows for easy management of this along with SAN NOT GOOD FOR PRODUCTION DB SERVERS!!!
  19. 19. Shared Environment vs DedicatedEnvironment
  20. 20. Multi-Tenant Environments This can make monitoring and baselining your server more challenging You will want to have open communications with your VM administrators Ask for view access into VCenter—it will show you what else is going on in the environment
  21. 21. CPUs Can be over allocated Use servers with the newest chips—they are optimized for Virtual Workloads Maintain 1:1 ratio of physical cores to vCPU for production boxes For production workloads you may want to dedicate CPUs to the machine
  22. 22. Memory Management Memory can be over allocated (but don’t do it for production!!!) Hypervisor handles it by de-duplicating memory. Host Page Files
  23. 23. Balloon Driver
  24. 24. Balloon Driver When hosts comes under memory pressure, VMWare reclaims memory from guests
  25. 25. Storage
  26. 26. I/O Concerns Two choices of file types—VMFS (VMWare File System) and RDM (Raw Device Mapping) Performance between two is similar RDM is required for clustering VMFS generally more flexible Use Shared Storage (SAN) to get HA and DR functionality
  27. 27. I/O Concerns Partition alignments still matters < Windows 2008 Work with storage team to monitor I/O— Hypervisors can have strange I/O patterns
  28. 28. Datastores• It can be easy to overwhelm storage if not enough storage devices are presented• Modern SANs tend to be designed with this in mind
  29. 29. Windows Server 2012 Introduces concept of ―Storage Spaces‖ Allows storage to be pooled and shared between multiple VM hosts Can be created from non Microsoft platforms
  30. 30. Storage Spaces
  31. 31. Virtual Server
  32. 32. Virtualizing SQL Server Use Trace Flag –T834—large pages enabled Set min and max memory—this will lock SQL’s memory to prevent possible balloon driver impact Also reserve memory in HyperVisor for Prod Servers Follow the same storage best practices you would for a physical box (Separate TempDB, Data, Logs) Test out I/O performance before beginning
  33. 33. Monitoring SQL Server From the server perspective everything stays the same Everything may not match at times Ask for access to the vSphere client!  It’s the only way to have an overview into the broader system
  34. 34. Performance Issues Troubleshoot as you normally would, then check VMWare Similarly with a SAN—try to identify what you apps are sharing your resources Can adjust load on the fly by using vMotion (or Live Migration)
  35. 35. Summary Virtualization is the future, and the future is now! Virtual servers work from a shared resource pool and that can impact your workloads Identify changes you need to make to your SQL Servers for Virtual Environments Get access to your virtualization management layer
  36. 36. Questions?
  37. 37. Contact Info Twitter: @jdanton Email: Blog (slides):