Scaling up a single SQL Server instance can be tough. Scaling up hundreds or thousands of instances is tougher. Now virtualize them all. Whew! But does everything have to be harder when virtualized? Could it be easier than when it's physical? Explore how virtualization technologies improve SQL Server's native capabilities to better scale up for a single intense workload and scale out for many such workloads in the same environment.
1. Scaling Up and Out
Your Virtualized
SQL Servers
#devconnections
2. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About Ben DeBow
• CEO Fortified Data
• Working with SQL Server for 20yrs
• Author, speaker, and consultant focusing on Performance,
Scalability, and Availability
• E-mail: bdebow@fortifieddb.com
• Twitter: @BBQSQL
• Web/Blog: http://www.fortifieddb.com
#devconnections
3. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
About David Klee
#devconnections
@kleegeek
davidklee.net
gplus.to/kleegeek
linked.com/a/davidaklee
Specialties / Focus Areas / Passions:
• Performance Tuning
• Virtualization
• Infrastructure
• Troubleshooting
• High Availability
• Disaster Recovery
• Capacity Management
• Health & Efficiency
4. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Agenda
• Scale Out vs. Scale Up
• Scale In
• “Right-Sizing”
• Efficiency
• Workload characteristics
#devconnections
5. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scalability
• Scale up = vertical scaling
• Vertical scaling = single instance faster
• Horizontal
– Data dependent routing
– Read Only Replicas
– Peer to Peer Replication
#devconnections
6. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Out vs. Scale Up
• Age-old problem
• One server to thousands
• Now introduce virtualization
#devconnections
7. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Up
PROS
• Single system / app
distribution
• Faster & quicker
CONS
• Single server bottlenecks
• Scalability limits
• Internal SQL Server
contention
• More expensive
hardware
#devconnections
8. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale Out
PROS
• Separation of
workloads
• Smaller VMs
• More agile VMs
• Load balance
• Outages impact less
CONS
• Licensing
• Management
• Day-to-day operations
• Complexity
#devconnections
9. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Scale IN First
• Efficiency, health, and bottleneck
analysis
• Limited upsides to more hardware
• Performance gains without more
resources
#devconnections
10. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Bottleneck Analysis
• Underneath the VM
• VM config and placement
• SQL Server instance
• SQL Server database
• Determine tipping points
#devconnections
11. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
VM Configuration
• Start with gold certified template
• Adjust resources
• One size does not fit all
#devconnections
12. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
“Right-Sizing”
• What? How?
• Resource allocations
– What is needed now
• Type of workload
• vNUMA
#devconnections
13. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure
• VM proximity
#devconnections
14. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Leverage VM Infrastructure
• Transparent SSD read caching
– Per vDisk
#devconnections
SSD
SAN
LUN
LUN
15. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Priority Tiers
• Mission-critical production vs.
everything else
• Tier / prioritize resource queues
• Separation of tiers
#devconnections
16. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Add Hardware
• Faster CPUs / more cores
• More RAM
• Faster storage (IOps / latency)
• Faster / more interconnects
– Storage fabric
– Networking
#devconnections
17. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Concurrency
• Locking & blocking
• Read Committed Snapshot Isolation
• Asynchronous handling
– Service Broker
– SSIS
– PoSH
#devconnections
18. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Code Review
• Schema design
• Strongly typed data types
• Queries & procedures
• App data handling
• …. And the list continues forever…
#devconnections
19. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - CPU
• Cores & schedulers
• Hyper-Threading
• NUMA
#devconnections
20. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Memory
• Use memory to reduce I/O
• Use less memory with better efficiency
• Schema & index strategies
• Data & index compression
• Buffer pool extensions
#devconnections
21. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage
• Goal: reduce I/O consumption
• Better distribution of workload
– Data files
– File groups
– Partitions
– Virtual disks
#devconnections
Virtual disks
Paths
Controllers
LUNs
22. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
#devconnections
SAN
DB
E:
FG1
FG2
DF4
DF3
DF2
DF1
G:
F:
WindowsServerOSx
Virtualization
Hardware
HBA4HBA3HBA2HBA1
InterconnectSwitch
Controller1Controller2
SANDiskGroup
LUN2LUN1
HBA4HBA3HBA2HBA1
23. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Efficiency - Storage
• Data / index compression
• Indexing strategies
• Datatype analysis
• In-memory constructs
• Buffer pool extensions
#devconnections
24. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Segregating Workloads
• One VM per purpose
• Offload read-only activities
– Availability Groups
– Replication
– Backups
• Sharding / data dependent routing
#devconnections
25. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Workload Characteristics
• Monitoring
• Workload performance stat collection
– At all layers
• Aggregation by host & cluster
• Analysis
#devconnections
26. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Ongoing Review
• Routine “right-sizing” analysis
• Capacity analysis & planning
• Baselines
• What to capture and analyze?
#devconnections
27. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
Conclusions
• Efficient virtualization
• Workload characterization
• Bottleneck relief
• Long-term management
#devconnections
28. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
QUESTIONS?
#devconnections
29. SCALING UP AND OUT YOUR VIRTUALIZED SQL SERVERS
THANK YOU!
#devconnections
30. SESSION TITLE
#devconnections
Rate This Session Now!
Rate with Mobile App:
1. Select the session from the
Agenda or Speakers menus
2. Select the Actions tab
3. Click Rate Session
Rate Using Our Website:
1. Register at www.devconnections.com/logintoratesession
2. Go to www.devconnections.com/ratesession
3. Select this session from the list and rate it
Tell Us
What
You
Thought
of This
Session
Be Entered to
WINPrizes!