The have no fear guide to virtualizing databases
-
Upload
solarwinds -
Category
Technology
-
view
325 -
download
1
Transcript of The have no fear guide to virtualizing databases
![Page 1: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/1.jpg)
Have No Fear! Virtualize Your Database
Environment with Confidence
By Robert Mandeville
Director, Technical Support
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
![Page 2: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/2.jpg)
Who Am I?
» Robert Mandeville
» Manager, Technical Support [email protected]
15+ Years in SQL Server, Postgres, MySQL & Oracle
DBA and Developer
![Page 3: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/3.jpg)
Agenda
» Virtualization Terms and Concepts
» Best Practices for Monitoring Databases on Virtualized Platforms: Memory
CPU
Storage
Network
» Summary
![Page 4: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/4.jpg)
Why Virtualize?
» Too much physical horsepower Most physical resources are drastically underutilized
Many are running at <10% CPU
Before Virtualization - Pictures
After Virtualization - Pictures
![Page 5: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/5.jpg)
Typical SMB “Datacenter”
5
» 50+ small machines
![Page 6: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/6.jpg)
Server Utilization
» All machines are severely under-utilized
» Most machines running at 1-5% CPU
![Page 7: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/7.jpg)
Typical SMB New “DataCenter”
» Here is what we virtualized everything to.
![Page 8: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/8.jpg)
New VMware Server Utilization
» New utilization of larger servers We still have a lot of room
8
![Page 9: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/9.jpg)
Why Virtualize?
» Easier to manage fewer physical boxes Manage physical resources on 2, 4 or 8 physical machines vs. 50-
100 small boxes
vMotion enables automatic resource balancing
» Cheaper More bang for the buck with bigger machines
Increased power efficiency
Less floor space
![Page 10: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/10.jpg)
Databases on VMware
» VMs are typically supported by Database Vendors If you have problems, vendor may ask you to reproduce on physical
hardware
No bugs in any vendor support site related to VMware
» VMware benchmark on I/O intensive instances http://www.vmware.com/files/pdf/benchmarking_micrsoft_sql_vmw
are_esx_server_wp.pdf
Spoiler Alert! The benchmark test as run by Brocade concludes that you can run SQL Server OLTP type instances on VMs and even get consolidation from it
» Deploying databases on VMware is very similar to using physical servers Monitoring the whole stack will take some change
![Page 11: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/11.jpg)
VMware Architecture
» Picture courtesy of VMware
![Page 12: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/12.jpg)
VMware Clusters
May be required to license all physical machines of cluster for the database
![Page 13: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/13.jpg)
Terms and Concepts
» ESX and ESXi – the hypervisor and foundation for VMware products
» Physical Host – underlying hardware where ESX is installed
» Virtual Machine (VM) – container inside host that looks like a physical machine
» vCenter Server – centralized management
» vSphere Client – Admin and Monitoring
![Page 14: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/14.jpg)
Concepts - Cluster
» Cluster – several physical hosts linked together
» vMotion – live migration of VM from one host to another –no loss of connectivity
» Distributed Resource Scheduler (DRS) – can automatically make sure hosts in a cluster have a balanced workload –uses vMotion
» High Availability (HA) – automated restart of VMs after host failure – several minutes of downtime
» Fault Tolerance (FT) – a mirrored copy of a VM on another host – takes over with no downtime
» Consolidated Backup – (VCB) – integrates with several 3rd
party tools to backup a snapshot of the VM
![Page 15: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/15.jpg)
Monitoring - vSphere
» Get access to vSphere client Need a user account
http://<machine> - provides download link
» Why should I use vSphere? Standard O/S Counters may be wrong!
![Page 16: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/16.jpg)
VMware Perfmon Counters
Special PerfmonCounters on Windows VMs
![Page 17: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/17.jpg)
vSphere – Host Summary
![Page 18: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/18.jpg)
vSphere – Host Performance
![Page 19: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/19.jpg)
vSphere – VM Summary
![Page 20: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/20.jpg)
vSphere – VM Performance
![Page 21: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/21.jpg)
Memory Concepts
» Configured – amount of RAM given to VM
» Reservation – guarantees amount of RAM (default 0) A reservation of 2GB means 2GB of physical memory must be available to
power on the VM
» Limit – limits amount of RAM (default unlimited)
» Shares – priority of getting RAM
» Ballooning – unused memory that was given back for use on other VMs
» Swapping – memory (could be active) given back forcibly for use on other VMs
» Shared Memory – identical memory pages are shared among VMs
![Page 22: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/22.jpg)
VM Memory Utilization
» How does memory allocation work
![Page 23: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/23.jpg)
VM Memory Details
![Page 24: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/24.jpg)
Host Memory Utilization
![Page 25: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/25.jpg)
O/S Counter Problem
25
This is what the O/S thinks, but it is based on 6GB. Because of 2GB limit, the correct utilization is 83%
![Page 26: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/26.jpg)
Database Tips with Memory
» Set Memory Reservation >= Database Memory If limits are used, do not exceed this amount for DB
Leave room for O/S and other things
» Be careful about overcommitting in production Can be less careful in dev/test/stage where performance is less critical
» Set CPU/MMU Virtualization to Automatic Use hardware assisted memory management if you can
» Large Pages are Supported in VMware
![Page 27: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/27.jpg)
Charts in vSphere
![Page 28: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/28.jpg)
Monitoring - Memory
» Primary Metric – Swapping, Ballooning
» Secondary Metrics – VM & Host Memory Utilization, VM Memory Reservation, VM Memory Limit
» Rules If Any Swapping is occurring
• Host needs more memory because it cannot satisfy current demands
• Lessen demands for memory – lower reservations where possible
Excessive Ballooning• May be ok for now, but could become an issue as demands for memory increase
VM Memory Utilization High• May not be a problem now unless Guest O/S swapping is occurring
• If VM is limited, may want to increase memory this VM can get
If Host Memory Utilization High• May not be a problem now if no swapping or ballooning
• Could be a problem soon for all VMs on this host
![Page 29: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/29.jpg)
CPU Concepts
» Configured – Number of vCPU Think in terms of clock speed (# vCPU * GHz)
» Reservation – amount of CPU guaranteed
» Limit – limits the amount of CPU
» Shares – sets priority for this VM
» Databases are not typically CPU bound Use only the vCPUs required
If not known, start with 1 or 2 and increase later
vSphere attempts to co-schedule CPUs
If you have 4 vCPU, 4 physical cores need to be available to start processing
This is handled much better in ESX 4.x
![Page 30: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/30.jpg)
VM CPU Utilization
» How does CPU allocation work
![Page 31: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/31.jpg)
VM CPU Utilization
» How does CPU allocation work
![Page 32: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/32.jpg)
VM CPU Details
32
![Page 33: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/33.jpg)
CPU Metrics
» Primary Metric – VM Ready Time
» Secondary Metrics – VM CPU Utilization, Host CPU Utilization
» Rules If VM Ready Time > 10-20%
• If Host CPU Utilization is high => Need more CPU resources on Host
• If Host CPU Utilization ok => VM is limited, give more CPU resources
If VM CPU Utilization high (sustained over 80%)• May not be a problem now if no ready time
• could be a problem soon for this VM
If Host CPU Utilization high (sustained over 80%)• May not be a problem now if no ready time on any VM
• Could be a problem soon for all VMs on this host
• Balance VM resources better
![Page 34: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/34.jpg)
Storage Concepts
» The VM is a set of files on shared storage
» All nodes of cluster will access the same storage
» VMFS - VMware File System
» Datastore – access point to storage
» Storage issues are usually related to configuration and not capabilities of ESX
» Follow best practices from storage vendor
» Create dedicated datastores for databases More flexibility
Bad SAN planning cannot be fixed by datastores
Isolate data and log activity
![Page 35: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/35.jpg)
Monitoring - Storage
» Primary Metrics – Host maxTotalLatency, Host Device Latency (by device), VM Disk Commands Aborted, VM Command Latency
» Secondary Metrics – Host Disk Read Rate, Host Disk Write Rate, VM Disk Usage Rate
» Rules If Host Latency >= 20-30 ms
• Review Device Latencies to understand which one has latencies
• Review Disk Read / Write rates
• If Close to Storage Capacity - Overloaded Storage
• Otherwise - Slow Storage
If VM Command Latency >= 30ms only for your VM• Tune Disk I/O intensive processes on database
• Are Memory / CPU issues causing I/O problems
![Page 36: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/36.jpg)
Network Concepts
» vSwitch – software switch inside Vmkernel Can be tied to 1 or more NICs
Allows same protocol communication for VMs on same physical host
» VMware can handle > 30GB / sec
» Databases are not typically network constrained
![Page 37: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/37.jpg)
Monitoring - Network
» Primary Metric – Dropped Receive Packets, Dropped Transmit Packets
» Secondary Metrics – Network Rate
» Rules If any packets are being dropped
• Look for errors on the Host’s NIC
• See if one NIC is getting all traffic
• Understand which VM is causing the most traffic and reduce it
If Network Rate is getting close to maximum for hardware• Understand which VM is causing load
• May need to get better network hardware
![Page 38: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/38.jpg)
vSphere Shortcomings
» Too much information 100s of counters – no indication of importance
» Not enough detailed data Keeps details only for a day by default – rolls to hourly
Expand this and GUI performance becomes issue
» GUI performance vSphere is slow and frustrating at times
» Graphs are isolated Can only see one type of chart at a time
Hard to mix Memory, CPU, Storage, etc
![Page 39: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/39.jpg)
DPA with VM Option
![Page 40: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/40.jpg)
![Page 41: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/41.jpg)
![Page 42: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/42.jpg)
![Page 43: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/43.jpg)
![Page 44: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/44.jpg)
![Page 45: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/45.jpg)
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Resolve database performance issues fast
» Try Database Performance Analyzer FREE for 14 days
» Improve root cause of slow performance Identify issues that impact end-user response time
Isolates root cause in just four clicks
See historical trends over days, months, and years
Understand impact of virtualization
Agentless architecture with less than 1% load, installs in minutes
www.solarwinds.com/dpa-download/
![Page 46: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/46.jpg)
Questions?
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
![Page 47: The have no fear guide to virtualizing databases](https://reader034.fdocuments.net/reader034/viewer/2022051709/586f6f481a28ab10258b4767/html5/thumbnails/47.jpg)
© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.
Thank You!
The SOLARWINDS and SOLARWINDS & Design marks are the exclusive property of SolarWinds Worldwide, LLC, are registered with the U.S.
Patent and Trademark Office, and may be registered or pending registration in other countries. All other SolarWinds trademarks, service
marks, and logos may be common law marks, registered or pending registration in the United States or in other countries. All other
trademarks mentioned herein are used for identification purposes only and may be or are trademarks or registered trademarks of their respective
companies.